From: Alexei V. <al...@go...> - 2002-10-26 14:57:32
|
Hello, Will, > I work with clusters of machines and would like to have the ability for > hostnames to be added automatically. For example, is it possible that > if an unknown host contacts the server it's possible for the server > to add that host via a template? I think that such feature may introduce some serious security issues. Also, it could add extra complexity to Zabbix configuration. > Or, how about a script doing it by directly talking to MySQL? My other > scripts know which hosts exist by parsing the /etc/dhcpd.leases file. > Is it possible to easily parse the file and then add the hosts that > "should" exist into the database via direct SQL statements? I see several ways of doing this. 1. You may access http://zabbix/~zabbix/hosts.php?host=newhost&newgroup=&useip=on&ip=127.0.0.1&port=10000&status=1&host_templateid=1®ister=add in order to add new host. So, a simple script consisting of many calls of "lynx <URL>" or "wget <URL>" may do the thing. This, however, requires Add Host permission for guest. 2. include/config.inc contains function add_host(). The function is self-explanatory and can be safely used in your PHP scripts. > I'm very impressed with your software and would love to use it with > my clusters but I can't go about managing 1500+ hosts by hand... Thanks. Let me know if you need any help (configuration, performance tuning,etc). By the way, having so many hosts, do you find PHP frontend usable? If not, what can be improved or changed? Regards, Alexei |