Nagios confusing hostnames

Okay, so I’ve got a bunch of sql servers that I’m monitorig. Among them is sql-04 (xx.xxx.xxx.64) and sql-06 (xx.xxx.xxx.57). Now, I just started monitoring sql-06 today. I configure it in hosts.cfg with the .57 address. I had some issues with NRPE on sql-06 and was receiving NRPE notifications about…sql-04??? :o NRPE is not even on sql-04. What’s more, the IP address in the notification e-mail was the .57 address (sql-06). I’ve double-checked my hosts.cfg configuration here, and I’m definitely defining sql-06 with the .57 address. Checking the host info on the web interface shows it with that address.

And yet…both of my Nagios servers are giving it the sql-04 hostname, with the sql-06 IP address, in their alerts. :? Can’t figure what’s up with that. Any ideas?

Hosts files? DNS entries?

Also: nice going on the readability of your post o_O

Sorry about that…when I made this thread, it was white-on-black…

I’ve tried pinging both machines by hostname from my Nagios box and it’s using the correct address. I’ve also checked out my host configuration, which is correct (and the web interface shows the hosts with the correct IP addresses).

Totally stumped here…

Sorry about that…when I made this thread, it was white-on-black…
Yeah, my bad :slight_smile:

run the nagios check
nagios/bin/nagios -v nagios/etc/nagios.cfg
errors?
Double check your hosts.cfg to make sure you aren’t defining the host twice.
grep sql-04 nagios/etc/* to see just where you can find it defined.