Check_ping from one server to another

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
vusaravi
Posts: 23
Joined: Fri Mar 13, 2015 7:41 am

Check_ping from one server to another

Post by vusaravi »

Hi

I would like to monitor the ping response from one machine to another machine via nagios.

Kindly let me know the possibilities.

Thanks in advance.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Check_ping from one server to another

Post by mcapra »

The base Nagios plugins suite includes the check_ping plugin for this use case:
http://nagios-plugins.org/doc/man/check_ping.html

Here's a few examples of the plugin's usage:
https://linux.101hacks.com/unix/check-ping/

As far as how you turn that command execution into something Nagios can understand and regularly monitor, the "quickstart" documentation is a good place to start:
https://assets.nagios.com/downloads/nag ... start.html

And if it's a bit difficult to digest, feel free to ask questions or request examples on the forums.
Former Nagios employee
https://www.mcapra.com/
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Check_ping from one server to another

Post by tmcdonald »

Thanks for the assist, @mcapra! OP, please let us know if you need further assistance.
Former Nagios employee
vusaravi
Posts: 23
Joined: Fri Mar 13, 2015 7:41 am

Re: Check_ping from one server to another

Post by vusaravi »

Hi @mcapra

Thanks for your response.

I have already configured ping check to ping different hosts from my Nagios server.

but, my scenario is different, here it is.

I have 2 hosts A & B already added to Nagios server and check_ping is enabled from Nagios to Host A & B.

Now, i would like to check ping from host A to B i.e Nagios initiate check to host A and host A has to initiate check_ping to host B.

Let me know if this is possible, then how?
danjoh
Posts: 73
Joined: Mon Dec 07, 2015 10:43 am
Location: Zürich, Switzerland
Contact:

Re: Check_ping from one server to another

Post by danjoh »

I see two options here (both in shortened form, some extra options might be required):
a) check_by_ssh -H hostA -C '<nagios_plugin_path>/check_ping hostB'
b) check_nrpe -H hostA -c check_ping_hostB
--
D/\N
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Check_ping from one server to another

Post by scottwilkerson »

Yes, install NRPE on host A
https://support.nagios.com/kb/article/n ... rpe-8.html

Then add a new command to the nrpe.cfg that pings host B

Call this with check_nrpe from nagios server
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked