From Upsilon Project
Jump to: navigation, search

Service Overview

Fedora: nagios-plugins-ping
Debian: nagios-plugins-basic

Source: (none)

External documentation:

Checking a server ping is a really simple start to Upsilon.

  • GOOD - If the server is responding to pings within the warning time.
  • WARN - If the server is responding to pings within the "critical" time.
  • BAD - If the server is not responding to pings within the "critical" time.

Install check_ping

The `check_ping` command is packed up with Nagios on many Linux distributions. You can install this command WITHOUT having to install all the bloat of nagios. Because Upsilon is compatible with all nagios plugins, you could install all the nagios plugins that come with your distribution.

Distribution Provided by Distribution package Location to ping command
Debian 7.0 nagios-plugins-basic /usr/lib/nagios/plugins/check_ping
Fedora 18 nagios-plugins-ping /usr/lib64/nagios/plugins/check_ping

This path uses the path for Fedora. If you are using Debian or another distro, please correct the path for your system.

Define the command - "How to ping"

The nagios check_ping command looks like this, when executed from a normal shell;

<pre<noinclude></noinclude>> user@host$: /usr/lib64/nagios/plugins/check_ping -H -w 75,10% -c 125,10% -p 3 PING OK - Packet loss = 0%, RTA = 0.03 ms rta=0.032000ms;75.000000;125.000000;0.000000 pl=0%;10;10;0 </pre<noinclude></noinclude>>

As you can see, this check takes quite a few arguments, even for ping! -H is the hostname/ip address to ping, -w is "warning" and -c is "critical". You can see this argument value is separated by a comma. The first part (eg:75, shown above) means "this service should produce a warning, if the ping time is over 75ms. The 10%, means allow 10% packet loss. Finally, the -c in this command means "ping 3 times, take an average".

You now need to define this command in your upsilon configuration file:

<pre<noinclude></noinclude>> <config>

   <command id = "checkPing" exec = "/usr/lib64/nagios/plugins/check_ping -H $ARG1 -w 75,10% -c 125,10% -p 3" />

</config> </pre<noinclude></noinclude>>

Define the service - "What to ping"

Once the command is defined, you can setup hosts to ping by defining *services*, like this:

    <service id = "importantServerPing" commandRef = "checkPing">                     

This means that you define the command once, and for additional hosts, just add <service /> definitions to your configuration file.

<command id = "checkPing" args = "ONE TWO" />