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.
$ 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
http://cr.yp.to/daemontools.html