9.39. Configuration for the ping check

This check pings a list of hosts and returns the given errorlevel.

PING

Explanation

PING is the enclosing tag for all hosts to ping.

Parent

OSAGENT

allowed values

Count

0 or 1. If you don't define PING, no ping check will run.

Example
<PING>
  <HOST2PING>
    <HOST>192.168.1.1</HOST>
    <ERRORLEVEL>ERROR</ERRORLEVEL>
  </HOST2PING>
  <HOST2PING>
    <HOST>192.168.2.3</HOST>
    <ERRORLEVEL>WARNING</ERRORLEVEL>
  </HOST2PING>
</PING>
        

COMMAND

Explanation

Sometimes you have to configure your own ping command.

Parent

PING

allowed values

Every command you want. You should write something like "/x/y/z/ping -c $PACKETS $HOST", because the ping check substitutes "$PACKETS" and "$HOST" with the right values.

Count

0 or 1.

Example
<PING>
  <COMMAND>/usr/local/bin/ping.special -c $PACKETS -h $HOST</COMMAND>
  <HOST2PING>
    <HOST>192.168.1.1</HOST>
    <ERRORLEVEL>ERROR</ERRORLEVEL>
  </HOST2PING>
  <HOST2PING>
    <HOST>192.168.2.3</HOST>
    <ERRORLEVEL>WARNING</ERRORLEVEL>
  </HOST2PING>
</PING>
        

HOST2PING

Explanation

for every host you want to ping you you define the HOST2PING-pair

Parent

PING

allowed values

Count

As many as you like.

Example

Look at PING

PACKETS

Explanation

This entity describes the number of ICMP-Packets we send (and we should receive) Note: If more then 50% of the ICMP replies lost, the check will fail If PACKETS are not defined we will send 2 Packets

Parent

HOST2PING

allowed values

integer value (but: as bigger the value is as longer the check-duration takes

Count

0 or 1. If you don't configure PACKETS, two packets will be sent.

Example
<PING>
  <COMMAND>/user/specific/ping</COMMAND>
  <HOST2PING>
    <HOST>192.168.1.1</HOST>
    <ERRORLEVEL>ERROR</ERRORLEVEL>
    <PACKETS>2</PACKETS>
  </HOST2PING>
  <HOST2PING>
    <HOST>192.168.1.2</NAME>
    <ERRORLEVEL>WARNING</ERRORLEVEL>
  </HOST2PING>
</PING>
        

RETRIES

Explanation

due a heavy load of the machine/network it is possible that a host sends not all icmp packets back. The RETRIES-tag repeat the ping X times

Parent

HOST2PING

allowed values

integer value (but: as bigger the value is as longer the check-duration can takes (if host is really down))

Count

0 or 1. If you don't configure RETRIES, no more retries would be attempted

Example
<PING>
  <COMMAND>/user/specific/ping</COMMAND>
  <HOST2PING>
    <HOST>192.168.1.1</HOST>
    <ERRORLEVEL>ERROR</ERRORLEVEL>
    <PACKETS>2</PACKETS>
    <RETRIES>1</RETRIES>
  </HOST2PING>
  <HOST2PING>
    <HOST>192.168.1.2</NAME>
    <ERRORLEVEL>WARNING</ERRORLEVEL>
    <RETRIES>2</RETRIES>
  </HOST2PING>
</PING>