Can you please add a duplicate IP address test for different hosts when running preflight checks please?
I'm currently updating an existing environment and doing a lot of copy and pasting when creating new hosts.
Very rarely, I forget to update the IP address on the new entry and it retains the previous hosts ip address.
This does not show itself as a problem when viewing the nagios charts on the website as the host is technically up (I get around this by adding in the system/node check in NCPA so I have a visual sanity check when viewing the web console).
It would be great if nagios could pick this up before I restart the nagios service after adding in new hosts.
Add duplicate IP Address test to preflight checks
Re: Add duplicate IP Address test to preflight checks
If this gets added, it must be a warning, not a failure. We often use the same IP address on different machine names specifically for testing and/or doing complicated service dependencies.
Re: Add duplicate IP Address test to preflight checks
Yeah a Warning is fine with me
eloyd wrote:If this gets added, it must be a warning, not a failure. We often use the same IP address on different machine names specifically for testing and/or doing complicated service dependencies.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Add duplicate IP Address test to preflight checks
Because so many people use the same $HOSTADDRESS$ for multiple hosts, I really don't think this is going to get in there.
I alternatively would recommend writing a script that parses the json delivered with the JSON API for the address field to find/display duplicates
I alternatively would recommend writing a script that parses the json delivered with the JSON API for the address field to find/display duplicates
Code: Select all
/nagios/cgi-bin/objectjson.cgi?query=hostlist&details=true
Re: Add duplicate IP Address test to preflight checks
Or search /usr/local/nagios/rw/objects.cache for dupes.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Add duplicate IP Address test to preflight checks
Another optioneloyd wrote:Or search /usr/local/nagios/rw/objects.cache for dupes.