We have a number of hosts that have multiple IP's. They are in DNS so when doing an NSLOOKUP for any of the IP's it resolves to the same hostname. I am looking for suggestions on the
best way to add these devices in Nagios with their associated IP's.
Thanks,
Greg
Suggestions for devices with multiple IPs
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Suggestions for devices with multiple IPs
If possible, restricting to one interface and a hardcoded IP would probably be easiest. Otherwise simply setting the host address field to the hostname, and keeping the config name the same, should be enough to allow the plugins to use any resolved IP and keep you to one host license use per host.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: Suggestions for devices with multiple IPs
Choose one ip address for the host and if you want to check if the other ip adresses are alive you could monitor these with a ping service?
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Suggestions for devices with multiple IPs
Yeah in addition to Sreinhardt's suggestion, which is what I have gone with in the past, you could simply add ping services to that main host, that way you can verify all addresses are reachable as Willem mentioned.
Re: Suggestions for devices with multiple IPs
Thanks, going with ping as a service works great. The only outstanding problem is Auto Discovery. We run it monthly to ensure all devices are in Nagios. I need to
figure out how to deal with the multiple IPs it will report on since it will only find the one IP that is assigned to the host name.
figure out how to deal with the multiple IPs it will report on since it will only find the one IP that is assigned to the host name.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Suggestions for devices with multiple IPs
Hmm, I would think that a good solution for that would be excluding those addresses and saving the new scan. Or are you looking to do this a different way? Is there any way you know beyond a shadow of a doubt that those addresses will stay constant? Or are they rather dynamic in some cases?