Add duplicate IP Address test to preflight checks

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Add duplicate IP Address test to preflight checks

Postby Guyver1 » Tue Aug 06, 2019 4:24 am

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.
Guyver1
 
Posts: 24
Joined: Tue Apr 16, 2019 4:43 am

Re: Add duplicate IP Address test to preflight checks

Postby eloyd » Tue Aug 06, 2019 7:40 am

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.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
User avatar
eloyd
Cool Title Here
 
Posts: 2089
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY

Re: Add duplicate IP Address test to preflight checks

Postby Guyver1 » Tue Aug 06, 2019 12:44 pm

Yeah a Warning is fine with me :mrgreen:

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.
Guyver1
 
Posts: 24
Joined: Tue Apr 16, 2019 4:43 am

Re: Add duplicate IP Address test to preflight checks

Postby scottwilkerson » Tue Aug 06, 2019 3:55 pm

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

Code: Select all
/nagios/cgi-bin/objectjson.cgi?query=hostlist&details=true
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 18412
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Add duplicate IP Address test to preflight checks

Postby eloyd » Tue Aug 06, 2019 5:21 pm

Or search /usr/local/nagios/rw/objects.cache for dupes.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
User avatar
eloyd
Cool Title Here
 
Posts: 2089
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY

Re: Add duplicate IP Address test to preflight checks

Postby scottwilkerson » Wed Aug 07, 2019 6:52 am

eloyd wrote:Or search /usr/local/nagios/rw/objects.cache for dupes.

Another option
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 18412
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Community Support

Who is online

Users browsing this forum: Google [Bot] and 8 guests