====== DHCP checker for Servicemon ====== A new DCHP service checker for NAV. ===== Status ===== The checker is written and has been in service at UiTø since 10. May 2010. ===== Arguments ===== The checker takes one optional argument: timeout (in seconds). ===== Inner workings ===== The DHCP checker uses [[http://c3rb3r.openwall.net/dhcping/|dhcping]] to do the checking, with this command line: dhcping -i -s IPADDR -t TIMEOUT where -i tells it to send and DHCPINFORM packet, IPADDR is the IP address of the netbox and TIMEOUT is timeout in seconds and comes from the checker argument of the same name. The program is run by the unprivileged user 'navcron', and must be setuid root, which is typically not the default when installed from a package. ===== New library functions ===== The checker code includes two functions find_cmd() and is_setuid_root(). These should be moved to a library, and can then be used in other checkers to fix [[https://bugs.launchpad.net/nav/+bug/545029|LP#545029]] (Servicemon/SmbChecker runs out of available file descriptors) ===== Source code ===== https://heimdal.uit.no/hg/olemb/dhcpchecker/ The two new files: * https://heimdal.uit.no/hg/olemb/dhcpchecker/file/tip/subsystem/statemon/nav/statemon/checker/DhcpChecker.py * https://heimdal.uit.no/hg/olemb/dhcpchecker/file/tip/subsystem/statemon/nav/statemon/checker/DhcpChecker.descr