Table of Contents

Name

check_remote_by_udp_multi - nagios plugin for getting multiple remote values by udp

Synopsis

check_remote_by_udp_multi -I ip-address -H shorthostname -p port [ -O ] [ -D ] [ -L ] [ -t timeout ] [ -u unit ] -w warnlevel1 -c critlevel1 [ -s servicename1 ] -k key1 [ -w warnlevel2 -c critlevel2 [ -s servicename2 ] -k key2 ] keymulti

Description

check_remote_by_udp_multi is a nagios plugin for remote checking hosts by udp. It is designed to work with knoerred, a small and experimental udp-server.
The local system time in seconds since epoch and the given hostname are appended to the multikey with slash as separator and LF as terminator. check_remote_by_udp_multi sends the multikey string to the remote server (see EXAMPLES below). Then it expects multiple values as a result of the remote checks. Further explanations are found in check_remote_by_udp(1) .
The difference to check_remote_by_udp is that check_remote_by_udp_multi can make multiple service checks with one single UDP remote request. It should be called by nagios as active check and it returns the active check value in a normal way. Additional checks are send back to nagios through the command pipe as passive check results.
Currently the performance data are only handled for the first key, the active check. Later versions of check_remote_by_udp_multi will include a direct handling of performance data.
You guess that there is no faster way of monitoring than getting a small UDP packet containing multiple check results from a binary remote server, aren’t you?

Options

-p port
Specify the port of the udp server on the remote host.

-u unit
Specify an optional unit string which is placed after the remote value and which is visible in nagios.

-t timeout
The plugins internal timeout in seconds (default: 10).

-O
Do not submit passive checks which values are OK.

-D
Enable debug output.

-L
On warning or critical values print

also a knoerre-compatible link

-H shorthostname
Specify the shorthostname for sending passive check results to nagios. The hostname will also be used for hostname checking (-k hostname).

-I ip-address
Specify the IP address of the remote server to check.

-w warnlevel
Specify the warning level. The remote value must be greater than the warnlevel to trigger.

-c critlevel
Specify the critical level. The remote value must be greater than the critlevel to trigger.

-s servicename
Specify the servicename of a single check to send back as passive check result to nagios. If no servicename was specified for a single check then its singlekey name will be used instead.

-k singlekey
Specify the key of a single check to be searched for in the returned results.

Files

check_remote_by_udp_multi does not use any configuration files.

Examples

The following call asks remote for multikey loadmulti strips out the value of load1 and sends it back as active check result to nagios. The values of diskusage/ (with servicename dfroot), load5 (servicename load5), system time difference in seconds and hostname compare result will be send back to nagios as passive check results of host localhost.

$ check_remote_by_udp_multi -I 127.0.0.1 -H gway -p 8888 -w 7 -c 20 load1 -w 80 -c 90 -s dfroot -k diskusage/ -w 10 -c 20 -k load5 -w 0 -c 0 -k hostname -w 10 -c 30 -k timediff loadmulti

The following example uses netcat to show the results of the example above, including check of hostname and systime:

$ echo loadmulti/$(date +%s)/gway |nc -w 1 -u 127.0.0.1 8888
hostname

0
timediff

0
cpuu u0s0w0

0
cpus u0s0w0

0
cpuw u0s0w0

0
cpuI u0s0w0

1
ctxt

70
nettraf0

0
nettraf1

0
swaps

2
diskusage/ 0GB free

84
diskinodes/ 47205 free

61
netlinksdown lo,eth0,eth1

0
load5

0.00
load15

0.00
proccount

138
load1

0.00 0.00 0.00 3/138 21264
0.00

See Also

check_remote_by_udp(1) , check_remote_by_http(1) , knoerred(1) , knoerre(1)

http://downloads.tuxad.de/nagios-fwb

Author

Frank Bergmann, udp://www.tuxad.com


Table of Contents