.TH knoerred 1 "April 2012" "ngtx" .SH NAME knoerred \- udp server for nagios remote checks .br knoerrehd \- http server for nagios remote checks .SH SYNOPSIS .B knoerre[h]d .B listenport .B allowedclientaddress [ .B allowedclientaddress ] ... .br .B /path/to/knoerre[h]d .B -d .B listenport .B allowedclientaddress [ .B allowedclientaddress ] ... .br .SH DESCRIPTION .B knoerred is a UDP and .B knoerrehd is a http standalone server for nagios remote monitoring. Like its brother .B knoerre it has a small footprint and is very fast. Unlike .B knoerre which is designed to be used with DJB's tcpserver (or other super-daemons) .B 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. .br .B 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. .B knoerrehd has more limits than .B knoerre but it runs as standalone daemon and offers continous measurement of cpu times and network traffic. .B knoerred is also limited but it may run 5 to 20 times faster than .B knoerre. .B knoerred and .B knoerrehd do not support calling an external program or script like .B knoerre does. Currently only a few checks/keys are built in: .br .B load1 load5 load15 .B cpuu cpus cpuw cpui cpuI .B cachedvalue .B cat .B cmdline .B cmp .B diskinodes .B diskusage .B diskusagelocal .B dmesg .B filetimestamp .B mailqsize .B netlinksdown .B nettraf0 nettraf1 (aka nettraf/eth0 and nettraf/eth1) .B proccount proccounttg .B process processd .B swaps .B timediff .B uptime .B wc-l .B loadmulti .br Please take look at .B knoerre(1) for description of the keys. .br .B loadmulti is a collection of some checks in a single request: .br .B cpuI .B cpus .B cpuu .B cpuw .B ctxt .B diskinodes/ .B diskusage/ .B hostname .B load1 .B load15 .B load5 .B netlinksdown .B nettraf0 .B nettraf1 .B proccount .B swaps .B timediff For "cached" keys like cpu times .B knoerrehd only needs 4 syscalls for receive and send. .B knoerred only needs 2 syscalls to answer a request. (only a kernel module would be faster). If a file .B /nagios-cache/multiresults exists then its contents with up to 966 bytes will be included in the packet sent back. .SH OPTIONS .TP .B \-d daemonize knoerre[h]d. Remember to specify the full path for this option. .SH EXAMPLES .br What's the load per one minute average on the remote server running knoerred? .RS .br $ echo load1 |nc -w 1 -u 127.0.0.1 8888 .br 0.00 0.00 0.02 2/250 19914 .br 0.00 .br $ time check_remote_by_udp -w 7 -c 30 -H 127.0.0.1 -p 8888 -t 1 load1 .br REMOTE OK - 3.68 | load1=3.68;7;30 .br .br real 0m0.002s .br user 0m0.000s .br sys 0m0.000s .RE The following example uses netcat to show the results of a .B loadmulti check, including check of hostname and systime: .RS $ echo loadmulti/$(date +%s)/gway |nc -w 1 -u 127.0.0.1 8888 .br hostname .br 0 .br timediff .br 0 .br cpuu u0s0w0 .br 0 .br cpus u0s0w0 .br 0 .br cpuw u0s0w0 .br 0 .br cpuI u0s0w0 .br 1 .br ctxt .br 70 .br nettraf0 .br 0 .br nettraf1 .br 0 .br swaps .br 2 .br diskusage/ 0GB free .br 84 .br diskinodes/ 47205 free .br 61 .br netlinksdown lo,eth0,eth1 .br 0 .br load5 .br 0.00 .br load15 .br 0.00 .br proccount .br 138 .br load1 .br 0.00 0.00 0.00 3/138 21264 .br 0.00 .RE .SH CAVEATS .B knoerred does only send one single udp packet with up to approx. 1.5 KB back where all results must fit in. .SH "SEE ALSO" .B knoerre(1), .B check_remote_by_udp_multi(1), .B check_remote_by_udp(1), .B check_remote_by_http(1) .br http://downloads.tuxad.de/ngtx .br http://cr.yp.to/daemontools.html .SH AUTHOR Frank Bergmann, http://www.tuxad.com