I am using Nagios to monitor my servers and I have an need to monitor the inter connectivity between different servers. For example assume that I have three servers A, B & C and all of these servers are already monitored by nagios using check_ping plugin.
Now I want to check connectivity between these three servers internally, I mean from
server A, B & C should be reachable, likewise from B, A & C should be reachable , same for server C
What is the way to do this using nagios.
Server A - can ping to servers B&C
Server B - can ping to servers A&C
Server C - can ping to servers B&C
I have tried with multiple ping command in server A, but it is not helpful because i cant able to find out whether server B/C is not reacheable from A
command[check_ping]=/usr/lib64/nagios/plugins/check_ping -H 10.16.15.137 -w 3000.0,80% -c 5000.0,100% -p 5
command[check_ping]=/usr/lib64/nagios/plugins/check_ping -H 10.18.42.125 -w 3000.0,80% -c 5000.0,100% -p 5
where
10.16.15.137 -> SERVER B
10.18.42.125 -> SERVER C
Install the NRPE daemon on all 3 servers, and write different check commands, like
check_ping_A
,check_ping_B
,check_ping_C
, etc., on the different servers (in the NRPE config):You'd check B & C from A, A & C from B, etc. This is a simple approach, but it doesn't scale well.
(Or write a generic
check_ping
that takes the address as an ARG and enable NRPE argument processing. This is more flexible, but some people are uneasy with this practice.)Then use check_nrpe on the Nagios server to check the various combinations. You can simply this slightly by using check_multi, especially if you want to check more than 3 servers in the future.
You can use NRPE on the servers to actually test the connection from there. On the nagios machine, you would use the
check_nrpe
plugin to get the results.NRPE essentially means you run Nagios plugins locally on a monitored host and get the results back to Nagios via the NRPE protocol.