Check_ping from one server to another

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Check_ping from one server to another

Postby vusaravi » Tue Jun 12, 2018 2:54 am

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.
vusaravi
 
Posts: 14
Joined: Fri Mar 13, 2015 7:41 am

Re: Check_ping from one server to another

Postby mcapra » Tue Jun 12, 2018 6:57 am

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/nagioscore/docs/nagioscore/4/en/quickstart.html

And if it's a bit difficult to digest, feel free to ask questions or request examples on the forums.
Former Nagios employee
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 3291
Joined: Thu May 05, 2016 3:54 pm

Re: Check_ping from one server to another

Postby tmcdonald » Tue Jun 12, 2018 11:28 am

Thanks for the assist, @mcapra! OP, please let us know if you need further assistance.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tmcdonald
Operations Engineer
 
Posts: 9055
Joined: Mon Sep 23, 2013 8:40 am

Re: Check_ping from one server to another

Postby vusaravi » Wed Jun 13, 2018 3:21 am

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?
vusaravi
 
Posts: 14
Joined: Fri Mar 13, 2015 7:41 am

Re: Check_ping from one server to another

Postby danjoh » Wed Jun 13, 2018 7:01 am

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
danjoh
 
Posts: 49
Joined: Mon Dec 07, 2015 10:43 am
Location: Zürich, Switzerland

Re: Check_ping from one server to another

Postby scottwilkerson » Wed Jun 13, 2018 9:56 am

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
CTO
 
Posts: 9726
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 15 guests