Page 1 of 1

Monitoring two IP recommendation?

Posted: Thu Aug 13, 2015 2:38 pm
by emartine
Does anyone have a recommendation for monitoring two or more IP addresses where when both are down it is critical but so long as one of them is up the service is ok?
I have clusters of servers that I have been asked to monitor (some are groups of two IP Addresses while some have 3 IP addresses and some have 4 IP addresses clustered). These clusters will not have dns names.

Re: Monitoring two IP recommendation?

Posted: Thu Aug 13, 2015 3:47 pm
by jolson
You'll be interested in reading through this document: https://assets.nagios.com/downloads/nag ... sters.html

Let me know if you have any questions!

Re: Monitoring two IP recommendation?

Posted: Thu Aug 13, 2015 4:35 pm
by emartine
In that document it is necessary to define each host individually but I have host with multiple intefaces which are not always on. So the document wouldn't work. Let me know if I am misunderstanding the doc.

Re: Monitoring two IP recommendation?

Posted: Thu Aug 13, 2015 8:37 pm
by Box293
They don't have to be host objects, they could be multiple service objects assigned to the one host.

So the key to the check_clusters plugin is that you define how many of these services are allowed to be in a non-ok state (exit code is not 0) before the check_clusters plugin reports a critical status.

Code: Select all

./check_cluster -s -l "My Test Cluster" -w 3 -c 5 -d 0,0,0,1,2,0,2,0,0,0
CLUSTER OK: My Test Cluster: 7 ok, 1 warning, 0 unknown, 2 critical

./check_cluster -s -l "My Test Cluster" -w 3 -c 5 -d 1,1,1,1,2,2,2,0,0,0
CLUSTER CRITICAL: My Test Cluster: 3 ok, 4 warning, 0 unknown, 3 critical
The comma separated list will be the on-demand macros which reference the existing services that make up the "cluster".