knoerred has more limits than knoerre
but it may run 5 to 20 times faster. It does not support calling an external
program or script like knoerre does. Currently only a few checks/keys are
built in:
load1 load5 load15 cat cmdline cmp diskinodes diskusage filetimestamp proccount
proccounttg process processd swaps timediff wc-l loadmulti
Please 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 every request sent knoerred uses only 3 syscalls to sent the results back (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