I am using nagios 3.2.0 on arch linux, and it works perfectly fine.
I wanted to have the possibility to automatically add devices to nagios on the network without having to enter all data manually. [rant]We’re in the 21st century, shouldn’t we have computers to do the work for us?[/endrant]
I have found a script called check_find_new_hosts on http://exchange.nagios.org/directory/Plugins/Network-and-Systems-Management/Nagios/check_find_new_hosts/details but I can’t get it to work.
First off, the perl script was missing the “-” in front of the “a” for the fping command, but after fixing that (this is as far as my scripting skills go), I got the following errors:
$ /usr/share/nagios/libexec/check_find_new_hosts -vvvx /etc/nagios/hosts_hostgroups_and_services/ 192.168.2.0 24 admins
Use of uninitialized value $ip1 in split at ./check_find_new_hosts line 331, <CMD> line 4.
Use of uninitialized value $ip1a in numeric comparison (<=>) at ./check_find_new_hosts line 335, <CMD> line 4.
Use of uninitialized value in concatenation (.) or string at ./check_find_new_hosts line 409, <CMD> line 4.
Any takers? Or do you have another solution that would get me to my goal of adding hosts automatically to nagios?