Table of Contents

Name

knoerred - udp server for nagios remote checks
knoerrehd - http server for nagios remote checks

Synopsis

knoerre[h]d listenport allowedclientaddress [ allowedclientaddress ] ...
/path/to/knoerre[h]d -d listenport allowedclientaddress [ allowedclientaddress ] ...

Description

knoerred is a UDP and knoerrehd is a http standalone server for nagios remote monitoring. Like its brother knoerre it has a small footprint and is very fast. Unlike knoerre which is designed to be used with DJB’s tcpserver (or other super-daemons) knoerre[h]d runs per default as standalone non-forking-daemon with one "slave" thread. It waits for one packet with a request and sends one packet back. The key-request sent to knoerred must be terminated by a LF. knoerrehd accepts http requests like knoerre.
knoerre[h]d listens on all local addresses on the specified port. As a second argument the IP address of a allowed client host must be specified. Up to 19 optional addresses may be given.

knoerrehd has more limits than knoerre but it runs as standalone daemon and offers continous measurement of cpu times and network traffic. knoerred is also limited but it may run 5 to 20 times faster than knoerre. knoerred and knoerrehd do not support calling an external program or script like knoerre does. Currently only a few checks/keys are built in:
load1 load5 load15 cpuu cpus cpuw cpui cpuI cachedvalue cat cmdline cmp diskinodes diskusage diskusagelocal dmesg filetimestamp mailqsize netlinksdown nettraf0 nettraf1 (aka nettraf/eth0 and nettraf/eth1) proccount proccounttg process processd swaps timediff uptime wc-l loadmulti
Please take look at knoerre(1) for description of the keys.
loadmulti is a collection of some checks in a single request:
cpuI cpus cpuu cpuw ctxt diskinodes/ diskusage/ hostname load1 load15 load5

netlinksdown nettraf0 nettraf1 proccount swaps timediff

For "cached" keys like cpu times knoerrehd only needs 4 syscalls for receive and send. knoerred only needs 2 syscalls to answer a request. (only a kernel module would be faster). If a file /nagios-cache/multiresults exists then its contents with up to 966 bytes will be included in the packet sent back.

Options

-d
daemonize knoerre[h]d. Remember to specify the full path for this option.

Examples


What’s the load per one minute average on the remote server running knoerred?

$ echo load1 |nc -w 1 -u 127.0.0.1 8888
0.00 0.00 0.02 2/250 19914
0.00
$ time check_remote_by_udp -w 7 -c 30 -H 127.0.0.1 -p 8888 -t 1 load1
REMOTE OK - 3.68 | load1=3.68;7;30


real 0m0.002s
user 0m0.000s
sys 0m0.000s

The following example uses netcat to show the results of a loadmulti check, 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

Caveats

knoerred does only send one single udp packet with up to approx. 1.5 KB back where all results must fit in.

See Also

knoerre(1) , check_remote_by_udp_multi(1) , check_remote_by_udp(1) , check_remote_by_http(1)
http://downloads.tuxad.de/ngtx

http://cr.yp.to/daemontools.html

Author

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


Table of Contents