Cannot get check_find_new_hosts to work

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 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/ 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?


Even I am getting exactly same errors. Is there a solution provided or have you got any solution for this.
Please share and help

Sanjeeva Reddy

Holy crap a reply to a 10 year old post… I am glad I didn’t hold my breath! :rofl::rofl::rofl:
Good luck Sanjeeva!

Have you figured out how to do it in the past 10 years, @awayand ? Perhaps you can guide @donsan ? :hugs:

I started using for the first time few days ago and when I came to this forum I saw your post is what I am facing. I didn’t give any suggestion / solution, but mentioned that I am facing the same problem!
From your reply, I didn’t get whether you had cracked it or not? It would be helpful, if you can share the solution if you had cracked it. Please help


No I don’t think I ever figured it out, sorry! :frowning:

Unfortunately I gave up and never figured it out :frowning:

I haven’t cracked it yet.
But, I used excel to get the required commands and copied to notepad and taken as a script to add my devices and services. It is a hard way, but better than manual addition anyway.

Sanjeeva Reddy