I have an Exchange cluster, don't know much about it, but the Exchange admin asked if Nagios can monitor the DAG cluster. There are 3 here in the Home Office using 10.131.x.x addresses and 1 in our DR site using 10.115.x.x. If this DAG ever gets a 10.115.x.x address a notification should be sent to them so they can correct the group so the 10.131.x.x is the primary online system.
Has anyone setup such a check or is there a better way to accomplish this monitoring.
Check for a specific IP and if not then send alert
Re: Check for a specific IP and if not then send alert
Is it really for a specific IP or is it for a range? If you want to check for a specific IP a simple check-host-alive check would do this.
Another option would be to configure the client to use a custom script that just sends it's IP address to Nagios. Assuming that DNS is updated when the client gets a new IP and Nagios, the check would come in via the correct hostname but with an alert that the IP has changed.
Another option would be to configure the client to use a custom script that just sends it's IP address to Nagios. Assuming that DNS is updated when the client gets a new IP and Nagios, the check would come in via the correct hostname but with an alert that the IP has changed.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Check for a specific IP and if not then send alert
In this case a range. I don't want it to have the 10.115 address. If it does I want a notification so I can change it back to a 10.131 address.
Re: Check for a specific IP and if not then send alert
Have you tried the DNS Query Wizard?
You put in the hostname and the expected IP addresses and it they are not correct, it will generate an alert.
You put in the hostname and the expected IP addresses and it they are not correct, it will generate an alert.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Check for a specific IP and if not then send alert
But in this case this host would be alright if it has one of 2 different IP addresses. The 10.131 network is alright but if it has the 10.115 I need to send out a notification. Is there a way to check and say if the host has the 10.115 address send out the notification since the other options would be OK, using the 10.131.
Re: Check for a specific IP and if not then send alert
That is what the check_dns plugin does, you give it a host name to look up and if the expected IP address is not returned, it will generate a Critical Alert.
This example is checking www.google.com for it to return the IP address of 172.217.8.196 and it did and the check was IP.
I ran it again and it did not get the expected IP address and it generated a Critical Alert.
You would use the hostname for your cluster and the IP address 10.131 as the expected address.
This example is checking www.google.com for it to return the IP address of 172.217.8.196 and it did and the check was IP.
Code: Select all
/usr/local/nagios/libexec/check_dns -H www.google.com -a 172.217.8.196
DNS OK: 0.038 seconds response time. www.google.com returns 172.217.8.196|time=0.038112s;;;0.000000Code: Select all
/usr/local/nagios/libexec/check_dns -H www.google.com -a 172.217.8.196
DNS CRITICAL - expected '172.217.8.196' but got '172.217.8.164'
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Check for a specific IP and if not then send alert
This will work. Thanks for the assistance and you can close this one.