diff -Nru xymon-4.3.12~lucid/build/bb-commands.sh xymon-4.3.17/build/bb-commands.sh --- xymon-4.3.12~lucid/build/bb-commands.sh 2013-09-24 14:29:35.000000000 +0000 +++ xymon-4.3.17/build/bb-commands.sh 2011-03-08 17:20:28.000000000 +0000 @@ -41,11 +41,6 @@ echo "DF=\"${PGM} -Pk\"" echo "DFCMD=\"${PGM} -Pk\"" echo "PS=\"ps ax\"" -echo "SWAP=\"/sbin/swapon\"" -echo "PSRINFO=\"cat /proc/cpuinfo\"" -echo "MPSTAT=\"/usr/bin/mpstat -P ALL\"" -echo "UNAME=\"/bin/uname\"" -echo "export SWAP PSRINFO MPSTAT UNAME" echo "" echo "MAXLINE=\"32768\"" diff -Nru xymon-4.3.12~lucid/build/c-ares.sh xymon-4.3.17/build/c-ares.sh --- xymon-4.3.12~lucid/build/c-ares.sh 1970-01-01 00:00:00.000000000 +0000 +++ xymon-4.3.17/build/c-ares.sh 2014-02-09 21:15:45.000000000 +0000 @@ -0,0 +1,72 @@ + echo "Checking for C-ARES library ..." + + CARESINC="" + CARESLIB="" + for DIR in /opt/c*ares* /usr/local/c*ares* /usr/local /usr/pkg /opt/csw /opt/sfw + do + if test -f $DIR/include/ares.h + then + CARESINC=$DIR/include + fi + if test -f $DIR/include/ares/ares.h + then + CARESINC=$DIR/include/ares + fi + + if test -f $DIR/lib/libcares.so + then + CARESLIB=$DIR/lib + fi + if test -f $DIR/lib/libcares.a + then + CARESLIB=$DIR/lib + fi + if test -f $DIR/lib64/libcares.so + then + CARESLIB=$DIR/lib64 + fi + if test -f $DIR/lib64/libcares.a + then + CARESLIB=$DIR/lib64 + fi + done + + if test "$USERCARESINC" != ""; then + CARESINC="$USERCARESINC" + fi + if test "$USERCARESLIB" != ""; then + CARESLIB="$USERCARESLIB" + fi + + # Lets see if it can build + CARESOK="YES" + cd build + if test "$CARESINC" != ""; then INCOPT="-I$CARESINC"; fi + if test "$CARESLIB" != ""; then LIBOPT="-L$CARESLIB"; fi + OS=`uname -s | sed -e's@/@_@g'` $MAKE -f Makefile.test-cares ares-clean + OS=`uname -s | sed -e's@/@_@g'` CARESINC="$INCOPT" $MAKE -f Makefile.test-cares test-compile + if test $? -eq 0; then + echo "Compiling with c-ares library works OK" + else + echo "ERROR: Cannot compile using c-ares library." + CARESOK="NO" + fi + + if test "$CARESOK" = "YES" + then + OS=`uname -s | sed -e's@/@_@g'` CARESLIB="$LIBOPT" $MAKE -f Makefile.test-cares test-link + if test $? -eq 0; then + echo "Linking with c-ares library works OK" + else + echo "ERROR: Cannot link with c-ares library." + CARESOK="NO" + fi + OS=`uname -s | sed -e's@/@_@g'` $MAKE -f Makefile.test-cares ares-clean + fi + cd .. + + if test "$CARESOK" = "NO"; then + echo "The system C-ARES library is missing or not usable. I will use the version shipped with Xymon" + fi + + diff -Nru xymon-4.3.12~lucid/build/dorelease.sh xymon-4.3.17/build/dorelease.sh --- xymon-4.3.12~lucid/build/dorelease.sh 2012-08-04 12:13:20.000000000 +0000 +++ xymon-4.3.17/build/dorelease.sh 2014-02-15 12:22:16.000000000 +0000 @@ -7,37 +7,6 @@ exit 1 fi -if [ ! -f Makefile ] -then - USEXYMONPING=y \ - ENABLESSL=y \ - ENABLELDAP=y \ - ENABLELDAPSSL=y \ - XYMONUSER=xymon \ - XYMONTOPDIR=/usr/lib/xymon \ - XYMONVAR=/var/lib/xymon \ - XYMONHOSTURL=/xymon \ - CGIDIR=/usr/lib/xymon/cgi-bin \ - XYMONCGIURL=/xymon-cgi \ - SECURECGIDIR=/usr/lib/xymon/cgi-secure \ - SECUREXYMONCGIURL=/xymon-seccgi \ - HTTPDGID=www-data \ - XYMONLOGDIR=/var/log/xymon \ - XYMONHOSTNAME=localhost \ - XYMONHOSTIP=127.0.0.1 \ - MANROOT=/usr/share/man \ - INSTALLBINDIR=/usr/lib/xymon/server/bin \ - INSTALLETCDIR=/etc/xymon \ - INSTALLWEBDIR=/etc/xymon/web \ - INSTALLEXTDIR=/usr/lib/xymon/server/ext \ - INSTALLTMPDIR=/var/lib/xymon/tmp \ - INSTALLWWWDIR=/var/lib/xymon/www \ - ./configure -fi -if [ ! -x common/xymondigest ] -then - make common-build -fi ./build/generate-md5.sh >build/md5.dat.new mv build/md5.dat.new build/md5.dat diff -Nru xymon-4.3.12~lucid/build/genconfig.sh xymon-4.3.17/build/genconfig.sh --- xymon-4.3.12~lucid/build/genconfig.sh 2008-09-30 16:37:31.000000000 +0000 +++ xymon-4.3.17/build/genconfig.sh 2014-02-09 07:06:40.000000000 +0000 @@ -80,6 +80,16 @@ echo "#undef HAVE_STRTOLL_H" >>include/config.h fi +# This is experimental for 4.3.x +#echo "Checking for POSIX binary tree functions" +#$CC -c -o build/testfile.o $CFLAGS build/test-bintree.c 1>/dev/null 2>&1 +#if test $? -eq 0; then +# echo "#define HAVE_BINARY_TREE 1" >>include/config.h +#else + echo "#undef HAVE_BINARY_TREE" >>include/config.h +#fi + + echo "#endif" >>include/config.h echo "config.h created" diff -Nru xymon-4.3.12~lucid/build/generate-md5.sh xymon-4.3.17/build/generate-md5.sh --- xymon-4.3.12~lucid/build/generate-md5.sh 2011-03-08 17:20:28.000000000 +0000 +++ xymon-4.3.17/build/generate-md5.sh 2014-02-15 12:22:16.000000000 +0000 @@ -5,5 +5,5 @@ WEBLIST=`(cd xymond; find webfiles -type f) | egrep -v "RCS|\.svn" | xargs echo` WWWLIST=`(cd xymond; find wwwfiles -type f) | egrep -v "RCS|\.svn" | xargs echo` -(cat build/md5.dat; for F in $WEBLIST $WWWLIST; do echo "`./common/xymondigest md5 xymond/$F` $F"; done) | sort -k2 | uniq +(cat build/md5.dat; for F in $WEBLIST $WWWLIST; do echo "md5:`openssl dgst -md5 xymond/${F} | awk '{print $2}'` ${F}"; done) | sort -k2 | uniq diff -Nru xymon-4.3.12~lucid/build/Makefile.FreeBSD xymon-4.3.17/build/Makefile.FreeBSD --- xymon-4.3.12~lucid/build/Makefile.FreeBSD 2012-07-31 13:50:31.000000000 +0000 +++ xymon-4.3.17/build/Makefile.FreeBSD 2014-01-07 08:43:44.000000000 +0000 @@ -6,13 +6,8 @@ NETLIBS = # Compile flags for normal build -CC = gcc -GCCVER := $(shell gcc -dumpversion|cut -d. -f1) -ifeq ($(GCCVER),4) - CFLAGS = -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT -I/usr/local/include -L/usr/local/lib $(LFSDEF) $(OSDEF) -else - CFLAGS = -g -O2 -Wall -Wno-unused -D_REENTRANT -I/usr/local/include -L/usr/local/lib $(LFSDEF) $(OSDEF) -endif +CC ?= cc +CFLAGS = -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT -I/usr/local/include -L/usr/local/lib $(LFSDEF) $(OSDEF) RPATH = "-Wl,--rpath," diff -Nru xymon-4.3.12~lucid/build/Makefile.rules xymon-4.3.17/build/Makefile.rules --- xymon-4.3.12~lucid/build/Makefile.rules 2012-11-14 11:29:54.000000000 +0000 +++ xymon-4.3.17/build/Makefile.rules 2014-02-13 09:00:40.000000000 +0000 @@ -13,6 +13,8 @@ ifeq ($(CLIENTONLY),yes) BUILDTARGETS = client CFLAGS += -DCLIENTONLY=1 + XYMONCLIENTHOME = $(XYMONTOPDIR) + XYMONHOME = $(XYMONTOPDIR) ifeq ($(LOCALCLIENT),yes) CLIENTTARGETS = lib-client common-client build-build xymond-client INSTALLTARGETS = install-client install-localclient install-clientmsg @@ -26,6 +28,8 @@ CLIENTTARGETS = lib-client common-client build-build INSTALLTARGETS = install-xymongen install-xymonnet install-xymonproxy install-xymond install-web install-docs install-client install-servermsg CFLAGS += $(PCREINCDIR) + XYMONCLIENTHOME = $(XYMONTOPDIR)/client + XYMONHOME = $(XYMONTOPDIR)/server endif ifndef INSTALLBINDIR @@ -70,7 +74,7 @@ @echo "" client: include/config.h $(CLIENTTARGETS) - CC="$(CC)" CFLAGS="$(CFLAGS)" XYMONHOME="$(XYMONTOPDIR)/client" XYMONHOSTIP="$(XYMONHOSTIP)" LOCALCLIENT="$(LOCALCLIENT)" SSLLIBS="$(SSLLIBS)" NETLIBS="$(NETLIBS)" LIBRTDEF="$(LIBRTDEF)" $(MAKE) -C client all + CC="$(CC)" CFLAGS="$(CFLAGS)" XYMONHOME="$(XYMONCLIENTHOME)" XYMONHOSTIP="$(XYMONHOSTIP)" LOCALCLIENT="$(LOCALCLIENT)" SSLLIBS="$(SSLLIBS)" NETLIBS="$(NETLIBS)" LIBRTDEF="$(LIBRTDEF)" $(MAKE) -C client all include/config.h: MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(BUILDTOPDIR)/build/genconfig.sh @@ -79,23 +83,23 @@ CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" RPATHOPT="$(RPATHOPT)" SSLLIBS="$(SSLLIBS)" NETLIBS="$(NETLIBS)" LIBRTDEF="$(LIBRTDEF)" XYMONHOME="$(XYMONHOME)" $(MAKE) -C build all lib-build: include/config.h - CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" OSDEF="$(OSDEF)" RPATHOPT="$(RPATHOPT)" PCREINCDIR="$(PCREINCDIR)" ZLIBINCDIR="$(ZLIBINCDIR)" SSLFLAGS="$(SSLFLAGS)" SSLINCDIR="$(SSLINCDIR)" SSLLIBS="$(SSLLIBS)" NETLIBS="$(NETLIBS)" LIBRTDEF="$(LIBRTDEF)" XYMONTOPDIR="$(XYMONTOPDIR)" XYMONLOGDIR="$(XYMONLOGDIR)" XYMONHOSTNAME="$(XYMONHOSTNAME)" XYMONHOSTIP="$(XYMONHOSTIP)" XYMONHOSTOS="$(XYMONHOSTOS)" $(MAKE) -C lib all + CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" OSDEF="$(OSDEF)" RPATHOPT="$(RPATHOPT)" PCREINCDIR="$(PCREINCDIR)" ZLIBINCDIR="$(ZLIBINCDIR)" SSLFLAGS="$(SSLFLAGS)" SSLINCDIR="$(SSLINCDIR)" SSLLIBS="$(SSLLIBS)" NETLIBS="$(NETLIBS)" LIBRTDEF="$(LIBRTDEF)" XYMONTOPDIR="$(XYMONTOPDIR)" XYMONHOME="$(XYMONHOME)" XYMONCLIENTHOME=$(XYMONCLIENTHOME) XYMONLOGDIR="$(XYMONLOGDIR)" XYMONHOSTNAME="$(XYMONHOSTNAME)" XYMONHOSTIP="$(XYMONHOSTIP)" XYMONHOSTOS="$(XYMONHOSTOS)" $(MAKE) -C lib all lib-client: - CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" OSDEF="$(OSDEF)" RPATHOPT="$(RPATHOPT)" PCREINCDIR="$(PCREINCDIR)" ZLIBINCDIR="$(ZLIBINCDIR)" SSLFLAGS="$(SSLFLAGS)" SSLINCDIR="$(SSLINCDIR)" SSLLIBS="$(SSLLIBS)" NETLIBS="$(NETLIBS)" LIBRTDEF="$(LIBRTDEF)" XYMONTOPDIR="$(XYMONTOPDIR)" XYMONLOGDIR="$(XYMONLOGDIR)" XYMONHOSTNAME="$(XYMONHOSTNAME)" XYMONHOSTIP="$(XYMONHOSTIP)" XYMONHOSTOS="$(XYMONHOSTOS)" LOCALCLIENT="$(LOCALCLIENT)" $(MAKE) -C lib client + CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" OSDEF="$(OSDEF)" RPATHOPT="$(RPATHOPT)" PCREINCDIR="$(PCREINCDIR)" ZLIBINCDIR="$(ZLIBINCDIR)" SSLFLAGS="$(SSLFLAGS)" SSLINCDIR="$(SSLINCDIR)" SSLLIBS="$(SSLLIBS)" NETLIBS="$(NETLIBS)" LIBRTDEF="$(LIBRTDEF)" XYMONTOPDIR="$(XYMONTOPDIR)" XYMONHOME="$(XYMONCLIENTHOME)" XYMONCLIENTHOME=$(XYMONCLIENTHOME) XYMONLOGDIR="$(XYMONLOGDIR)" XYMONHOSTNAME="$(XYMONHOSTNAME)" XYMONHOSTIP="$(XYMONHOSTIP)" XYMONHOSTOS="$(XYMONHOSTOS)" LOCALCLIENT="$(LOCALCLIENT)" $(MAKE) -C lib client common-build: lib-build CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" RPATHOPT="$(RPATHOPT)" SSLFLAGS="$(SSLFLAGS)" SSLINCDIR="$(SSLINCDIR)" SSLLIBS="$(SSLLIBS)" NETLIBS="$(NETLIBS)" ZLIBLIBS="$(ZLIBLIBS)" LIBRTDEF="$(LIBRTDEF)" XYMONHOME="$(XYMONHOME)" $(MAKE) -C common all common-client: lib-client - CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" RPATHOPT="$(RPATHOPT)" SSLFLAGS="$(SSLFLAGS)" SSLINCDIR="$(SSLINCDIR)" SSLLIBS="$(SSLLIBS)" NETLIBS="$(NETLIBS)" ZLIBLIBS="$(ZLIBLIBS)" LIBRTDEF="$(LIBRTDEF)" XYMONHOME="$(XYMONHOME)" $(MAKE) -C common client + CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" RPATHOPT="$(RPATHOPT)" SSLFLAGS="$(SSLFLAGS)" SSLINCDIR="$(SSLINCDIR)" SSLLIBS="$(SSLLIBS)" NETLIBS="$(NETLIBS)" ZLIBLIBS="$(ZLIBLIBS)" LIBRTDEF="$(LIBRTDEF)" XYMONHOME="$(XYMONCLIENTHOME)" $(MAKE) -C common client xymongen-build: lib-build common-build CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" RPATHOPT="$(RPATHOPT)" SSLFLAGS="$(SSLFLAGS)" SSLINCDIR="$(SSLINCDIR)" SSLLIBS="$(SSLLIBS)" NETLIBS="$(NETLIBS)" LIBRTDEF="$(LIBRTDEF)" XYMONHOME="$(XYMONHOME)" XYMONVAR="$(XYMONVAR)" HISTGRAPHDEF="$(HISTGRAPHDEF)" RUNTIMEDEFS="$(RUNTIMEDEFS)" PCREINCDIR="$(PCREINCDIR)" PCRELIBS="$(PCRELIBS)" ZLIBINCDIR="$(ZLIBINCDIR)" ZLIBLIBS="$(ZLIBLIBS)" $(MAKE) -C xymongen all xymonnet-build: lib-build common-build - CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" RPATHOPT="$(RPATHOPT)" SSLFLAGS="$(SSLFLAGS)" SSLINCDIR="$(SSLINCDIR)" SSLLIBS="$(SSLLIBS)" DOLDAP="$(DOLDAP)" LDAPFLAGS="$(LDAPFLAGS)" LDAPINCDIR="$(LDAPINCDIR)" LDAPLIBS="$(LDAPLIBS)" DOSNMP="$(DOSNMP)" NETLIBS="$(NETLIBS)" XYMONHOME="$(XYMONHOME)" ARESVER="$(ARESVER)" FPINGVER="$(FPINGVER)" RUNTIMEDEFS="$(RUNTIMEDEFS)" PCREINCDIR="$(PCREINCDIR)" PCRELIBS="$(PCRELIBS)" SQLITELIBS="$(SQLITELIBS)" ZLIBINCDIR="$(ZLIBINCDIR)" ZLIBLIBS="$(ZLIBLIBS)" LIBRTDEF="$(LIBRTDEF)" $(MAKE) -C xymonnet all + CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" RPATHOPT="$(RPATHOPT)" SSLFLAGS="$(SSLFLAGS)" SSLINCDIR="$(SSLINCDIR)" SSLLIBS="$(SSLLIBS)" DOLDAP="$(DOLDAP)" LDAPFLAGS="$(LDAPFLAGS)" LDAPINCDIR="$(LDAPINCDIR)" LDAPLIBS="$(LDAPLIBS)" DOSNMP="$(DOSNMP)" NETLIBS="$(NETLIBS)" XYMONHOME="$(XYMONHOME)" ARESVER="$(ARESVER)" FPINGVER="$(FPINGVER)" RUNTIMEDEFS="$(RUNTIMEDEFS)" PCREINCDIR="$(PCREINCDIR)" PCRELIBS="$(PCRELIBS)" SYSTEMCARES="$(SYSTEMCARES)" CARESINCDIR="$(CARESINCDIR)" CARESLIBS="$(CARESLIBS)" SQLITELIBS="$(SQLITELIBS)" ZLIBINCDIR="$(ZLIBINCDIR)" ZLIBLIBS="$(ZLIBLIBS)" LIBRTDEF="$(LIBRTDEF)" $(MAKE) -C xymonnet all xymonproxy-build: lib-build common-build CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" RPATHOPT="$(RPATHOPT)" SSLLIBS="$(SSLLIBS)" NETLIBS="$(NETLIBS)" LIBRTDEF="$(LIBRTDEF)" XYMONHOME="$(XYMONHOME)" $(MAKE) -C xymonproxy all @@ -107,7 +111,7 @@ CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" RPATHOPT="$(RPATHOPT)" DORRD="$(DORRD)" RRDDEF="$(RRDDEF)" RRDINCDIR="$(RRDINCDIR)" PCREINCDIR="$(PCREINCDIR)" ZLIBINCDIR="$(ZLIBINCDIR)" ZLIBLIBS="$(ZLIBLIBS)" SSLLIBS="$(SSLLIBS)" NETLIBS="$(NETLIBS)" RRDLIBS="$(RRDLIBS)" PCRELIBS="$(PCRELIBS)" LIBRTDEF="$(LIBRTDEF)" XYMONTOPDIR="$(XYMONTOPDIR)" XYMONHOME="$(XYMONHOME)" XYMONVAR="$(XYMONVAR)" XYMONLOGDIR="$(XYMONLOGDIR)" XYMONHOSTNAME="$(XYMONHOSTNAME)" XYMONHOSTIP="$(XYMONHOSTIP)" XYMONHOSTOS="$(XYMONHOSTOS)" XYMONUSER="$(XYMONUSER)" CGIDIR="$(CGIDIR)" SECURECGIDIR="$(SECURECGIDIR)" XYMONHOSTURL="$(XYMONHOSTURL)" XYMONCGIURL="$(XYMONCGIURL)" SECUREXYMONCGIURL="$(SECUREXYMONCGIURL)" MAILPROGRAM="$(MAILPROGRAM)" RUNTIMEDEFS="$(RUNTIMEDEFS)" INSTALLWWWDIR="$(INSTALLWWWDIR)" INSTALLETCDIR="$(INSTALLETCDIR)" $(MAKE) -C web all xymond-client: lib-client build-build common-client - CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" RPATHOPT="$(RPATHOPT)" RRDDEF="$(RRDDEF)" RRDINCDIR="$(RRDINCDIR)" PCREINCDIR="$(PCREINCDIR)" NETLIBS="$(NETLIBS)" RRDLIBS="$(RRDLIBS)" PCRELIBS="$(PCRELIBS)" ZLIBINCDIR="$(ZLIBINCDIR)" ZLIBLIBS="$(ZLIBLIBS)" XYMONTOPDIR="$(XYMONTOPDIR)" XYMONHOME="$(XYMONHOME)" XYMONVAR="$(XYMONVAR)" XYMONLOGDIR="$(XYMONLOGDIR)" XYMONHOSTNAME="$(XYMONHOSTNAME)" XYMONHOSTIP="$(XYMONHOSTIP)" XYMONHOSTOS="$(XYMONHOSTOS)" XYMONUSER="$(XYMONUSER)" CGIDIR="$(CGIDIR)" SECURECGIDIR="$(SECURECGIDIR)" XYMONHOSTURL="$(XYMONHOSTURL)" XYMONCGIURL="$(XYMONCGIURL)" SECUREXYMONCGIURL="$(SECUREXYMONCGIURL)" MAILPROGRAM="$(MAILPROGRAM)" RUNTIMEDEFS="$(RUNTIMEDEFS)" INSTALLWWWDIR="$(INSTALLWWWDIR)" INSTALLETCDIR="$(INSTALLETCDIR)" $(MAKE) -C xymond client + CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" RPATHOPT="$(RPATHOPT)" LIBRTDEF="$(LIBRTDEF)" RRDDEF="$(RRDDEF)" RRDINCDIR="$(RRDINCDIR)" PCREINCDIR="$(PCREINCDIR)" NETLIBS="$(NETLIBS)" RRDLIBS="$(RRDLIBS)" PCRELIBS="$(PCRELIBS)" ZLIBINCDIR="$(ZLIBINCDIR)" ZLIBLIBS="$(ZLIBLIBS)" XYMONTOPDIR="$(XYMONTOPDIR)" XYMONHOME="$(XYMONHOME)" XYMONVAR="$(XYMONVAR)" XYMONLOGDIR="$(XYMONLOGDIR)" XYMONHOSTNAME="$(XYMONHOSTNAME)" XYMONHOSTIP="$(XYMONHOSTIP)" XYMONHOSTOS="$(XYMONHOSTOS)" XYMONUSER="$(XYMONUSER)" CGIDIR="$(CGIDIR)" SECURECGIDIR="$(SECURECGIDIR)" XYMONHOSTURL="$(XYMONHOSTURL)" XYMONCGIURL="$(XYMONCGIURL)" SECUREXYMONCGIURL="$(SECUREXYMONCGIURL)" MAILPROGRAM="$(MAILPROGRAM)" RUNTIMEDEFS="$(RUNTIMEDEFS)" INSTALLWWWDIR="$(INSTALLWWWDIR)" INSTALLETCDIR="$(INSTALLETCDIR)" $(MAKE) -C xymond client docs-build: XYMONHOSTURL="$(XYMONHOSTURL)" $(MAKE) -C docs all @@ -169,6 +173,11 @@ install-dirs: mkdir -p $(INSTALLROOT)$(XYMONHOME) $(INSTALLROOT)$(XYMONHOME)/download $(INSTALLROOT)$(XYMONVAR) +ifndef PKGBUILD + chown $(XYMONUSER) $(INSTALLROOT)$(XYMONHOME) $(INSTALLROOT)$(XYMONHOME)/download $(INSTALLROOT)$(XYMONVAR) + chgrp `$(IDTOOL) -g $(XYMONUSER)` $(INSTALLROOT)$(XYMONHOME) $(INSTALLROOT)$(XYMONHOME)/download $(INSTALLROOT)$(XYMONVAR) + chmod 755 $(INSTALLROOT)$(XYMONHOME) $(INSTALLROOT)$(XYMONHOME)/download $(INSTALLROOT)$(XYMONVAR) +endif mkdir -p $(INSTALLROOT)$(INSTALLBINDIR) ifneq ($(INSTALLBINDIR),$(XYMONHOME)/bin) @@ -178,6 +187,7 @@ ifndef PKGBUILD chown $(XYMONUSER) $(INSTALLROOT)$(INSTALLBINDIR) chgrp `$(IDTOOL) -g $(XYMONUSER)` $(INSTALLROOT)$(INSTALLBINDIR) + chmod 755 $(INSTALLROOT)$(INSTALLBINDIR) endif mkdir -p $(INSTALLROOT)$(INSTALLETCDIR) @@ -188,6 +198,7 @@ ifndef PKGBUILD chown $(XYMONUSER) $(INSTALLROOT)$(INSTALLETCDIR) chgrp `$(IDTOOL) -g $(XYMONUSER)` $(INSTALLROOT)$(INSTALLETCDIR) + chmod 755 $(INSTALLROOT)$(INSTALLETCDIR) endif mkdir -p $(INSTALLROOT)$(INSTALLEXTDIR) @@ -198,6 +209,7 @@ ifndef PKGBUILD chown $(XYMONUSER) $(INSTALLROOT)$(INSTALLEXTDIR) chgrp `$(IDTOOL) -g $(XYMONUSER)` $(INSTALLROOT)$(INSTALLEXTDIR) + chmod 755 $(INSTALLROOT)$(INSTALLEXTDIR) endif mkdir -p $(INSTALLROOT)$(INSTALLTMPDIR) @@ -208,6 +220,7 @@ ifndef PKGBUILD chown $(XYMONUSER) $(INSTALLROOT)$(INSTALLTMPDIR) chgrp `$(IDTOOL) -g $(XYMONUSER)` $(INSTALLROOT)$(INSTALLTMPDIR) + chmod 755 $(INSTALLROOT)$(INSTALLTMPDIR) endif mkdir -p $(INSTALLROOT)$(INSTALLWEBDIR) @@ -218,6 +231,7 @@ ifndef PKGBUILD chown $(XYMONUSER) $(INSTALLROOT)$(INSTALLWEBDIR) chgrp `$(IDTOOL) -g $(XYMONUSER)` $(INSTALLROOT)$(INSTALLWEBDIR) + chmod 755 $(INSTALLROOT)$(INSTALLWEBDIR) endif mkdir -p $(INSTALLROOT)$(INSTALLWWWDIR) $(INSTALLROOT)$(INSTALLWWWDIR)/gifs $(INSTALLROOT)$(INSTALLWWWDIR)/help $(INSTALLROOT)$(INSTALLWWWDIR)/html $(INSTALLROOT)$(INSTALLWWWDIR)/menu $(INSTALLROOT)$(INSTALLWWWDIR)/notes $(INSTALLROOT)$(INSTALLWWWDIR)/rep $(INSTALLROOT)$(INSTALLWWWDIR)/snap $(INSTALLROOT)$(INSTALLWWWDIR)/wml @@ -228,6 +242,7 @@ ifndef PKGBUILD chown $(XYMONUSER) $(INSTALLROOT)$(INSTALLWWWDIR) $(INSTALLROOT)$(INSTALLWWWDIR)/gifs $(INSTALLROOT)$(INSTALLWWWDIR)/help $(INSTALLROOT)$(INSTALLWWWDIR)/html $(INSTALLROOT)$(INSTALLWWWDIR)/menu $(INSTALLROOT)$(INSTALLWWWDIR)/notes $(INSTALLROOT)$(INSTALLWWWDIR)/rep $(INSTALLROOT)$(INSTALLWWWDIR)/snap $(INSTALLROOT)$(INSTALLWWWDIR)/wml chgrp `$(IDTOOL) -g $(XYMONUSER)` $(INSTALLROOT)$(INSTALLWWWDIR) $(INSTALLROOT)$(INSTALLWWWDIR)/gifs $(INSTALLROOT)$(INSTALLWWWDIR)/help $(INSTALLROOT)$(INSTALLWWWDIR)/html $(INSTALLROOT)$(INSTALLWWWDIR)/menu $(INSTALLROOT)$(INSTALLWWWDIR)/notes $(INSTALLROOT)$(INSTALLWWWDIR)/rep $(INSTALLROOT)$(INSTALLWWWDIR)/snap $(INSTALLROOT)$(INSTALLWWWDIR)/wml + chmod 755 $(INSTALLROOT)$(INSTALLWWWDIR) $(INSTALLROOT)$(INSTALLWWWDIR)/gifs $(INSTALLROOT)$(INSTALLWWWDIR)/help $(INSTALLROOT)$(INSTALLWWWDIR)/html $(INSTALLROOT)$(INSTALLWWWDIR)/menu $(INSTALLROOT)$(INSTALLWWWDIR)/notes $(INSTALLROOT)$(INSTALLWWWDIR)/rep $(INSTALLROOT)$(INSTALLWWWDIR)/snap $(INSTALLROOT)$(INSTALLWWWDIR)/wml ifdef HTTPDGID # The www/rep and www/snap directories must be writable by the apache daemon chgrp $(HTTPDGID) $(INSTALLROOT)$(INSTALLWWWDIR)/rep $(INSTALLROOT)$(INSTALLWWWDIR)/snap @@ -239,48 +254,56 @@ ifndef PKGBUILD chown $(XYMONUSER) $(INSTALLROOT)$(XYMONVAR)/acks chgrp `$(IDTOOL) -g $(XYMONUSER)` $(INSTALLROOT)$(XYMONVAR)/acks + chmod 755 $(INSTALLROOT)$(XYMONVAR)/acks endif mkdir -p $(INSTALLROOT)$(XYMONVAR)/data ifndef PKGBUILD chown $(XYMONUSER) $(INSTALLROOT)$(XYMONVAR)/data chgrp `$(IDTOOL) -g $(XYMONUSER)` $(INSTALLROOT)$(XYMONVAR)/data + chmod 755 $(INSTALLROOT)$(XYMONVAR)/data endif mkdir -p $(INSTALLROOT)$(XYMONVAR)/disabled ifndef PKGBUILD chown $(XYMONUSER) $(INSTALLROOT)$(XYMONVAR)/disabled chgrp `$(IDTOOL) -g $(XYMONUSER)` $(INSTALLROOT)$(XYMONVAR)/disabled + chmod 755 $(INSTALLROOT)$(XYMONVAR)/disabled endif mkdir -p $(INSTALLROOT)$(XYMONVAR)/hist ifndef PKGBUILD chown $(XYMONUSER) $(INSTALLROOT)$(XYMONVAR)/hist chgrp `$(IDTOOL) -g $(XYMONUSER)` $(INSTALLROOT)$(XYMONVAR)/hist + chmod 755 $(INSTALLROOT)$(XYMONVAR)/hist endif mkdir -p $(INSTALLROOT)$(XYMONVAR)/histlogs ifndef PKGBUILD chown $(XYMONUSER) $(INSTALLROOT)$(XYMONVAR)/histlogs || echo "Warning: Could not set owner on the histlogs directory" chgrp `$(IDTOOL) -g $(XYMONUSER)` $(INSTALLROOT)$(XYMONVAR)/histlogs || echo "Warning: Could not set group on the histlogs directory" + chmod 755 $(INSTALLROOT)$(XYMONVAR)/histlogs endif mkdir -p $(INSTALLROOT)$(XYMONVAR)/hostdata ifndef PKGBUILD chown $(XYMONUSER) $(INSTALLROOT)$(XYMONVAR)/hostdata || echo "Warning: Could not set owner on the hostdata directory" chgrp `$(IDTOOL) -g $(XYMONUSER)` $(INSTALLROOT)$(XYMONVAR)/hostdata || echo "Warning: Could not set group on the hostdata directory" + chmod 755 $(INSTALLROOT)$(XYMONVAR)/hostdata endif mkdir -p $(INSTALLROOT)$(XYMONVAR)/logs ifndef PKGBUILD chown $(XYMONUSER) $(INSTALLROOT)$(XYMONVAR)/logs chgrp `$(IDTOOL) -g $(XYMONUSER)` $(INSTALLROOT)$(XYMONVAR)/logs + chmod 755 $(INSTALLROOT)$(XYMONVAR)/logs endif mkdir -p $(INSTALLROOT)$(XYMONVAR)/rrd ifndef PKGBUILD chown $(XYMONUSER) $(INSTALLROOT)$(XYMONVAR)/rrd chgrp `$(IDTOOL) -g $(XYMONUSER)` $(INSTALLROOT)$(XYMONVAR)/rrd + chmod 755 $(INSTALLROOT)$(XYMONVAR)/rrd endif install-common: install-dirs @@ -303,6 +326,7 @@ install-web: install-common DORRD="$(DORRD)" MANROOT="$(MANROOT)" XYMONTOPDIR="$(XYMONTOPDIR)" XYMONHOME="$(XYMONHOME)" XYMONVAR="$(XYMONVAR)" CGIDIR="$(CGIDIR)" SECURECGIDIR="$(SECURECGIDIR)" XYMONLOGDIR="$(XYMONLOGDIR)" XYMONUSER="$(XYMONUSER)" IDTOOL="$(IDTOOL)" PKGBUILD="$(PKGBUILD)" INSTALLROOT="$(INSTALLROOT)" INSTALLBINDIR="$(INSTALLBINDIR)" INSTALLETCDIR="$(INSTALLETCDIR)" INSTALLEXTDIR="$(INSTALLEXTDIR)" INSTALLTMPDIR="$(INSTALLTMPDIR)" INSTALLWEBDIR="$(INSTALLWEBDIR)" INSTALLWWWDIR="$(INSTALLWWWDIR)" $(MAKE) -C web install + find $(INSTALLROOT)$(INSTALLWWWDIR) -type f -exec chmod 644 {} \; # NOTE: This one is normally not used - man-page install is done by the sub-Makefiles during "make install" @@ -313,6 +337,7 @@ XYMONHOME="$(XYMONHOME)" MANROOT="$(MANROOT)" INSTALLROOT="$(INSTALLROOT)" $(MAKE) -C xymonproxy install-man XYMONHOME="$(XYMONHOME)" MANROOT="$(MANROOT)" INSTALLROOT="$(INSTALLROOT)" $(MAKE) -C xymond install-man XYMONHOME="$(XYMONHOME)" MANROOT="$(MANROOT)" INSTALLROOT="$(INSTALLROOT)" $(MAKE) -C web install-man + find $(INSTALLROOT)$(MANROOT) -type f -exec chmod 644 {} \; install-docs: XYMONHOME="$(XYMONHOME)" MANROOT="$(MANROOT)" XYMONUSER="$(XYMONUSER)" IDTOOL="$(IDTOOL)" PKGBUILD="$(PKGBUILD)" INSTALLROOT="$(INSTALLROOT)" INSTALLBINDIR="$(INSTALLBINDIR)" INSTALLETCDIR="$(INSTALLETCDIR)" INSTALLEXTDIR="$(INSTALLEXTDIR)" INSTALLTMPDIR="$(INSTALLTMPDIR)" INSTALLWEBDIR="$(INSTALLWEBDIR)" INSTALLWWWDIR="$(INSTALLWWWDIR)" $(MAKE) -C docs install @@ -324,7 +349,7 @@ client-install: install-client install-client: client - XYMONHOME="$(XYMONTOPDIR)/client" INSTALLROOT="$(INSTALLROOT)" XYMONUSER="$(XYMONUSER)" IDTOOL="$(IDTOOL)" PKGBUILD="$(PKGBUILD)" LOCALCLIENT="$(LOCALCLIENT)" $(MAKE) -C client install + XYMONHOME="$(XYMONCLIENTHOME)" INSTALLROOT="$(INSTALLROOT)" XYMONUSER="$(XYMONUSER)" IDTOOL="$(IDTOOL)" PKGBUILD="$(PKGBUILD)" LOCALCLIENT="$(LOCALCLIENT)" $(MAKE) -C client install install-clientmsg: @echo "" @@ -333,5 +358,5 @@ @echo "To start the Xymon client, as the $(XYMONUSER) user run '${XYMONHOME}/runclient.sh start'" install-localclient: - XYMONHOME="$(XYMONTOPDIR)/client" INSTALLROOT="$(INSTALLROOT)" XYMONUSER="$(XYMONUSER)" LOCALCLIENT="$(LOCALCLIENT)" $(MAKE) -C client install-localclient + XYMONHOME="$(XYMONCLIENTHOME)" INSTALLROOT="$(INSTALLROOT)" XYMONUSER="$(XYMONUSER)" IDTOOL="$(IDTOOL)" LOCALCLIENT="$(LOCALCLIENT)" $(MAKE) -C client install-localclient diff -Nru xymon-4.3.12~lucid/build/Makefile.test-cares xymon-4.3.17/build/Makefile.test-cares --- xymon-4.3.12~lucid/build/Makefile.test-cares 1970-01-01 00:00:00.000000000 +0000 +++ xymon-4.3.17/build/Makefile.test-cares 2014-02-04 16:07:16.000000000 +0000 @@ -0,0 +1,12 @@ +include Makefile.$(OS) +include Makefile.rules + +test-compile: + @$(CC) $(CFLAGS) $(CARESINC) -o test-cares.o -c test-cares.c + +test-link: + @$(CC) $(CFLAGS) $(CARESLIB) -o test-cares test-cares.o -lcares && ./test-cares $(ARESVER) + +ares-clean: + @rm -f test-cares.o test-cares + diff -Nru xymon-4.3.12~lucid/build/md5.dat xymon-4.3.17/build/md5.dat --- xymon-4.3.12~lucid/build/md5.dat 2013-04-21 13:27:50.000000000 +0000 +++ xymon-4.3.17/build/md5.dat 2014-02-23 09:44:57.000000000 +0000 @@ -73,6 +73,7 @@ md5:704d7803ae223200faf7d88f775addac webfiles/confreport_front md5:ba20d150c6e40573658a06f42f0594dc webfiles/confreport_header md5:d212a7ad882942aa236e85ef4ed615a9 webfiles/confreport_header +md5:179df9ba60e00a47c2bcfce43fe692a3 webfiles/critack_form md5:578c97c324eab20dc9037ed1b5427468 webfiles/critack_form md5:06b49128133a91498bd2e49429ceda25 webfiles/critedit_form md5:6dd58e48fe7d18233d4cafaf7d3004f4 webfiles/critedit_header @@ -205,6 +206,7 @@ md5:1a5ad876e1e60e8ff8b20f14d18adf33 webfiles/maint_form md5:2228bd803ecddda0c872a55b9bcce38c webfiles/maint_form md5:352b4de71f8e5459322ffb6e84d76e4a webfiles/maint_form +md5:a8a0c6187685fdb81d98e46a75751a56 webfiles/maint_form md5:b8ccc42a08ccc98a21323320986a1b8f webfiles/maint_form md5:03b90a406ad8188e0b14d01ac536f3fe webfiles/maint_header md5:31c57123b77c406f0d870eae82ccabb0 webfiles/maint_header diff -Nru xymon-4.3.12~lucid/build/merge-lines.c xymon-4.3.17/build/merge-lines.c --- xymon-4.3.12~lucid/build/merge-lines.c 2011-12-13 11:00:41.000000000 +0000 +++ xymon-4.3.17/build/merge-lines.c 2014-01-26 10:38:27.000000000 +0000 @@ -92,7 +92,7 @@ continue; } - if ((strncmp(bol, "include ", 8) == 0) || (strncmp(bol, "directory ", 10) == 0)) { + if (tail && ((strncmp(bol, "include ", 8) == 0) || (strncmp(bol, "directory ", 10) == 0))) { if (!tail->extralines) { tail->extracount = 1; tail->extralines = (char **)malloc(sizeof(char *)); @@ -190,6 +190,8 @@ unlink(curfn); curfd = fopen(curfn, "w"); if (srcfd == NULL) { printf("Cannot open template file %s\n", srcfn); return 1; } if (curfd == NULL) { printf("Cannot create config file %s\n", curfn); return 1; } + fchmod(fileno(curfd), S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); + while (fgets(l, sizeof(l), srcfd)) { char *bol, *p; diff -Nru xymon-4.3.12~lucid/build/merge-sects.c xymon-4.3.17/build/merge-sects.c --- xymon-4.3.12~lucid/build/merge-sects.c 2008-09-30 16:37:31.000000000 +0000 +++ xymon-4.3.17/build/merge-sects.c 2014-01-07 21:43:56.000000000 +0000 @@ -117,6 +117,7 @@ unlink(curfn); curfd = fopen(curfn, "w"); if (srcfd == NULL) { printf("Cannot open template file %s\n", srcfn); return 1; } if (curfd == NULL) { printf("Cannot open config file %s\n", curfn); return 1; } + fchmod(fileno(curfd), S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); while (fgets(l, sizeof(l), srcfd)) { char *bol, *p; diff -Nru xymon-4.3.12~lucid/build/pcre.sh xymon-4.3.17/build/pcre.sh --- xymon-4.3.12~lucid/build/pcre.sh 2013-07-30 06:31:17.000000000 +0000 +++ xymon-4.3.17/build/pcre.sh 2012-07-23 11:07:51.000000000 +0000 @@ -2,7 +2,7 @@ PCREINC="" PCRELIB="" - for DIR in /opt/pcre* /usr/local/pcre* /usr/local /usr/pkg /opt/csw /opt/sfw /lib + for DIR in /opt/pcre* /usr/local/pcre* /usr/local /usr/pkg /opt/csw /opt/sfw do if test -f $DIR/include/pcre.h then @@ -29,18 +29,6 @@ then PCRELIB=$DIR/lib64 fi - if test -f $DIR/libpcre.so - then - PCRELIB=$DIR - fi - if test -f $DIR/lib/x86_64-linux-gnu/libpcre.so - then - PCRELIB=$DIR/lib/x86_64-linux-gnu - fi - if test -f $DIR/lib/i386-linux-gnu/libpcre.so - then - PCRELIB=$DIR/lib/i386-linux-gnu - fi done if test "$USERPCREINC" != ""; then diff -Nru xymon-4.3.12~lucid/build/setup-newfiles.c xymon-4.3.17/build/setup-newfiles.c --- xymon-4.3.12~lucid/build/setup-newfiles.c 2012-07-16 11:08:37.000000000 +0000 +++ xymon-4.3.17/build/setup-newfiles.c 2014-01-07 21:43:56.000000000 +0000 @@ -109,9 +109,9 @@ fprintf(stderr, "Cannot create output file %s: %s\n", destfn, strerror(errno)); return 1; } + fchmod(fileno(outfd), S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); while ( (n = fread(buf, 1, sizeof(buf), infd)) > 0) fwrite(buf, 1, n, outfd); fclose(infd); fclose(outfd); - chmod(destfn, st.st_mode); } else if (S_ISDIR(st.st_mode)) { struct stat tmpst; @@ -129,7 +129,7 @@ /* Create the directory itself */ if (stat(destfn, &tmpst) == -1) mkdir(destfn, st.st_mode); - chmod(destfn, st.st_mode); + chmod(destfn, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH); } else if (S_ISLNK(st.st_mode)) { char ldest[PATH_MAX + 1]; diff -Nru xymon-4.3.12~lucid/build/test-bintree.c xymon-4.3.17/build/test-bintree.c --- xymon-4.3.12~lucid/build/test-bintree.c 1970-01-01 00:00:00.000000000 +0000 +++ xymon-4.3.17/build/test-bintree.c 2014-02-08 21:49:50.000000000 +0000 @@ -0,0 +1,50 @@ +#include +#include +#include +#include + +void *root = NULL; + +int compare(const void *pa, const void *pb) +{ + if (*(int *) pa < *(int *) pb) return -1; + if (*(int *) pa > *(int *) pb) return 1; + return 0; +} + +void action(const void *nodep, const VISIT which, const int depth) +{ + int *datap; + + switch (which) { + case preorder: + case endorder: + break; + case postorder: + case leaf: + datap = *(int **) nodep; + printf("%6d\n", *datap); + break; + } +} + +int main(void) +{ + int i, *ptr; + void *val; + + srand(time(NULL)); + for (i = 0; i < 12; i++) { + ptr = malloc(sizeof(int)); + *ptr = rand() & 0xff; + + val = tsearch((void *) ptr, &root, compare); + if (val == NULL) + exit(EXIT_FAILURE); + else if ((*(int **) val) != ptr) + free(ptr); + } + twalk(root, action); + exit(EXIT_SUCCESS); +} + diff -Nru xymon-4.3.12~lucid/build/test-cares.c xymon-4.3.17/build/test-cares.c --- xymon-4.3.12~lucid/build/test-cares.c 1970-01-01 00:00:00.000000000 +0000 +++ xymon-4.3.17/build/test-cares.c 2014-02-04 16:07:16.000000000 +0000 @@ -0,0 +1,68 @@ +#include +#include +#include + +#include +#include +#include + + +int main(int argc, char *argv[]) +{ + static ares_channel mychannel; + struct ares_options options; + int status, version, ver_maj, ver_min, ver_patch; + int ver_maj_required, ver_min_required, ver_patch_required, failed = 0; + const char *versionstr; + char *version_required, *tok; + + version_required = strdup(argv[1]); + tok = strtok(version_required, "."); ver_maj_required = atoi(tok); + tok = strtok(NULL, "."); ver_min_required = atoi(tok); + tok = strtok(NULL, "."); ver_patch_required = atoi(tok); + + versionstr = ares_version(&version); + ver_maj = ((version >> 16) & 0xFF); + ver_min = ((version >> 8) & 0xFF); + ver_patch = (version & 0xFF); + if (ver_maj > ver_maj_required) + failed = 0; + else if (ver_maj < ver_maj_required) + failed = 1; + else { + /* Major version matches */ + if (ver_min > ver_min_required) + failed = 0; + else if (ver_min < ver_min_required) + failed = 1; + else { + /* Major and minor version matches */ + if (ver_patch > ver_patch_required) + failed = 0; + else if (ver_patch < ver_patch_required) + failed = 1; + else { + /* Major, minor and patch matches */ + failed = 0; + } + } + } + printf("C-ARES version: Found %d.%d.%d - %s, require %d.%d.%d\n", + ver_maj, ver_min, ver_patch, + (failed ? "too old, will use included version" : "OK"), + ver_maj_required, ver_min_required, ver_patch_required ); + + /* ARES timeout backported from Xymon trunk 20120411 - this should give us a ~23 second timeout */ + options.timeout = 2000; + options.tries = 4; + + status = ares_init_options(&mychannel, &options, (ARES_OPT_TIMEOUTMS | ARES_OPT_TRIES)); + if (status != ARES_SUCCESS) { + printf("c-ares init failed\n"); + return 1; + } + + ares_destroy(mychannel); + return (failed ? 1 : 0); +} + diff -Nru xymon-4.3.12~lucid/build/test-clockgettime-librt.c xymon-4.3.17/build/test-clockgettime-librt.c --- xymon-4.3.12~lucid/build/test-clockgettime-librt.c 2008-09-30 16:37:31.000000000 +0000 +++ xymon-4.3.17/build/test-clockgettime-librt.c 2014-01-07 12:46:34.000000000 +0000 @@ -1,3 +1,4 @@ +#include #include #include #include diff -Nru xymon-4.3.12~lucid/build/test-ldap.c xymon-4.3.17/build/test-ldap.c --- xymon-4.3.12~lucid/build/test-ldap.c 2013-07-30 06:31:48.000000000 +0000 +++ xymon-4.3.17/build/test-ldap.c 2012-07-13 16:50:38.000000000 +0000 @@ -2,7 +2,6 @@ #include #include -#define LDAP_DEPRECATED 1 #include #include diff -Nru xymon-4.3.12~lucid/Changes xymon-4.3.17/Changes --- xymon-4.3.12~lucid/Changes 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/Changes 2014-02-23 09:44:57.000000000 +0000 @@ -1,3 +1,139 @@ +Changes from 4.3.16 -> 4.3.17 (23 Feb 2014) +=========================================== + +* rev 7446 + +* Fix crash in xymond when using 'schedule' command +* Configure/build/install fixes: + - Allow specifying location of the PCRE include/library files + for client-side configuration build. + - Pass IDTOOL to client installation (for Solaris). + - Fix broken configure+Makefiles for client-side configuration + - C-ARES: Fix wrong call to Makefile.test-cares during configure + - Dont error out if www-dir or man-dir is empty. Mostly an + issue when building packages with non-standard layouts. +* Fix wrong timestamp on a new status arriving with a non-green + status while DOWNTIME was active. Such a status would appear to + have been created on Jan 1st, 1970. +* Fix hostgraphs so it obeys RRDWIDTH / RRDHEIGHT settings +* Add upper limit to showgraph CGI when generating self-referring URI's + From Werner Maier +* Extra sanity check on extcombo message offsets. +* The Enable/Disable webpage now permits filtering on CLASS value. + From Galen Johnson + + +Changes from 4.3.15 -> 4.3.16 (9 Feb 2014) +========================================== + +* rev 7394 + +* Fix xymonnet crash on sending http test results +* Fix xymond crash if client-local.cfg contains empty sections +* Fix RPM-based initscript for clients with explicit hostname +* Fix misleading error-message when testing for C-ARES library +* Fix client-local.cfg handling, so by default it will not merge + sections together, i.e. behave like previous 4.x releases. + NOTE: The new regexp matching can still be used. +* Add "--merge-clientlocal" option for xymond, which causes it + to merge all matching sections from client-local.cfg into one. +* Use native POSIX binary-tree handling code + + +Changes from 4.3.14 -> 4.3.15 (31 Jan 2014) +=========================================== + +* rev 7384 + +* Fix xymond_alert crashes introduced in 4.3.14 +* Fix missing C-ARES build files +* client-local.cfg: Support expression matching of sections +* acknowledge.cgi: Acks are enabled for all ALERTCOLORS, not just red and yellow + + +Changes from 4.3.13 -> 4.3.14 (26 Jan 2014) +=========================================== + +* rev 7377 + +* Fix critical ack not working for hosts where the display-name is + set (via "NAME:" tag). From Any Smith. +* SNI (Server Name Indication) causes some SSL connections to fail + due to server-side buggy SSL implementations. Add "sni" and "nosni" + flags to control SNI for specific hosts, and "--sni" option for + xymonnet to control the default. Reported by Mark Felder. +* Fix build process to fully obey any XYMONTOPDIR setting from the + top-level Makefile. NOTE: Client-only builds no longer install the + client in a "client/" subdirectory below XYMONHOME. +* Fix showgraph so it silently ignores stale rrdctl files when trying + to flush RRD data before showing a graph. +* Fix xymond_alert crashing when trying to strip characters + from the alert message. Bug introduced in 4.3.13. +* Fix Solaris client to report memory even when no swap is configured. +* Fix bug where alerts that were initially suppressed due to TIME + restrictions are delayed until REPEAT interval expires. +* Fix crash in xymonlaunch when trying to find tasks.cfg +* Fix HTML generated by acknowledge.cgi (missing '>') +* Fix Linux client reporting garbled client data if top output ends + without a new-line (causes CPU load and other vmstat graphs to + stop updating) +* Fix Debian installation so it enables Apache mod_rewrite +* Fix merge-lines utility crashing when first line was an include +* Fix "make install" failing when server/www/help was a symlink +* Document existing OPTIONAL setting in analysis.cfg for file-checks + on files which may not exist. +* Document existing CLASS setting in alerts.cfg +* Add new INFOCOLUMNGIF and TRENDSCOLUMNGIF settings so the icons + used for these pages are configurable. +* Enhance Solaris client to correctly handle Solaris zones. +* Add new search facilities to xymond to select hosts with the + 'xymondboard' and 'hostinfo' commands. +* New --ack-each-color option for xymondd changes ack behaviour so a + yellow ack does not apply when status changed to red, but a red ack + applies if status goes yellow +* New "headermatch" tag for http tests so content checks can look at + HTTP headers in addition to the HTML body. +* Use system-wide c-ares library. The pre-built Debian packages now + require the "libc-ares2" package. + + +Changes from 4.3.12 -> 4.3.13 (08 Jan 2014) +=========================================== +* rev 7339 + +* Fixes to FreeBSD client code, from Mark Felder (FreeBSD maintainer) +* Fix crash on "client" data sent via status channel when host is unknown +* Strip carriage-return from text sent to mail alerts, to avoid mail + programs treating the message as binary and putting it in an attachment +* xymonnet network tester supports Server Name Indication (SNI) for SSL + enabled virtual websites. +* HTTP tests now use "Cache-control" header for HTTP/1.1 (default) and + "Pragma" for HTTP/1.0, so it is protocol compliant. +* netbios-ssn, snpp and lpd protocol.cfg entries (Tom Schmidt) +* "temperature" status strips html tags from sensor names (Tom Schmidt) +* Extra "total network I/O" line on ifstat graph (Tom Schmidt) +* New "backfeed" queue for high-speed transmission of Xymon status updates + between modules located on the same server as xymond. Note: This is + disabled by default, see the README.backfeed file. +* New "extcombo" message type allows for combo messages of all types + (usually "status" and "data"). +* Status webpage will return an HTTP error code for invalid requests + instead of reporting an Ok status (some log analysis tools warn + about attack attempts when an 'OK' status is reported). +* New setting IMAGEFILETYPE removes hardcoded ".gif" on the various + image-files in the "gifs" directory. Directory name is unchanged, though. +* FreeBSD: Change from maintainer to enable building with CLANG. +* New modifier for https tests for selecting only TLSv1 as protocol +* CGI's now return a proper HTTP status code in case of errors (e.g. "404" + when requesting a status for a non-existing host). +* Fix problem with xymond_rrd dying if an external processors crashes + (from J. Cleaver) +* Fix configure/build problem with detecting POSIX realtime-clock functions. +* Fix for FreeBSD 5+ vmstat reporting (from Jeremy Laidman) +* Fix for "make install" not setting correct file/directory permissions +* Re-add the "--hf-file" option for criticalview CGI (removed in 4.3.7) + + Changes from 4.3.11 -> 4.3.12 (24 Jul 2013) =========================================== * rev 7211 diff -Nru xymon-4.3.12~lucid/client/freebsd-meminfo.c xymon-4.3.17/client/freebsd-meminfo.c --- xymon-4.3.12~lucid/client/freebsd-meminfo.c 2011-07-31 21:01:52.000000000 +0000 +++ xymon-4.3.17/client/freebsd-meminfo.c 2013-07-24 14:52:08.000000000 +0000 @@ -9,7 +9,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: freebsd-meminfo.c 6712 2011-07-31 21:01:52Z storner $"; +static char rcsid[] = "$Id: freebsd-meminfo.c 7213 2013-07-24 14:52:08Z storner $"; #include #include @@ -23,7 +23,7 @@ unsigned long physmem; int hw_pagesize[] = { CTL_HW, HW_PAGESIZE }; - unsigned long pagesize; + int pagesize; int vm_vmtotal[] = { CTL_VM, VM_METER }; struct vmtotal vmdata; diff -Nru xymon-4.3.12~lucid/client/Makefile xymon-4.3.17/client/Makefile --- xymon-4.3.12~lucid/client/Makefile 2012-11-14 11:29:54.000000000 +0000 +++ xymon-4.3.17/client/Makefile 2014-01-07 21:43:56.000000000 +0000 @@ -62,14 +62,14 @@ $(CC) -o $@ netbsd-meminfo.c install: - if test ! -d $(INSTALLROOT)$(XYMONHOME) ; then mkdir -p $(INSTALLROOT)$(XYMONHOME) ; fi - if test ! -d $(INSTALLROOT)$(XYMONHOME)/bin ; then mkdir -p $(INSTALLROOT)$(XYMONHOME)/bin ; fi - if test ! -d $(INSTALLROOT)$(XYMONHOME)/etc ; then mkdir -p $(INSTALLROOT)$(XYMONHOME)/etc ; fi - if test ! -d $(INSTALLROOT)$(XYMONHOME)/tmp ; then mkdir -p $(INSTALLROOT)$(XYMONHOME)/tmp ; fi - if test ! -d $(INSTALLROOT)$(XYMONHOME)/logs ; then mkdir -p $(INSTALLROOT)$(XYMONHOME)/logs ; fi - if test ! -d $(INSTALLROOT)$(XYMONHOME)/ext ; then mkdir -p $(INSTALLROOT)$(XYMONHOME)/ext ; fi - if test ! -d $(INSTALLROOT)$(XYMONHOME)/local ; then mkdir -p $(INSTALLROOT)$(XYMONHOME)/local ; fi - if test ! -f $(INSTALLROOT)$(XYMONHOME)/etc/localclient.cfg ; then cp localclient.cfg $(INSTALLROOT)$(XYMONHOME)/etc/ ; fi + if test ! -d $(INSTALLROOT)$(XYMONHOME) ; then mkdir -p $(INSTALLROOT)$(XYMONHOME) ; chmod 755 $(INSTALLROOT)$(XYMONHOME) ; fi + if test ! -d $(INSTALLROOT)$(XYMONHOME)/bin ; then mkdir -p $(INSTALLROOT)$(XYMONHOME)/bin ; chmod 755 $(INSTALLROOT)$(XYMONHOME)/bin ; fi + if test ! -d $(INSTALLROOT)$(XYMONHOME)/etc ; then mkdir -p $(INSTALLROOT)$(XYMONHOME)/etc ; chmod 755 $(INSTALLROOT)$(XYMONHOME)/etc ; fi + if test ! -d $(INSTALLROOT)$(XYMONHOME)/tmp ; then mkdir -p $(INSTALLROOT)$(XYMONHOME)/tmp ; chmod 755 $(INSTALLROOT)$(XYMONHOME)/tmp ; fi + if test ! -d $(INSTALLROOT)$(XYMONHOME)/logs ; then mkdir -p $(INSTALLROOT)$(XYMONHOME)/logs ; chmod 755 $(INSTALLROOT)$(XYMONHOME)/logs ; fi + if test ! -d $(INSTALLROOT)$(XYMONHOME)/ext ; then mkdir -p $(INSTALLROOT)$(XYMONHOME)/ext ; chmod 755 $(INSTALLROOT)$(XYMONHOME)/ext ; fi + if test ! -d $(INSTALLROOT)$(XYMONHOME)/local ; then mkdir -p $(INSTALLROOT)$(XYMONHOME)/local ; chmod 755 $(INSTALLROOT)$(XYMONHOME)/local; fi + if test ! -f $(INSTALLROOT)$(XYMONHOME)/etc/localclient.cfg ; then cp localclient.cfg $(INSTALLROOT)$(XYMONHOME)/etc/ ; chmod 644 $(INSTALLROOT)$(XYMONHOME)/etc/localclient.cfg; fi if test ! -f $(INSTALLROOT)$(XYMONHOME)/local/README; then cp README-local $(INSTALLROOT)$(XYMONHOME)/local/README ; chmod 644 $(INSTALLROOT)$(XYMONHOME)/local/README; fi chmod 755 runclient.sh $(PROGRAMS) xymonclient*.sh $(COMMONTOOLS) $(EXTRATOOLS) cp -fp runclient.sh $(INSTALLROOT)$(XYMONHOME) diff -Nru xymon-4.3.12~lucid/client/xymonclient-freebsd.sh xymon-4.3.17/client/xymonclient-freebsd.sh --- xymon-4.3.12~lucid/client/xymonclient-freebsd.sh 2012-08-01 16:16:57.000000000 +0000 +++ xymon-4.3.17/client/xymonclient-freebsd.sh 2013-07-24 14:52:08.000000000 +0000 @@ -10,7 +10,7 @@ # # #----------------------------------------------------------------------------# # -# $Id: xymonclient-freebsd.sh 7149 2012-08-01 16:16:57Z storner $ +# $Id: xymonclient-freebsd.sh 7213 2013-07-24 14:52:08Z storner $ echo "[date]" date @@ -51,7 +51,7 @@ echo "[netstat]" netstat -s echo "[ports]" -(netstat -na -f inet; netstat -na -f inet6) | grep "^tcp" +(netstat -Wna -f inet; netstat -Wna -f inet6) | grep "^tcp" echo "[ps]" # Dont use "args". "command" works also in FreeBSD 4.x. ps -ax -ww -o pid,ppid,user,start,state,pri,pcpu,cputime,pmem,rss,vsz,command diff -Nru xymon-4.3.12~lucid/client/xymonclient-linux.sh xymon-4.3.17/client/xymonclient-linux.sh --- xymon-4.3.12~lucid/client/xymonclient-linux.sh 2013-07-23 12:20:59.000000000 +0000 +++ xymon-4.3.17/client/xymonclient-linux.sh 2014-01-23 20:42:41.000000000 +0000 @@ -9,7 +9,7 @@ # # #----------------------------------------------------------------------------# # -# $Id: xymonclient-linux.sh 7204 2013-07-23 12:20:59Z storner $ +# $Id: xymonclient-linux.sh 7362 2014-01-23 20:42:41Z storner $ echo "[date]" date @@ -18,10 +18,10 @@ echo "[osversion]" if [ -x /bin/lsb_release ]; then /bin/lsb_release -r -i -s | xargs echo - /bin/lsb_release -a + /bin/lsb_release -a 2>/dev/null elif [ -x /usr/bin/lsb_release ]; then /usr/bin/lsb_release -r -i -s | xargs echo - /usr/bin/lsb_release -a + /usr/bin/lsb_release -a 2>/dev/null elif [ -f /etc/redhat-release ]; then cat /etc/redhat-release elif [ -f /etc/gentoo-release ]; then @@ -83,6 +83,8 @@ then echo "[top]" $TOP -b -n 1 + # Some top versions do not finish off the last line of output + echo "" fi fi diff -Nru xymon-4.3.12~lucid/client/xymonclient-sunos.sh xymon-4.3.17/client/xymonclient-sunos.sh --- xymon-4.3.12~lucid/client/xymonclient-sunos.sh 2012-08-01 16:16:57.000000000 +0000 +++ xymon-4.3.17/client/xymonclient-sunos.sh 2014-01-19 21:26:25.000000000 +0000 @@ -9,7 +9,14 @@ # # #----------------------------------------------------------------------------# # -# $Id: xymonclient-sunos.sh 7149 2012-08-01 16:16:57Z storner $ +# $Id: xymonclient-sunos.sh 7356 2014-01-19 21:26:25Z storner $ + +# Work out what type of environment we are on +# +# this will return the zone name on any non-global solaris zone +# or the word "Global" on any global solaris zone +# or the word "global" on any standalone solaris platform, including LDOMS +(/usr/sbin/zoneadm list 2>/dev/null || echo 1) | wc -l | grep '\<1\>' > /dev/null 2>&1 && ZTYPE=`/bin/zonename 2>/dev/null || echo global` || ZTYPE='Global' echo "[date]" date @@ -26,11 +33,25 @@ ROOTFSTYPE=`/bin/df -n / | awk '{print $3}'` /bin/df -F $ROOTFSTYPE -k # Then see what fs types are in use, and weed out those we dont want. -FSTYPES=`/bin/df -n -l|cut -d: -f2 | awk '{print $1}'|egrep -v "^${ROOTFSTYPE}|^proc|^fd|^mntfs|^ctfs|^devfs|^objfs|^nfs|^lofs"|sort|uniq` -set $FSTYPES -while test "$1" != ""; do - /bin/df -F $1 -k | grep -v " /var/run" | tail +2 - shift +case $ZTYPE in +global|Global) + FSTYPES=`/bin/df -n -l|cut -d: -f2 | awk '{print $1}'|egrep -v "^${ROOTFSTYPE}|^proc|^fd|^mntfs|^ctfs|^devfs|^objfs|^nfs|^lofs|^tmpfs|^sharefs"|sort|uniq` + ;; +*) + # zones are frequently type lofs so deal with them specially + FSTYPES=`/bin/df -n -l|cut -d: -f2 | awk '{print $1}'|egrep -v "^${ROOTFSTYPE}|^proc|^fd|^mntfs|^ctfs|^devfs|^objfs|^nfs|^tmpfs|^sharefs"|sort|uniq` + ;; +esac +# $FSTYPES may be empty +for fst in $FSTYPES; do + case $ZTYPE in + global|Global) + /bin/df -F $fst -k | grep -v " /var/run" | tail +2 + ;; + *) + /bin/df -F $fst -k | egrep -v "( /var/run|^(/dev|/platform/))" | tail +2 + ;; + esac done # This only works for ufs filesystems @@ -47,13 +68,55 @@ echo "[mount]" mount echo "[prtconf]" -/usr/sbin/prtconf +case $ZTYPE in +global|Global) + /usr/sbin/prtconf 2>&1 + ;; +*) + # provided by the firmware (PROM) since devinfo facility not available + # in a zone + /usr/sbin/prtconf -p 2>&1 + ;; +esac echo "[memory]" -vmstat 1 2 | tail -1 +case $ZTYPE in +global|Global) + vmstat 1 2 | tail -1 + ;; +*) + # need to modify vmstat output in a non-global zone + VMSTAT=`vmstat 1 2 | tail -1` + # cut out the useable parts + VMFR=`echo $VMSTAT | cut -d " " -f1,2,3` + VMBK=`echo $VMSTAT | cut -d " " -f6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22` + # get the total memory for the platform + TMEM=`/usr/sbin/prtconf 2>&1 | grep Memory | cut -d" " -f3` + TMEM=`expr $TMEM "*" 1024` + # get the total allocated and reserved swap + SUSED=`swap -s | cut -d "=" -f2 | cut -d "," -f1 | cut -d " " -f2 | cut -d "k" -f1` + # work out the RSS for this zone + TUSED=`prstat -Z -n 1,1 1 1 | \ + nawk ' NR == 4 { + do { + if ($4 ~ /G$/) { sub(/G$/,"",$4); print $4*1024*1024; break; } + if ($4 ~ /M$/) { sub(/M$/,"",$4); print $4*1024; break; } + if ($4 ~ /K$/) { sub(/K$/,"",$4); print $4; break; } + print "unknown" + } while (0)}'` + TUSED=`expr $TMEM "-" $TUSED` + echo "$VMFR $SUSED $TUSED $VMBK" + ;; +esac echo "[swap]" /usr/sbin/swap -s -echo "[swaplist]" -/usr/sbin/swap -l +# dont report the swaplist in a non-global zone because it will cause the +# server client module to miscalculate memory +case $ZTYPE in +global|Global) + echo "[swaplist]" + /usr/sbin/swap -l 2>/dev/null + ;; +esac echo "[ifconfig]" ifconfig -a echo "[route]" @@ -65,9 +128,28 @@ netstat -na -f inet6 -P tcp | tail +5 echo "[ifstat]" # Leave out the wrmsd and mac interfaces. See http://www.xymon.com/archive/2009/06/msg00204.html -/usr/bin/kstat -p -s '[or]bytes64' | egrep -v 'wrsmd|mac' | sort +case $ZTYPE in +global|Global) + /usr/bin/kstat -p -s '[or]bytes64' | egrep -v 'wrsmd|mac' | sort + ;; +*) + # find out which nics are configured into this zone + MYNICS=`netstat -i |cut -f1 -d" " | egrep -i -v "Name|lo|^$" |paste -s -d"|" - ` + /usr/bin/kstat -p -s '[or]bytes64' | egrep "$MYNICS"| sort + ;; +esac echo "[ps]" -ps -A -o pid,ppid,user,stime,s,pri,pcpu,time,pmem,rss,vsz,args +case $ZTYPE in +global) + /bin/ps -A -o pid,ppid,user,stime,s,pri,pcpu,time,pmem,rss,vsz,args + ;; +Global) + /bin/ps -A -o zone,pid,ppid,user,stime,class,s,pri,pcpu,time,pmem,rss,vsz,args | sort + ;; +*) + /bin/ps -A -o pid,ppid,user,stime,class,s,pri,pcpu,time,pmem,rss,vsz,args + ;; +esac # If TOP is defined, then use it. If not, fall back to the Solaris prstat command. echo "[top]" diff -Nru xymon-4.3.12~lucid/common/clientlaunch.cfg.5 xymon-4.3.17/common/clientlaunch.cfg.5 --- xymon-4.3.12~lucid/common/clientlaunch.cfg.5 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/common/clientlaunch.cfg.5 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH CLIENTLAUNCH.CFG 5 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH CLIENTLAUNCH.CFG 5 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME clientlaunch.cfg \- Task definitions for the xymonlaunch utility diff -Nru xymon-4.3.12~lucid/common/clientupdate.1 xymon-4.3.17/common/clientupdate.1 --- xymon-4.3.12~lucid/common/clientupdate.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/common/clientupdate.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH CLIENTUPDATE 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH CLIENTUPDATE 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME clientupdate \- Xymon client update utility .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/common/hosts.cfg.5 xymon-4.3.17/common/hosts.cfg.5 --- xymon-4.3.12~lucid/common/hosts.cfg.5 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/common/hosts.cfg.5 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH HOSTS.CFG 5 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH HOSTS.CFG 5 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME hosts.cfg \- Main Xymon configuration file @@ -279,13 +279,15 @@ .IP "CLASS:Classname" Force the host to belong to a specific class. Class-names are used when configuring log-file monitoring (they can be used as references in -.I client-local.cfg(5) -and +.I client-local.cfg(5), .I analysis.cfg(5) -to group log file checks). Normally, class-names are controlled on the +and +.I alerts.cfg(5) +to group log file checks or alerts). Normally, class-names are controlled on the client by starting the Xymon client with the "--class=Classname" option. If you specify it in the hosts.cfg file on the Xymon server, it overrides -any class name that the client reports. +any class name that the client reports. If not set, then the host belongs +to a class named by the operating system the Xymon client is running on. .IP dialup The keyword "dialup" for a host means that it is OK for it to be @@ -581,7 +583,7 @@ Define the number of days before an SSL certificate expires, in which the sslcert status shows a warning (yellow) or alarm (red) status. These default to the values from the -"--sslwarndays" and "--sslalarmdays" options for the +"--sslwarn" and "--sslalarm" options for the .I xymonnet(1) tool; the values specified in the "ssldays" tag overrides the default. @@ -593,6 +595,22 @@ test will go red. E.g. to check that your server only uses strong encryption (128 bits or better), use "sslbits=128". +.IP sni +.IP nosni +Enables or disables use of SNI (Server Name Indication) for SSL tests. + +Some SSL implementations cannot handle SSL handshakes with SNI +data, so Xymon by default does not use SNI. This default can be +changed with the "--sni" option for +.I xymonnet(1) +but can also be managed per host with these tags. + +SNI support was added in Xymon 4.3.13, where the default was to +use SNI. This was changed in 4.3.14 so SNI support is disabled by +default, and the "sni" and "nosni" tags were introduced together +with the "--sni" option for xymonnet. + + .IP DOWNTIME=day:starttime:endtime[,day:starttime:endtime] .IP DOWNTIME=columns:day:starttime:endtime:cause[,columns:day:starttime:endtime:cause] This tag can be used to ignore failed checks during @@ -979,6 +997,8 @@ .br * "3", e.g. https3://www.sample.com/ : use only SSLv3 .br +* "t", e.g. httpst://www.sample.com/ : use only TLSv1 +.br * "m", e.g. httpsm://www.sample.com/ : use only 128-bit ciphers .br * "h", e.g. httpsh://www.sample.com/ : use only >128-bit ciphers @@ -1235,6 +1255,11 @@ tag will keep this information from showing up on the status webpages. +.IP headermatch +Content checks by default only search the HTML body returned by +the webserver. This option causes it to also search the HTTP +headers for the string that must / must not be present. + .IP browser=BROWSERNAME By default, Xymon sends an HTTP "User-Agent" header identifying it a "Xymon". Some websites require that you use a specific diff -Nru xymon-4.3.12~lucid/common/logfetch.1 xymon-4.3.17/common/logfetch.1 --- xymon-4.3.12~lucid/common/logfetch.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/common/logfetch.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH LOGFETCH 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH LOGFETCH 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME logfetch \- Xymon client data collector .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/common/Makefile xymon-4.3.17/common/Makefile --- xymon-4.3.12~lucid/common/Makefile 2012-11-14 11:29:54.000000000 +0000 +++ xymon-4.3.17/common/Makefile 2014-01-19 12:17:56.000000000 +0000 @@ -66,7 +66,7 @@ xymon.exe: xymon.c ../lib/strfunc.c ../lib/errormsg.c ../lib/environ.c ../lib/stackio.c ../lib/timefunc.c ../lib/memory.c ../lib/sendmsg.c ../lib/holidays.c ../lib/rbtr.c ../lib/msort.c $(CC) $(CFLAGS) -c xymon.c - $(CC) $(CFLAGS) -DXYMONTOPDIR=\"$(XYMONTOPDIR)\" -DXYMONLOGDIR=\"$(XYMONLOGDIR)\" -DXYMONHOSTNAME=\"$(XYMONHOSTNAME)\" -DXYMONHOSTIP=\"$(XYMONHOSTIP)\" -DXYMONHOSTOS=\"$(XYMONHOSTOS)\" -DBUILD_HOME=\"$(XYMONTOPDIR)/client\" -c ../lib/environ.c + $(CC) $(CFLAGS) -DXYMONTOPDIR=\"$(XYMONTOPDIR)\" -DXYMONLOGDIR=\"$(XYMONLOGDIR)\" -DXYMONHOSTNAME=\"$(XYMONHOSTNAME)\" -DXYMONHOSTIP=\"$(XYMONHOSTIP)\" -DXYMONHOSTOS=\"$(XYMONHOSTOS)\" -DXYMONHOME=\"$(XYMONHOME)\" -c ../lib/environ.c $(CC) $(CFLAGS) -c ../lib/strfunc.c $(CC) $(CFLAGS) -c ../lib/errormsg.c $(CC) $(CFLAGS) -c ../lib/stackio.c diff -Nru xymon-4.3.12~lucid/common/msgcache.8 xymon-4.3.17/common/msgcache.8 --- xymon-4.3.12~lucid/common/msgcache.8 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/common/msgcache.8 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH MSGCACHE 8 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH MSGCACHE 8 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME msgcache \- Cache client messages for later pickup by xymonfetch diff -Nru xymon-4.3.12~lucid/common/orcaxymon.1 xymon-4.3.17/common/orcaxymon.1 --- xymon-4.3.12~lucid/common/orcaxymon.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/common/orcaxymon.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH ORCAXYMON 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH ORCAXYMON 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME orcaxymon \- Xymon client utility to grab data from ORCA .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/common/tasks.cfg.5 xymon-4.3.17/common/tasks.cfg.5 --- xymon-4.3.12~lucid/common/tasks.cfg.5 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/common/tasks.cfg.5 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH TASKS.CFG 5 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH TASKS.CFG 5 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME tasks.cfg \- Task definitions for the xymonlaunch utility diff -Nru xymon-4.3.12~lucid/common/xymon.1 xymon-4.3.17/common/xymon.1 --- xymon-4.3.12~lucid/common/xymon.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/common/xymon.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH XYMON 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH XYMON 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME xymon \- Xymon client communication program .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/common/xymon.7 xymon-4.3.17/common/xymon.7 --- xymon-4.3.12~lucid/common/xymon.7 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/common/xymon.7 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH XYMON 7 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH XYMON 7 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME Xymon \- Introduction to Xymon diff -Nru xymon-4.3.12~lucid/common/xymon.c xymon-4.3.17/common/xymon.c --- xymon-4.3.12~lucid/common/xymon.c 2011-07-31 21:01:52.000000000 +0000 +++ xymon-4.3.17/common/xymon.c 2013-07-25 19:56:20.000000000 +0000 @@ -11,7 +11,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: xymon.c 6712 2011-07-31 21:01:52Z storner $"; +static char rcsid[] = "$Id: xymon.c 7223 2013-07-25 19:56:20Z storner $"; #include #include @@ -36,7 +36,7 @@ FILE *respfd = stdout; char *envarea = NULL; sendreturn_t *sres; - int wantresponse = 0, mergeinput = 0; + int wantresponse = 0, mergeinput = 0, usebackfeedqueue = 0; for (argi=1; (argi < argc); argi++) { if (strcmp(argv[argi], "--debug") == 0) { @@ -150,10 +150,22 @@ else if (strncmp(STRBUF(msg), "ghostlist", 9) == 0) wantresponse = 1; else if (strncmp(STRBUF(msg), "multisrclist", 12) == 0) wantresponse = 1; - sres = newsendreturnbuf(wantresponse, respfd); - result = sendmessage(STRBUF(msg), recipient, timeout, sres); + usebackfeedqueue = ((strcmp(recipient, "0") == 0) && !wantresponse); - if (sres->respstr) printf("Buffered response is '%s'\n", STRBUF(sres->respstr)); + if (!usebackfeedqueue) { + sres = newsendreturnbuf(wantresponse, respfd); + result = sendmessage(STRBUF(msg), recipient, timeout, sres); + + if (sres->respstr) printf("Buffered response is '%s'\n", STRBUF(sres->respstr)); + } + else { + dbgprintf("Using backfeed channel\n"); + + sendmessage_init_local(); + sendmessage_local(STRBUF(msg)); + sendmessage_finish_local(); + result = 0; + } return result; } diff -Nru xymon-4.3.12~lucid/common/xymoncfg.1 xymon-4.3.17/common/xymoncfg.1 --- xymon-4.3.12~lucid/common/xymoncfg.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/common/xymoncfg.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH XYMONCFG 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH XYMONCFG 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME xymoncfg \- output the full hosts.cfg file .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/common/xymonclient.cfg.5 xymon-4.3.17/common/xymonclient.cfg.5 --- xymon-4.3.12~lucid/common/xymonclient.cfg.5 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/common/xymonclient.cfg.5 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH XYMONCLIENT.CFG 5 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH XYMONCLIENT.CFG 5 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME xymonclient.cfg \- Xymon client environment variables diff -Nru xymon-4.3.12~lucid/common/xymoncmd.1 xymon-4.3.17/common/xymoncmd.1 --- xymon-4.3.12~lucid/common/xymoncmd.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/common/xymoncmd.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH XYMONCMD 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH XYMONCMD 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME xymoncmd \- Run a Xymon command with environment set .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/common/xymondigest.1 xymon-4.3.17/common/xymondigest.1 --- xymon-4.3.12~lucid/common/xymondigest.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/common/xymondigest.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH XYMONDIGEST 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH XYMONDIGEST 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME xymondigest \- calculate message digests .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/common/xymongrep.1 xymon-4.3.17/common/xymongrep.1 --- xymon-4.3.12~lucid/common/xymongrep.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/common/xymongrep.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH XYMONGREP 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH XYMONGREP 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME xymongrep \- pick out lines in hosts.cfg .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/common/xymonlaunch.8 xymon-4.3.17/common/xymonlaunch.8 --- xymon-4.3.12~lucid/common/xymonlaunch.8 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/common/xymonlaunch.8 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH XYMONLAUNCH 8 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH XYMONLAUNCH 8 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME xymonlaunch \- Master program to launch other Xymon programs diff -Nru xymon-4.3.12~lucid/common/xymonlaunch.c xymon-4.3.17/common/xymonlaunch.c --- xymon-4.3.12~lucid/common/xymonlaunch.c 2013-07-23 12:20:59.000000000 +0000 +++ xymon-4.3.17/common/xymonlaunch.c 2014-01-13 10:45:03.000000000 +0000 @@ -13,7 +13,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: xymonlaunch.c 7204 2013-07-23 12:20:59Z storner $"; +static char rcsid[] = "$Id: xymonlaunch.c 7346 2014-01-13 10:45:03Z storner $"; #include #include @@ -543,9 +543,8 @@ else if (stat("/etc/xymon/tasks.cfg", &st) != -1) config = strdup("/etc/xymon/tasks.cfg"); else if (stat("/etc/xymon-client/clientlaunch.cfg", &st) != -1) config = strdup("/etc/xymon-client/clientlaunch.cfg"); else if (xgetenv("XYMONHOME")) { - char *pf = NULL; - sprintf(pf, "%s/etc/tasks.cfg", xgetenv("XYMONHOME")); - if (pf && stat(pf, &st) != -1) config = strdup(pf); + config = (char *)malloc(strlen(xgetenv("XYMONHOME")) + strlen("/etc/tasks.cfg") + 1); + sprintf(config, "%s/etc/tasks.cfg", xgetenv("XYMONHOME")); } if (config) dbgprintf("Using config file: %s\n", config); } diff -Nru xymon-4.3.12~lucid/common/xymonserver.cfg.5 xymon-4.3.17/common/xymonserver.cfg.5 --- xymon-4.3.12~lucid/common/xymonserver.cfg.5 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/common/xymonserver.cfg.5 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH XYMONSERVER.CFG 5 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH XYMONSERVER.CFG 5 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME xymonserver.cfg \- Xymon environment variables diff -Nru xymon-4.3.12~lucid/common/xymon-xmh.5 xymon-4.3.17/common/xymon-xmh.5 --- xymon-4.3.12~lucid/common/xymon-xmh.5 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/common/xymon-xmh.5 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH XYMON-XMH 5 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH XYMON-XMH 5 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME Xymon XMH variables \- Configuration items available online diff -Nru xymon-4.3.12~lucid/configure.client xymon-4.3.17/configure.client --- xymon-4.3.12~lucid/configure.client 2013-09-24 12:28:21.000000000 +0000 +++ xymon-4.3.17/configure.client 2014-02-11 08:18:25.000000000 +0000 @@ -1,12 +1,41 @@ #!/bin/sh -# Configure script for Xymon CLIENT -# $Id: configure.client 7044 2012-07-13 16:53:23Z storner $ +# Configure script for Xymon client +# $Id: configure.client 7426 2014-02-11 08:18:25Z storner $ echo "" echo "Configuration script for Xymon client" echo "" +while test "$1" != "" +do + OPT="$1"; shift + + case "$OPT" in + "--help") + cat < Makefile @@ -156,8 +182,6 @@ echo "#" >>Makefile echo "# Toplevel dir" >>Makefile echo "XYMONTOPDIR = $XYMONTOPDIR" >>Makefile -echo "# Server home dir for etc/, www/" >>Makefile -echo "XYMONHOME = $XYMONHOME" >>Makefile echo "" >>Makefile echo "# Xymon settings follows" >>Makefile echo "#" >>Makefile @@ -209,10 +233,15 @@ echo "" >>Makefile if test "$CONFTYPE" = "client" then - echo "# PCRE settings" >>Makefile - echo "PCREINCDIR = -I$PCREINC" >>Makefile - echo "PCRELIBS = -L$PCRELIB -lpcre" >>Makefile - echo "RPATHVAL += ${PCRELIB}" >>Makefile + if test "$PCREINC" != ""; then + echo "PCREINCDIR = -I$PCREINC" >>Makefile + fi + if test "$PCRELIB" != ""; then + echo "PCRELIBS = -L$PCRELIB -lpcre" >>Makefile + echo "RPATHVAL += ${PCRELIB}" >>Makefile + else + echo "PCRELIBS = -lpcre" >>Makefile + fi fi echo "#" >>Makefile echo "# Add local CFLAGS etc. settings here" >>Makefile diff -Nru xymon-4.3.12~lucid/configure.server xymon-4.3.17/configure.server --- xymon-4.3.12~lucid/configure.server 2013-09-24 12:30:03.000000000 +0000 +++ xymon-4.3.17/configure.server 2014-01-26 12:39:20.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # Configure script for Xymon server -# $Id: configure.server 7124 2012-07-26 07:17:44Z storner $ +# $Id: configure.server 7375 2014-01-26 12:39:20Z storner $ echo "" echo "Configuration script for Xymon" @@ -23,6 +23,8 @@ --ssllib DIRECTORY : Specify location of OpenSSL libraries --ldapinclude DIRECTORY : Specify location of OpenLDAP include files --ldaplib DIRECTORY : Specify location of OpenLDAP libraries + --caresinclude DIRECTORY : Specify location of C-ARES include files + --careslib DIRECTORY : Specify location of C-ARES libraries --fping FILENAME : Specify location of the Fping program The script will search a number of standard directories for @@ -54,6 +56,12 @@ "--ldaplib") USERLDAPLIB="$1"; shift ;; + "--caresinclude") + USERCARESINC="$1"; shift + ;; + "--careslib") + USERCARESLIB="$1"; shift + ;; "--fping") USERFPING="$1"; shift ;; @@ -87,6 +95,8 @@ echo ""; echo "" . build/pcre.sh echo ""; echo "" +. build/c-ares.sh +echo ""; echo "" . build/rrd.sh if test "$RRDOK" = "NO" @@ -362,7 +372,7 @@ fi echo ""; echo "" -echo "What is the IP-address of this host [192.168.6.253] ? " +echo "What is the IP-address of this host [127.0.0.1] ? " if test -z "$XYMONHOSTIP" then read XYMONHOSTIP @@ -370,14 +380,11 @@ if test -z "$XYMONHOSTIP" -o "$XYMONHOSTIP" = "127.0.0.1" then echo "** NOTE: Using 127.0.0.1 (loopback), but it is probably not what you want **" - XYMONHOSTIP='192.168.6.253' + XYMONHOSTIP=127.0.0.1 fi echo ""; echo "" XYMONHOSTOS=`uname -s | tr '[A-Z]' '[a-z]'` -if test "$XYMONHOME" = ""; then - XYMONHOME=$XYMONTOPDIR/server -fi if test "$XYMONVAR" = ""; then XYMONVAR=$XYMONTOPDIR/data fi @@ -401,8 +408,6 @@ echo "#" >>Makefile echo "# Toplevel dir" >>Makefile echo "XYMONTOPDIR = $XYMONTOPDIR" >>Makefile -echo "# Server home dir for etc/, bin/" >>Makefile -echo "XYMONHOME = $XYMONHOME" >>Makefile echo "# Server data dir for hist/ etc." >>Makefile echo "XYMONVAR = $XYMONVAR" >>Makefile echo "# CGI scripts go in CGIDIR" >>Makefile @@ -435,6 +440,25 @@ echo "HTTPDGID=$HTTPDGID" >>Makefile echo "" >>Makefile +echo "# C-ARES settings" >>Makefile +if test "$CARESOK" = "YES" +then + echo "SYSTEMCARES = yes" >>Makefile + + if test "$CARESINC" != ""; then + echo "CARESINCDIR = -I$CARESINC" >>Makefile + fi + if test "$CARESLIB" != ""; then + echo "CARESLIBS = -L$LIB -lcares" >>Makefile + echo "RPATHVAL += ${LIB}" >>Makefile + else + echo "CARESLIBS = -lcares" >>Makefile + fi +else + echo "SYSTEMCARES = no" >>Makefile +fi +echo "" >>Makefile + echo "# PCRE settings" >>Makefile if test "$PCREOK" = "YES" then diff -Nru xymon-4.3.12~lucid/debian/changelog xymon-4.3.17/debian/changelog --- xymon-4.3.12~lucid/debian/changelog 2013-09-24 16:07:53.000000000 +0000 +++ xymon-4.3.17/debian/changelog 2014-07-14 18:49:37.000000000 +0000 @@ -1,20 +1,138 @@ -xymon (4.3.12~lucid) lucid; urgency=high +xymon (4.3.17-1~lucid) lucid; urgency=low - * Built new package + * new upstream - -- Gandalf Tue, 24 Sep 2013 16:28:56 +0200 + -- Gandalf Mon, 14 Jul 2014 20:36:11 +0200 -xymon (4.3.12-thwint-precise3) precise; urgency=high +xymon (4.3.17) unstable; urgency=low - * Built new package + * rev 7446 + + * Fix crash in xymond when using 'schedule' command + * Configure/build/install fixes: + - Allow specifying location of the PCRE include/library files + for client-side configuration build. + - Pass IDTOOL to client installation (for Solaris). + - Fix broken configure+Makefiles for client-side configuration + - C-ARES: Fix wrong call to Makefile.test-cares during configure + - Dont error out if www-dir or man-dir is empty. Mostly an + issue when building packages with non-standard layouts. + * Fix wrong timestamp on a new status arriving with a non-green + status while DOWNTIME was active. Such a status would appear to + have been created on Jan 1st, 1970. + * Fix hostgraphs so it obeys RRDWIDTH / RRDHEIGHT settings + * Add upper limit to showgraph CGI when generating self-referring URI's + From Werner Maier + * Extra sanity check on extcombo message offsets. + * The Enable/Disable webpage now permits filtering on CLASS value. + From Galen Johnson + + -- Henrik Stoerner Sun, 23 Feb 2014 10:44:18 +0100 + +xymon (4.3.16) unstable; urgency=low + + * rev 7394 + + * Fix xymonnet crash on sending http test results + * Fix xymond crash if client-local.cfg contains empty sections + * Fix RPM-based initscript for clients with explicit hostname + * Fix misleading error-message when testing for C-ARES library + * Fix client-local.cfg handling, so by default it will not merge + sections together, i.e. behave like previous 4.x releases. + NOTE: The new regexp matching can still be used. + * Add "--merge-clientlocal" option for xymond, which causes it + to merge all matching sections from client-local.cfg into one. + * Use native POSIX binary-tree handling code + + -- Henrik Stoerner Sun, 9 Feb 2014 10:16:02 +0100 + +xymon (4.3.15) unstable; urgency=low + + * rev 7384 + + * Fix xymond_alert crashes introduced in 4.3.14 + * Fix missing C-ARES build files + * client-local.cfg: Support expression matching of sections + * acknowledge.cgi: Acks are enabled for all ALERTCOLORS, not just red and yellow + + -- Henrik Stoerner Fri, 31 Jan 2014 13:49:02 +0100 + +xymon (4.3.14) unstable; urgency=low + + * rev 7376 + * Fix critical ack not working for hosts where the display-name is + set (via "NAME:" tag). From Any Smith. + * SNI (Server Name Indication) causes some SSL connections to fail + due to server-side buggy SSL implementations. Add "sni" and "nosni" + flags to control SNI for specific hosts, and "--sni" option for + xymonnet to control the default. Reported by Mark Felder. + * Fix build process to fully obey any XYMONTOPDIR setting from the + top-level Makefile. NOTE: Client-only builds no longer install the + client in a "client/" subdirectory below XYMONHOME. + * Fix showgraph so it silently ignores stale rrdctl files when trying + to flush RRD data before showing a graph. + * Fix xymond_alert crashing when trying to strip characters + from the alert message. Bug introduced in 4.3.13. + * Fix Solaris client to report memory even when no swap is configured. + * Fix bug where alerts that were initially suppressed due to TIME + restrictions are delayed until REPEAT interval expires. + * Fix crash in xymonlaunch when trying to find tasks.cfg + * Fix HTML generated by acknowledge.cgi (missing '>') + * Fix Linux client reporting garbled client data if top output ends + without a new-line (causes CPU load and other vmstat graphs to + stop updating) + * Fix Debian installation so it enables Apache mod_rewrite + * Fix merge-lines utility crashing when first line was an include + * Fix "make install" failing when server/www/help was a symlink + * Document existing OPTIONAL setting in analysis.cfg for file-checks + on files which may not exist. + * Document existing CLASS setting in alerts.cfg + * Add new INFOCOLUMNGIF and TRENDSCOLUMNGIF settings so the icons + used for these pages are configurable. + * Enhance Solaris client to correctly handle Solaris zones. + * Add new search facilities to xymond to select hosts with the + 'xymondboard' and 'hostinfo' commands. + * New --ack-each-color option for xymondd changes ack behaviour so a + yellow ack does not apply when status changed to red, but a red ack + applies if status goes yellow + * New "headermatch" tag for http tests so content checks can look at + HTTP headers in addition to the HTML body. + * Use system-wide c-ares library. NB: Now requires libc-ares2. + + -- Henrik Stoerner Sun, 26 Jan 2014 13:49:02 +0100 + +xymon (4.3.13) unstable; urgency=low + + * rev 7339 + * Fixes to FreeBSD client code, from Mark Felder (FreeBSD maintainer) + * Fix crash on "client" data sent via status channel when host is unknown + * HTTP tests now use "Cache-control" header for HTTP/1.1 (default) and + "Pragma" for HTTP/1.0, so it is protocol compliant. + * xymonnet network tester supports Server Name Indication (SNI) for SSL + enabled virtual websites. + * Strip carriage-return from text sent to mail alerts, to avoid mail + programs treating the message as binary and putting it in an attachment + * netbios-ssn, snpp and lpd protocol.cfg entries (Tom Schmidt) + * "temperature" status strips html tags from sensor names (Tom Schmidt) + * Extra "total network I/O" line on ifstat graph (Tom Schmidt) + * New "backfeed" queue for high-speed transmission of Xymon status updates + between modules located on the same server as xymond. Note: This is + disabled by default, see the README.backfeed file. + * New "extcombo" message type allows for combo messages of all types + (usually "status" and "data"). + * New setting IMAGEFILETYPE removes hardcoded ".gif" on the various + image-files in the "gifs" directory. Directory name is unchanged, though. + * New modifier for https tests for selecting only TLSv1 as protocol + * CGI's now return a proper HTTP status code in case of errors (e.g. "404" + when requesting a status for a non-existing host). + * Fix problem with xymond_rrd dying if an external processors crashes + (from J. Cleaver) + * Fix configure/build problem with detecting POSIX realtime-clock functions. + * Fix for FreeBSD 5+ vmstat reporting (from Jeremy Laidman) + * Fix for "make install" not setting correct file/directory permissions + * Re-add the "--hf-file" option for criticalview CGI (removed in 4.3.7) - -- Gandalf Tue, 24 Sep 2013 16:28:56 +0200 - -xymon (4.3.12-thwint-precise1) precise; urgency=high - - * Built new package from upstream source (rev 7211) - - -- Tom Winterhalder Tue, 30 Jul 2013 03:33:00 +0100 + -- Henrik Stoerner Wed, 8 Jan 2014 16:43:32 +0100 xymon (4.3.12) unstable; urgency=high diff -Nru xymon-4.3.12~lucid/debian/control xymon-4.3.17/debian/control --- xymon-4.3.12~lucid/debian/control 2011-03-08 17:20:28.000000000 +0000 +++ xymon-4.3.17/debian/control 2014-01-26 12:39:20.000000000 +0000 @@ -2,7 +2,7 @@ Section: net Priority: extra Maintainer: Henrik Stoerner -Build-Depends: debhelper (>= 7), librrd2-dev, libssl-dev, libldap2-dev, libpcre3-dev +Build-Depends: debhelper (>= 7), libc-ares-dev, librrd2-dev, libssl-dev, libldap2-dev, libpcre3-dev Standards-Version: 3.8.3 Homepage: http://xymon.sourceforge.net/ diff -Nru xymon-4.3.12~lucid/debian/rules xymon-4.3.17/debian/rules --- xymon-4.3.12~lucid/debian/rules 2013-07-30 06:36:21.000000000 +0000 +++ xymon-4.3.17/debian/rules 2011-03-08 17:20:28.000000000 +0000 @@ -105,9 +105,6 @@ echo "include /var/run/xymon/clientlaunch-include.cfg" >> \ $C/etc/xymon/clientlaunch.cfg rm $C/usr/lib/xymon/client/runclient.sh - # create init.d file - mkdir -p $C/etc/init.d - cp debian/xymon-client.init $C/etc/init.d/xymon-client binary: binary-arch binary-indep diff -Nru xymon-4.3.12~lucid/debian/xymon.dirs xymon-4.3.17/debian/xymon.dirs --- xymon-4.3.12~lucid/debian/xymon.dirs 2011-03-08 17:20:28.000000000 +0000 +++ xymon-4.3.17/debian/xymon.dirs 2014-01-19 12:15:13.000000000 +0000 @@ -1,5 +1,4 @@ etc/apache2/conf.d -etc/xymon/tasks.d etc/xymon/graphs.d etc/xymon/xymonserver.d usr/share/xymon diff -Nru xymon-4.3.12~lucid/debian/xymon.postinst xymon-4.3.17/debian/xymon.postinst --- xymon-4.3.12~lucid/debian/xymon.postinst 2011-03-08 17:20:28.000000000 +0000 +++ xymon-4.3.17/debian/xymon.postinst 2014-01-09 21:40:37.000000000 +0000 @@ -61,6 +61,7 @@ test -e /etc/xymon/xymonpasswd || touch /etc/xymon/xymonpasswd test -e /etc/xymon/xymongroups || touch /etc/xymon/xymongroups if test -e /etc/init.d/apache2 ; then + a2enmod rewrite || : invoke-rc.d apache2 reload || : fi ;; diff -Nru xymon-4.3.12~lucid/docs/Makefile xymon-4.3.17/docs/Makefile --- xymon-4.3.12~lucid/docs/Makefile 2012-11-14 11:29:54.000000000 +0000 +++ xymon-4.3.17/docs/Makefile 2014-01-26 11:07:36.000000000 +0000 @@ -12,7 +12,8 @@ ifndef PKGBUILD chown -R $(XYMONUSER) $(INSTALLROOT)$(INSTALLWWWDIR)/help chgrp -R `$(IDTOOL) -g $(XYMONUSER)` $(INSTALLROOT)$(INSTALLWWWDIR)/help - find $(INSTALLROOT)$(INSTALLWWWDIR)/help -type d | xargs chmod 755 - find $(INSTALLROOT)$(INSTALLWWWDIR)/help -type f | xargs chmod 644 + # These may fail if no files installed + (find $(INSTALLROOT)$(INSTALLWWWDIR)/help/ -type d | xargs chmod 755 ) || /bin/true + (find $(INSTALLROOT)$(INSTALLWWWDIR)/help/ -type f | xargs chmod 644 ) || /bin/true endif diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/ackinfo.cgi.1.html xymon-4.3.17/docs/manpages/man1/ackinfo.cgi.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/ackinfo.cgi.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/ackinfo.cgi.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of ACKINFO.CGI

ACKINFO.CGI

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -96,6 +96,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/acknowledge.cgi.1.html xymon-4.3.17/docs/manpages/man1/acknowledge.cgi.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/acknowledge.cgi.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/acknowledge.cgi.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of ACKNOWLEDGE.CGI

ACKNOWLEDGE.CGI

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -123,6 +123,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/appfeed.cgi.1.html xymon-4.3.17/docs/manpages/man1/appfeed.cgi.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/appfeed.cgi.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/appfeed.cgi.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of APPFEED.CGI

APPFEED.CGI

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -85,6 +85,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/clientupdate.1.html xymon-4.3.17/docs/manpages/man1/clientupdate.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/clientupdate.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/clientupdate.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of CLIENTUPDATE

CLIENTUPDATE

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -158,6 +158,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/combostatus.1.html xymon-4.3.17/docs/manpages/man1/combostatus.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/combostatus.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/combostatus.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of COMBOSTATUS

COMBOSTATUS

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -98,6 +98,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/confreport.cgi.1.html xymon-4.3.17/docs/manpages/man1/confreport.cgi.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/confreport.cgi.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/confreport.cgi.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of CONFREPORT.CGI

CONFREPORT.CGI

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -95,6 +95,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/criticaleditor.cgi.1.html xymon-4.3.17/docs/manpages/man1/criticaleditor.cgi.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/criticaleditor.cgi.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/criticaleditor.cgi.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of CRITICALEDITOR.CGI

CRITICALEDITOR.CGI

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -78,6 +78,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/criticalview.cgi.1.html xymon-4.3.17/docs/manpages/man1/criticalview.cgi.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/criticalview.cgi.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/criticalview.cgi.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of CRITICALVIEW.CGI

CRITICALVIEW.CGI

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -111,6 +111,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/csvinfo.cgi.1.html xymon-4.3.17/docs/manpages/man1/csvinfo.cgi.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/csvinfo.cgi.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/csvinfo.cgi.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of CSVINFO.CGI

CSVINFO.CGI

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -80,6 +80,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/datepage.cgi.1.html xymon-4.3.17/docs/manpages/man1/datepage.cgi.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/datepage.cgi.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/datepage.cgi.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of DATEPAGE.CGI

DATEPAGE.CGI

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -120,6 +120,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/eventlog.cgi.1.html xymon-4.3.17/docs/manpages/man1/eventlog.cgi.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/eventlog.cgi.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/eventlog.cgi.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of EVENTLOG.CGI

EVENTLOG.CGI

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -59,6 +59,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/findhost.cgi.1.html xymon-4.3.17/docs/manpages/man1/findhost.cgi.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/findhost.cgi.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/findhost.cgi.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of FINDHOST.CGI

FINDHOST.CGI

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -98,6 +98,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/ghostlist.cgi.1.html xymon-4.3.17/docs/manpages/man1/ghostlist.cgi.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/ghostlist.cgi.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/ghostlist.cgi.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of GHOSTLIST.CGI

GHOSTLIST.CGI

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -67,6 +67,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/history.cgi.1.html xymon-4.3.17/docs/manpages/man1/history.cgi.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/history.cgi.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/history.cgi.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of HISTORY.CGI

HISTORY.CGI

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -129,6 +129,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/hostgraphs.cgi.1.html xymon-4.3.17/docs/manpages/man1/hostgraphs.cgi.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/hostgraphs.cgi.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/hostgraphs.cgi.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of HOSTGRAPHS.CGI

HOSTGRAPHS.CGI

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -87,6 +87,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/logfetch.1.html xymon-4.3.17/docs/manpages/man1/logfetch.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/logfetch.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/logfetch.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of LOGFETCH

LOGFETCH

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -98,6 +98,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/orcaxymon.1.html xymon-4.3.17/docs/manpages/man1/orcaxymon.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/orcaxymon.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/orcaxymon.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of ORCAXYMON

ORCAXYMON

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -77,6 +77,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/report.cgi.1.html xymon-4.3.17/docs/manpages/man1/report.cgi.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/report.cgi.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/report.cgi.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of REPORT.CGI

REPORT.CGI

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -139,6 +139,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/reportlog.cgi.1.html xymon-4.3.17/docs/manpages/man1/reportlog.cgi.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/reportlog.cgi.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/reportlog.cgi.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of REPORTLOG.CGI

REPORTLOG.CGI

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -86,6 +86,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/showgraph.cgi.1.html xymon-4.3.17/docs/manpages/man1/showgraph.cgi.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/showgraph.cgi.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/showgraph.cgi.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of SHOWGRAPH.CGI

SHOWGRAPH.CGI

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -170,6 +170,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/snapshot.cgi.1.html xymon-4.3.17/docs/manpages/man1/snapshot.cgi.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/snapshot.cgi.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/snapshot.cgi.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of SNAPSHOT.CGI

SNAPSHOT.CGI

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -102,6 +102,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/statusreport.cgi.1.html xymon-4.3.17/docs/manpages/man1/statusreport.cgi.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/statusreport.cgi.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/statusreport.cgi.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of STATUSREPORT.CGI

STATUSREPORT.CGI

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -125,6 +125,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/svcstatus.cgi.1.html xymon-4.3.17/docs/manpages/man1/svcstatus.cgi.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/svcstatus.cgi.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/svcstatus.cgi.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of SVCSTATUS.CGI

SVCSTATUS.CGI

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -154,6 +154,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/xymon.1.html xymon-4.3.17/docs/manpages/man1/xymon.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/xymon.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/xymon.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMON

XYMON

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -598,6 +598,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/xymoncfg.1.html xymon-4.3.17/docs/manpages/man1/xymoncfg.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/xymoncfg.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/xymoncfg.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMONCFG

XYMONCFG

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -89,6 +89,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/xymoncmd.1.html xymon-4.3.17/docs/manpages/man1/xymoncmd.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/xymoncmd.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/xymoncmd.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMONCMD

XYMONCMD

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -60,6 +60,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/xymondigest.1.html xymon-4.3.17/docs/manpages/man1/xymondigest.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/xymondigest.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/xymondigest.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMONDIGEST

XYMONDIGEST

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -73,6 +73,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/xymongen.1.html xymon-4.3.17/docs/manpages/man1/xymongen.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/xymongen.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/xymongen.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMONGEN

XYMONGEN

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -848,6 +848,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/xymongrep.1.html xymon-4.3.17/docs/manpages/man1/xymongrep.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/xymongrep.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/xymongrep.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMONGREP

XYMONGREP

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -179,6 +179,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/xymonnet.1.html xymon-4.3.17/docs/manpages/man1/xymonnet.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/xymonnet.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/xymonnet.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMONNET

XYMONNET

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -369,6 +369,12 @@
--no-cipherlist
Do not show the list of encryption ciphers on the "sslcert" status.

+

--sni=[on|off]
+Sets the default for whether SSL connections use SNI (Server Name +Indication). This can also be set with the "sni" or "nosni" +options in hosts.cfg for each host - the hosts.cfg entries +override this option. +Default: off

  @@ -745,6 +751,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/xymonnet-again.sh.1.html xymon-4.3.17/docs/manpages/man1/xymonnet-again.sh.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/xymonnet-again.sh.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/xymonnet-again.sh.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMONNET-AGAIN.SH

XYMONNET-AGAIN.SH

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -78,6 +78,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/xymonpage.cgi.1.html xymon-4.3.17/docs/manpages/man1/xymonpage.cgi.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/xymonpage.cgi.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/xymonpage.cgi.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMONPAGE

XYMONPAGE

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -63,6 +63,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man1/xymonping.1.html xymon-4.3.17/docs/manpages/man1/xymonping.1.html --- xymon-4.3.12~lucid/docs/manpages/man1/xymonping.1.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man1/xymonping.1.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMONPING

XYMONPING

-Section: User Commands (1)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: User Commands (1)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -133,6 +133,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man5/alerts.cfg.5.html xymon-4.3.17/docs/manpages/man5/alerts.cfg.5.html --- xymon-4.3.12~lucid/docs/manpages/man5/alerts.cfg.5.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man5/alerts.cfg.5.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of ALERTS.CFG

ALERTS.CFG

-Section: File Formats (5)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: File Formats (5)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -125,6 +125,19 @@ Rule excluding an alert by the group name. Groupnames are assigned to a status via the GROUP setting in the analysis.cfg file.

+CLASS=classname + +Rule matching an alert by the class that the host belongs to. By default, the classname is +the operating system name; you can set another class either in +hosts.cfg(5) + +using the CLASS tag, or a client running on the server can set the class (via a parameter +to the client startup-script). +

+EXCLASS=classname + +Rule excluding an alert by the class name. +

COLOR=color[,color] Rule matching an alert by color. Can be "red", "yellow", or "purple". The forms "!red", "!yellow" and "!purple" can also be used to NOT send an alert if the color is the specified one. @@ -301,6 +314,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man5/analysis.cfg.5.html xymon-4.3.17/docs/manpages/man5/analysis.cfg.5.html --- xymon-4.3.12~lucid/docs/manpages/man5/analysis.cfg.5.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man5/analysis.cfg.5.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of ANALYSIS.CFG

ANALYSIS.CFG

-Section: File Formats (5)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: File Formats (5)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -276,7 +276,7 @@

MSGS STATUS COLUMN SETTINGS

-LOG logfilename pattern [COLOR=color] [IGNORE=excludepattern] +LOG logfilename pattern [COLOR=color] [IGNORE=excludepattern] [OPTIONAL]

The Xymon client extracts interesting lines from one or @@ -307,6 +307,9 @@ "excludepattern" is a string or regular expression that can be used to filter out any unwanted strings that happen to match "pattern".

+The OPTIONAL keyword causes the check to be skipped if the logfile +does not exist. +

Example: Trigger a red alert when the string "ERROR" appears in the "/var/adm/syslog" file:
@@ -331,7 +334,7 @@

FILES STATUS COLUMN SETTINGS

-FILE filename [color] [things to check] [TRACK] +FILE filename [color] [things to check] [OPTIONAL] [TRACK]

DIR directoryname [color] [size<MAXSIZE] [size>MINSIZE] [TRACK] @@ -347,6 +350,12 @@

color is the color that triggers when one or more of the checks fail.

+The OPTIONAL keyword causes this check to be skipped if the file does +not exist. E.g. you can use this to check if files that should be temporary are +not deleted, by checking that they are not older than the max time you would +expect them to stick around, and then using OPTIONAL to ignore the state +where no files exist. +

The TRACK keyword causes the size of the file or directory to be tracked in an RRD file, and presented in a graph on the "files" status display.

@@ -816,6 +825,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man5/cgioptions.cfg.5.html xymon-4.3.17/docs/manpages/man5/cgioptions.cfg.5.html --- xymon-4.3.12~lucid/docs/manpages/man5/cgioptions.cfg.5.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man5/cgioptions.cfg.5.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of CGIOPTIONS.CFG

CGIOPTIONS.CFG

-Section: File Formats (5)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: File Formats (5)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -173,6 +173,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man5/clientlaunch.cfg.5.html xymon-4.3.17/docs/manpages/man5/clientlaunch.cfg.5.html --- xymon-4.3.12~lucid/docs/manpages/man5/clientlaunch.cfg.5.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man5/clientlaunch.cfg.5.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of CLIENTLAUNCH.CFG

CLIENTLAUNCH.CFG

-Section: File Formats (5)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: File Formats (5)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -53,6 +53,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man5/client-local.cfg.5.html xymon-4.3.17/docs/manpages/man5/client-local.cfg.5.html --- xymon-4.3.12~lucid/docs/manpages/man5/client-local.cfg.5.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man5/client-local.cfg.5.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of CLIENT-LOCAL.CFG

CLIENT-LOCAL.CFG

-Section: File Formats (5)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: File Formats (5)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -57,6 +57,20 @@ change is entered into the client-local.cfg file, and until you see the result in the status messages reported by the client.

+By default, xymond will look for a matching entry by matching the client +hostname, classname or operating system name against the section expressions. +Hostname matches are used first, then classname matches, then OS matches. +The first match found is the one that is returned to the client. +

+If xymond is started with the "--merge-clientlocal" option, then xymond +will instead merge all of the matching sections into one, and return all +of this data to the client. So you can have host-specific entries, and +then supplement them with class- or os-generic entries. Note that the +merging does not remove entries, so if you have e.g. a "log" entry defined +in both a hostname- and an osname-matching section, then both entries +will be sent back to the client. +

+

 

FILE FORMAT

@@ -70,6 +84,20 @@ can configure special configurations for individual hosts, and have a default configuration for all other hosts of a certain type.

+It will often be practical to use regular expressions for hostnames. +To do this you must use +

+
    [host=<expression>] +

+where <expression> is a Perl-compatible regular expression. The same +kind of matching can be done on operating system or host class, using +

+
    [os=<expresssion>] +
+ +
    [class=<expression>] +

+

Apart from the section delimiter, the file format is free-form, or rather it is defined by the tools that make use of the configuration.

@@ -219,6 +247,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man5/combo.cfg.5.html xymon-4.3.17/docs/manpages/man5/combo.cfg.5.html --- xymon-4.3.12~lucid/docs/manpages/man5/combo.cfg.5.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man5/combo.cfg.5.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of COMBO.CFG

COMBO.CFG

-Section: File Formats (5)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: File Formats (5)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -138,6 +138,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man5/critical.cfg.5.html xymon-4.3.17/docs/manpages/man5/critical.cfg.5.html --- xymon-4.3.12~lucid/docs/manpages/man5/critical.cfg.5.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man5/critical.cfg.5.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of CRITICAL.CFG

CRITICAL.CFG

-Section: File Formats (5)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: File Formats (5)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -62,6 +62,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man5/graphs.cfg.5.html xymon-4.3.17/docs/manpages/man5/graphs.cfg.5.html --- xymon-4.3.12~lucid/docs/manpages/man5/graphs.cfg.5.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man5/graphs.cfg.5.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of GRAPHS.CFG

GRAPHS.CFG

-Section: File Formats (5)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: File Formats (5)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -183,6 +183,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man5/hosts.cfg.5.html xymon-4.3.17/docs/manpages/man5/hosts.cfg.5.html --- xymon-4.3.12~lucid/docs/manpages/man5/hosts.cfg.5.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man5/hosts.cfg.5.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of HOSTS.CFG

HOSTS.CFG

-Section: File Formats (5)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: File Formats (5)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -315,15 +315,18 @@
CLASS:Classname
Force the host to belong to a specific class. Class-names are used when configuring log-file monitoring (they can be used as references in -client-local.cfg(5) +client-local.cfg(5), -and analysis.cfg(5) -to group log file checks). Normally, class-names are controlled on the +and +alerts.cfg(5) + +to group log file checks or alerts). Normally, class-names are controlled on the client by starting the Xymon client with the "--class=Classname" option. If you specify it in the hosts.cfg file on the Xymon server, it overrides -any class name that the client reports. +any class name that the client reports. If not set, then the host belongs +to a class named by the operating system the Xymon client is running on.

dialup
The keyword "dialup" for a host means that it is OK for it to be @@ -658,7 +661,7 @@ Define the number of days before an SSL certificate expires, in which the sslcert status shows a warning (yellow) or alarm (red) status. These default to the values from the -"--sslwarndays" and "--sslalarmdays" options for the +"--sslwarn" and "--sslalarm" options for the xymonnet(1) tool; the values specified in the "ssldays" tag overrides @@ -671,6 +674,23 @@ test will go red. E.g. to check that your server only uses strong encryption (128 bits or better), use "sslbits=128".

+

sni
+
nosni
+Enables or disables use of SNI (Server Name Indication) for SSL tests. +

+Some SSL implementations cannot handle SSL handshakes with SNI +data, so Xymon by default does not use SNI. This default can be +changed with the "--sni" option for +xymonnet(1) + +but can also be managed per host with these tags. +

+SNI support was added in Xymon 4.3.13, where the default was to +use SNI. This was changed in 4.3.14 so SNI support is disabled by +default, and the "sni" and "nosni" tags were introduced together +with the "--sni" option for xymonnet. +

+

DOWNTIME=day:starttime:endtime[,day:starttime:endtime]
DOWNTIME=columns:day:starttime:endtime:cause[,columns:day:starttime:endtime:cause]
This tag can be used to ignore failed checks during @@ -1098,6 +1118,9 @@ * "3", e.g. https3://www.sample.com/ : use only SSLv3
+* "t", e.g. httpst://www.sample.com/ : use only TLSv1 +
+ * "m", e.g. httpsm://www.sample.com/ : use only 128-bit ciphers
@@ -1374,6 +1397,11 @@ tag will keep this information from showing up on the status webpages.

+

headermatch
+Content checks by default only search the HTML body returned by +the webserver. This option causes it to also search the HTTP +headers for the string that must / must not be present. +

browser=BROWSERNAME
By default, Xymon sends an HTTP "User-Agent" header identifying it a "Xymon". Some websites require that you use a specific @@ -1613,6 +1641,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man5/protocols.cfg.5.html xymon-4.3.17/docs/manpages/man5/protocols.cfg.5.html --- xymon-4.3.12~lucid/docs/manpages/man5/protocols.cfg.5.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man5/protocols.cfg.5.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of PROTOCOLS.CFG

PROTOCOLS.CFG

-Section: File Formats (5)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: File Formats (5)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -131,6 +131,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man5/tasks.cfg.5.html xymon-4.3.17/docs/manpages/man5/tasks.cfg.5.html --- xymon-4.3.12~lucid/docs/manpages/man5/tasks.cfg.5.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man5/tasks.cfg.5.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of TASKS.CFG

TASKS.CFG

-Section: File Formats (5)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: File Formats (5)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -184,6 +184,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man5/xymonclient.cfg.5.html xymon-4.3.17/docs/manpages/man5/xymonclient.cfg.5.html --- xymon-4.3.12~lucid/docs/manpages/man5/xymonclient.cfg.5.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man5/xymonclient.cfg.5.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMONCLIENT.CFG

XYMONCLIENT.CFG

-Section: File Formats (5)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: File Formats (5)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -104,6 +104,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man5/xymonserver.cfg.5.html xymon-4.3.17/docs/manpages/man5/xymonserver.cfg.5.html --- xymon-4.3.12~lucid/docs/manpages/man5/xymonserver.cfg.5.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man5/xymonserver.cfg.5.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMONSERVER.CFG

XYMONSERVER.CFG

-Section: File Formats (5)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: File Formats (5)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -863,6 +863,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man5/xymonweb.5.html xymon-4.3.17/docs/manpages/man5/xymonweb.5.html --- xymon-4.3.12~lucid/docs/manpages/man5/xymonweb.5.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man5/xymonweb.5.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMONWEB

XYMONWEB

-Section: File Formats (5)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: File Formats (5)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -194,6 +194,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man5/xymonwebaccess.5.html xymon-4.3.17/docs/manpages/man5/xymonwebaccess.5.html --- xymon-4.3.12~lucid/docs/manpages/man5/xymonwebaccess.5.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man5/xymonwebaccess.5.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMON-WEBACCESS

XYMON-WEBACCESS

-Section: File Formats (5)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: File Formats (5)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -89,6 +89,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man5/xymon-xmh.5.html xymon-4.3.17/docs/manpages/man5/xymon-xmh.5.html --- xymon-4.3.12~lucid/docs/manpages/man5/xymon-xmh.5.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man5/xymon-xmh.5.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMON-XMH

XYMON-XMH

-Section: File Formats (5)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: File Formats (5)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -253,6 +253,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man7/xymon.7.html xymon-4.3.17/docs/manpages/man7/xymon.7.html --- xymon-4.3.12~lucid/docs/manpages/man7/xymon.7.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man7/xymon.7.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMON

XYMON

-Section: Environments, Tables, and Troff Macros (7)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: Environments, Tables, and Troff Macros (7)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -661,6 +661,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man8/enadis.cgi.8.html xymon-4.3.17/docs/manpages/man8/enadis.cgi.8.html --- xymon-4.3.12~lucid/docs/manpages/man8/enadis.cgi.8.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man8/enadis.cgi.8.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of ENADIS.CGI

ENADIS.CGI

-Section: Maintenance Commands (8)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: Maintenance Commands (8)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -93,6 +93,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man8/msgcache.8.html xymon-4.3.17/docs/manpages/man8/msgcache.8.html --- xymon-4.3.12~lucid/docs/manpages/man8/msgcache.8.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man8/msgcache.8.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of MSGCACHE

MSGCACHE

-Section: Maintenance Commands (8)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: Maintenance Commands (8)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -117,6 +117,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man8/trimhistory.8.html xymon-4.3.17/docs/manpages/man8/trimhistory.8.html --- xymon-4.3.12~lucid/docs/manpages/man8/trimhistory.8.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man8/trimhistory.8.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of TRIMHISTORY

TRIMHISTORY

-Section: Maintenance Commands (8)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: Maintenance Commands (8)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -146,6 +146,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man8/xymoncgimsg.cgi.8.html xymon-4.3.17/docs/manpages/man8/xymoncgimsg.cgi.8.html --- xymon-4.3.12~lucid/docs/manpages/man8/xymoncgimsg.cgi.8.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man8/xymoncgimsg.cgi.8.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMONCGIMSG.CGI

XYMONCGIMSG.CGI

-Section: Maintenance Commands (8)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: Maintenance Commands (8)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents

@@ -78,6 +78,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man8/xymond.8.html xymon-4.3.17/docs/manpages/man8/xymond.8.html --- xymon-4.3.12~lucid/docs/manpages/man8/xymond.8.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man8/xymond.8.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMOND

XYMOND

-Section: Maintenance Commands (8)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: Maintenance Commands (8)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -78,6 +78,17 @@ Prevent status messages from going purple when they are no longer valid. Unlike the standard bbd daemon, purple-handling is done by xymond.

+

--merge-clientconfig
+The +client-local.cfg(5) + +file contains client-configuration which can be found matching a client +against its hostname, its classname, or the name of the OS the client is +running. By default xymond will return one entry from the file to the +client, looking for a hostname, classname or OS match (in that order). +This option causes xymond to merge all matching entries together into +one and return all of it to the client. +

--listen=IP[:PORT]
Specifies the IP-address and port where xymond will listen for incoming connections. By default, xymond listens on IP 0.0.0.0 (i.e. all IP- @@ -87,6 +98,10 @@ Specifies the listen-queue for incoming connections. You don't need to tune this unless you have a very busy xymond daemon.

+

--no-bfq
+Tells xymond to NOT use the local messagequeue interface for receiving status- +updates from xymond_client and xymonnet. +

--daemon
xymond is normally started by xymonlaunch(8) @@ -228,6 +243,20 @@ from the Xymon server. The use of these may be seen as a security risk since they allow file downloads.

+

--ack-each-color
+By default, sending an ACK for a yellow status stops alerts from being sent +while the status remains yellow or red. A status change from yellow to red +will not re-enable alerts - the ACK covers all non-green statuses. +With this option, an ACK is valid only for the color of the status when the +ACK was sent. So an ACK for a yellow status is ignored if the status later +changes to red, but an ACK for a red status covers both yellow and red. +
+ +Note: An ACK for a red status will clear any existing yellow acks. This +means that a long-lived ack for yellow is lost when you send a short-lived +ack for red. Hence alerts will restart when the red ack expires, even if +the status by then has changed to yellow. +

--debug
Enable debugging output.

@@ -388,6 +417,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man8/xymond_alert.8.html xymon-4.3.17/docs/manpages/man8/xymond_alert.8.html --- xymon-4.3.12~lucid/docs/manpages/man8/xymond_alert.8.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man8/xymond_alert.8.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMOND_ALERT

XYMOND_ALERT

-Section: Maintenance Commands (8)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: Maintenance Commands (8)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -192,6 +192,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man8/xymond_capture.8.html xymon-4.3.17/docs/manpages/man8/xymond_capture.8.html --- xymon-4.3.12~lucid/docs/manpages/man8/xymond_capture.8.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man8/xymond_capture.8.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMOND_CAPTURE

XYMOND_CAPTURE

-Section: Maintenance Commands (8)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: Maintenance Commands (8)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -88,6 +88,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man8/xymond_channel.8.html xymon-4.3.17/docs/manpages/man8/xymond_channel.8.html --- xymon-4.3.12~lucid/docs/manpages/man8/xymond_channel.8.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man8/xymond_channel.8.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMOND_CHANNEL

XYMOND_CHANNEL

-Section: Maintenance Commands (8)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: Maintenance Commands (8)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -149,6 +149,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man8/xymond_client.8.html xymon-4.3.17/docs/manpages/man8/xymond_client.8.html --- xymon-4.3.12~lucid/docs/manpages/man8/xymond_client.8.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man8/xymond_client.8.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMOND_CLIENT

XYMOND_CLIENT

-Section: Maintenance Commands (8)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: Maintenance Commands (8)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -109,6 +109,12 @@

  +

BUGS

+ +The "disk" status cannot handle filesystems containing whitespace in the +filesystem (device) name. +

+ 

SEE ALSO

analysis.cfg(5), xymond(8), xymond_channel(8), xymon(7) @@ -123,12 +129,13 @@
DESCRIPTION
OPTIONS
FILES
-
SEE ALSO
+
BUGS
+
SEE ALSO

This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man8/xymond_distribute.8.html xymon-4.3.17/docs/manpages/man8/xymond_distribute.8.html --- xymon-4.3.12~lucid/docs/manpages/man8/xymond_distribute.8.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man8/xymond_distribute.8.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMOND_DISTRIBUTE

XYMOND_DISTRIBUTE

-Section: Maintenance Commands (8)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: Maintenance Commands (8)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -66,6 +66,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man8/xymond_filestore.8.html xymon-4.3.17/docs/manpages/man8/xymond_filestore.8.html --- xymon-4.3.12~lucid/docs/manpages/man8/xymond_filestore.8.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man8/xymond_filestore.8.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMOND_FILESTORE

XYMOND_FILESTORE

-Section: Maintenance Commands (8)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: Maintenance Commands (8)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -135,6 +135,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man8/xymond_history.8.html xymon-4.3.17/docs/manpages/man8/xymond_history.8.html --- xymon-4.3.12~lucid/docs/manpages/man8/xymond_history.8.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man8/xymond_history.8.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMOND_HISTORY

XYMOND_HISTORY

-Section: Maintenance Commands (8)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: Maintenance Commands (8)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -114,6 +114,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man8/xymond_hostdata.8.html xymon-4.3.17/docs/manpages/man8/xymond_hostdata.8.html --- xymon-4.3.12~lucid/docs/manpages/man8/xymond_hostdata.8.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man8/xymond_hostdata.8.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMOND_HOSTDATA

XYMOND_HOSTDATA

-Section: Maintenance Commands (8)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: Maintenance Commands (8)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -77,6 +77,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man8/xymond_rrd.8.html xymon-4.3.17/docs/manpages/man8/xymond_rrd.8.html --- xymon-4.3.12~lucid/docs/manpages/man8/xymond_rrd.8.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man8/xymond_rrd.8.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMOND_RRD

XYMOND_RRD

-Section: Maintenance Commands (8)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: Maintenance Commands (8)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -484,6 +484,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man8/xymond_sample.8.html xymon-4.3.17/docs/manpages/man8/xymond_sample.8.html --- xymon-4.3.12~lucid/docs/manpages/man8/xymond_sample.8.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man8/xymond_sample.8.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMOND_SAMPLE

XYMOND_SAMPLE

-Section: Maintenance Commands (8)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: Maintenance Commands (8)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -62,6 +62,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man8/xymonfetch.8.html xymon-4.3.17/docs/manpages/man8/xymonfetch.8.html --- xymon-4.3.12~lucid/docs/manpages/man8/xymonfetch.8.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man8/xymonfetch.8.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMONFETCH

XYMONFETCH

-Section: Maintenance Commands (8)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: Maintenance Commands (8)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -102,6 +102,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man8/xymonlaunch.8.html xymon-4.3.17/docs/manpages/man8/xymonlaunch.8.html --- xymon-4.3.12~lucid/docs/manpages/man8/xymonlaunch.8.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man8/xymonlaunch.8.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMONLAUNCH

XYMONLAUNCH

-Section: Maintenance Commands (8)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: Maintenance Commands (8)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -119,6 +119,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man8/xymon-mailack.8.html xymon-4.3.17/docs/manpages/man8/xymon-mailack.8.html --- xymon-4.3.12~lucid/docs/manpages/man8/xymon-mailack.8.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man8/xymon-mailack.8.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMON-MAILACK

XYMON-MAILACK

-Section: Maintenance Commands (8)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: Maintenance Commands (8)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents
  @@ -112,6 +112,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:02 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/docs/manpages/man8/xymonproxy.8.html xymon-4.3.17/docs/manpages/man8/xymonproxy.8.html --- xymon-4.3.12~lucid/docs/manpages/man8/xymonproxy.8.html 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/docs/manpages/man8/xymonproxy.8.html 2014-02-23 09:44:57.000000000 +0000 @@ -3,7 +3,7 @@ Man page of XYMONPROXY

XYMONPROXY

-Section: Maintenance Commands (8)
Updated: Version 4.3.12: 24 Jul 2013
Index +Section: Maintenance Commands (8)
Updated: Version 4.3.17: 23 Feb 2014
Index Return to Main Contents

@@ -259,6 +259,6 @@ This document was created by man2html, using the manual pages.
-Time: 08:12:57 GMT, July 24, 2013 +Time: 09:41:01 GMT, February 23, 2014 diff -Nru xymon-4.3.12~lucid/include/libxymon.h xymon-4.3.17/include/libxymon.h --- xymon-4.3.12~lucid/include/libxymon.h 2012-08-01 08:52:11.000000000 +0000 +++ xymon-4.3.17/include/libxymon.h 2013-07-25 16:05:36.000000000 +0000 @@ -101,6 +101,8 @@ #include "../lib/tree.h" #include "../lib/url.h" #include "../lib/webaccess.h" +#include "../lib/xymond_buffer.h" +#include "../lib/xymond_ipc.h" #endif diff -Nru xymon-4.3.12~lucid/include/version.h xymon-4.3.17/include/version.h --- xymon-4.3.12~lucid/include/version.h 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/include/version.h 2014-02-23 09:44:57.000000000 +0000 @@ -11,7 +11,7 @@ #ifndef __VERSION_H__ #define __VERSION_H__ -#define VERSION "4.3.12" +#define VERSION "4.3.17" #endif diff -Nru xymon-4.3.12~lucid/lib/clientlocal.c xymon-4.3.17/lib/clientlocal.c --- xymon-4.3.12~lucid/lib/clientlocal.c 2011-09-04 06:01:06.000000000 +0000 +++ xymon-4.3.17/lib/clientlocal.c 2014-02-07 07:16:57.000000000 +0000 @@ -11,7 +11,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: clientlocal.c 6745 2011-09-04 06:01:06Z storner $"; +static char rcsid[] = "$Id: clientlocal.c 7391 2014-02-07 07:16:57Z storner $"; #include #include @@ -19,8 +19,22 @@ #include "libxymon.h" -static strbuffer_t *clientconfigs = NULL; -static void * rbconfigs; +typedef struct clientconfig_t { + pcre *hostptn, *classptn, *osptn; + strbuffer_t *config; + struct clientconfig_t *next; +} clientconfig_t; +static clientconfig_t *cchead = NULL; + +typedef struct cctree_t { + char *hostname; + char *config; +} cctree_t; +static void *cctree = NULL; + +/* Feature flag: Set to 1 to merge all matching clientconfig entries into one */ +static int ccmergemode = 0; + void load_clientconfig(void) { @@ -28,7 +42,7 @@ static void *clientconflist = NULL; FILE *fd; strbuffer_t *buf; - char *sectstart; + clientconfig_t *cctail = NULL; if (!configfn) { configfn = (char *)malloc(strlen(xgetenv("XYMONHOME"))+ strlen("/etc/client-local.cfg") + 1); @@ -47,41 +61,121 @@ } } - if (!clientconfigs) { - clientconfigs = newstrbuffer(0); + /* Must reload the config, clear out old cache data */ + if (cchead) { + clientconfig_t *walk, *zombie; + + walk = cchead; + while (walk) { + zombie = walk; walk = walk->next; + if (zombie->hostptn) freeregex(zombie->hostptn); + if (zombie->classptn) freeregex(zombie->classptn); + if (zombie->osptn) freeregex(zombie->osptn); + if (zombie->config) freestrbuffer(zombie->config); + xfree(zombie); + } + cchead = NULL; } - else { - xtreeDestroy(rbconfigs); - clearstrbuffer(clientconfigs); + + if (cctree) { + xtreePos_t handle; + cctree_t *rec; + + handle = xtreeFirst(cctree); + while (handle != xtreeEnd(cctree)) { + rec = xtreeData(cctree, handle); + xfree(rec->hostname); + xfree(rec->config); + handle = xtreeNext(cctree, handle); + } + + xtreeDestroy(cctree); + cctree = NULL; } - rbconfigs = xtreeNew(strcasecmp); - addtobuffer(clientconfigs, "\n"); buf = newstrbuffer(0); - fd = stackfopen(configfn, "r", &clientconflist); if (!fd) return; - while (stackfgets(buf, NULL)) addtostrbuffer(clientconfigs, buf); - stackfclose(fd); - - sectstart = strstr(STRBUF(clientconfigs), "\n["); - while (sectstart) { - char *key, *nextsect; - - sectstart += 2; - key = sectstart; - - sectstart += strcspn(sectstart, "]\n"); - if (*sectstart == ']') { - *sectstart = '\0'; sectstart++; - sectstart += strcspn(sectstart, "\n"); + while (stackfgets(buf, NULL)) { + static int insection = 0; + char *p, *ptn; + + /* Ignore comments and blank lines */ + p = STRBUF(buf); p += strspn(p, " \t\r\n"); if ((*p == '#') || (*p == '\0')) continue; + + if (insection) { + if (*p != '[') { + if (cctail) { + if (!cctail->config) cctail->config = newstrbuffer(0); + addtostrbuffer(cctail->config, buf); + } + } + else { + insection = 0; + } } - nextsect = strstr(sectstart, "\n["); - if (nextsect) *(nextsect+1) = '\0'; - - xtreeAdd(rbconfigs, key, sectstart+1); - sectstart = nextsect; + if (!insection) { + if (*STRBUF(buf) == '[') { + pcre *hostptn = NULL, *classptn = NULL, *osptn = NULL; + clientconfig_t *newrec; + + p = STRBUF(buf) + strcspn(STRBUF(buf), "]\r\n"); + if (*p == ']') { + *p = '\0'; strbufferrecalc(buf); + ptn = STRBUF(buf) + 1; + if (strncasecmp(ptn, "host=", 5) == 0) { + ptn += 5; if (*ptn == '%') ptn++; + hostptn = compileregex((strcmp(ptn, "*") == 0) ? "." : ptn); + if (!hostptn) errprintf("Invalid host pattern in client-local.cfg: %s\n", ptn); + } + else if (strncasecmp(ptn, "class=", 6) == 0) { + ptn += 6; if (*ptn == '%') ptn++; + classptn = compileregex((strcmp(ptn, "*") == 0) ? "." : ptn); + if (!classptn) errprintf("Invalid class pattern in client-local.cfg: %s\n", ptn); + } + else if (strncasecmp(ptn, "os=", 3) == 0) { + ptn += 3; if (*ptn == '%') ptn++; + osptn = compileregex((strcmp(ptn, "*") == 0) ? "." : ptn); + if (!osptn) errprintf("Invalid os pattern in client-local.cfg: %s\n", ptn); + } + else if (*(ptn + strlen(ptn) - 1) == '*') { + /* It's a "blabla*" */ + *(ptn-1) = '^'; /* Ok, we know there is a '[' first */ + strbufferchop(buf, 1); + hostptn = compileregex(ptn-1); + } + else { + /* Old-style matching, must anchor it and match on all possible patterns */ + *(ptn-1) = '^'; /* Ok, we know there is a '[' first */ + addtobuffer(buf, "$"); + /* Compile it three times, because we free each expression when reloading the config */ + hostptn = compileregex(ptn-1); + classptn = compileregex(ptn-1); + osptn = compileregex(ptn-1); + } + + + if (hostptn || classptn || osptn) { + newrec = (clientconfig_t *)calloc(1, sizeof(clientconfig_t)); + newrec->hostptn = hostptn; + newrec->classptn = classptn; + newrec->osptn = osptn; + newrec->next = NULL; + if (!cchead) { + cchead = cctail = newrec; + } + else { + cctail->next = newrec; + cctail = newrec; + } + + insection = 1; + } + } + } + } } + stackfclose(fd); freestrbuffer(buf); } @@ -89,22 +183,60 @@ char *get_clientconfig(char *hostname, char *hostclass, char *hostos) { xtreePos_t handle; - char *result = NULL; + cctree_t *rec = NULL; - if (!clientconfigs) return NULL; + if (!cchead) return NULL; - /* - * Find the client config. Search for a HOSTNAME entry first, - * then the CLIENTCLASS, then CLIENTOS. - */ - handle = xtreeFind(rbconfigs, hostname); - if ((handle == xtreeEnd(rbconfigs)) && hostclass && *hostclass) - handle = xtreeFind(rbconfigs, hostclass); - if ((handle == xtreeEnd(rbconfigs)) && hostos && *hostos) - handle = xtreeFind(rbconfigs, hostos); + if (!cctree) cctree = xtreeNew(strcasecmp); - if (handle != xtreeEnd(rbconfigs)) result = (char *)xtreeData(rbconfigs, handle); + handle = xtreeFind(cctree, hostname); + if (handle == xtreeEnd(cctree)) { + strbuffer_t *config = newstrbuffer(0); + clientconfig_t *walk = cchead; - return result; + if (!ccmergemode) { + /* Old-style: Find the first match of hostname, classname or osname - in that priority */ + clientconfig_t *hostmatch = NULL, *classmatch = NULL, *osmatch = NULL; + + while (walk && !hostmatch) { /* Can stop if we find a hostmatch, since those are priority 1 */ + if (walk->hostptn && !hostmatch && matchregex(hostname, walk->hostptn)) hostmatch = walk; + else if (walk->classptn && !classmatch && matchregex(hostclass, walk->classptn)) classmatch = walk; + else if (walk->osptn && !osmatch && matchregex(hostos, walk->osptn)) osmatch = walk; + + walk = walk->next; + } + + if (hostmatch && hostmatch->config) addtostrbuffer(config, hostmatch->config); + else if (classmatch && classmatch->config) addtostrbuffer(config, classmatch->config); + else if (osmatch && osmatch->config) addtostrbuffer(config, osmatch->config); + } + else { + /* Merge mode: Merge all matching entries into one */ + while (walk) { + if ( (walk->hostptn && matchregex(hostname, walk->hostptn)) || + (walk->classptn && matchregex(hostclass, walk->classptn)) || + (walk->osptn && matchregex(hostos, walk->osptn)) ) { + if (walk->config) addtostrbuffer(config, walk->config); + } + + walk = walk->next; + } + } + + rec = (cctree_t *)calloc(1, sizeof(cctree_t)); + rec->hostname = strdup(hostname); + rec->config = grabstrbuffer(config); + xtreeAdd(cctree, rec->hostname, rec); + } + else { + rec = (cctree_t *)xtreeData(cctree, handle); + } + + return (rec ? rec->config : NULL); +} + +void set_clientlocal_mergemode(int onoff) +{ + ccmergemode = (onoff != 0); } diff -Nru xymon-4.3.12~lucid/lib/clientlocal.h xymon-4.3.17/lib/clientlocal.h --- xymon-4.3.12~lucid/lib/clientlocal.h 2011-07-31 21:01:52.000000000 +0000 +++ xymon-4.3.17/lib/clientlocal.h 2014-02-07 07:16:57.000000000 +0000 @@ -13,5 +13,6 @@ extern void load_clientconfig(void); extern char *get_clientconfig(char *hostname, char *hostclass, char *hostos); +extern void set_clientlocal_mergemode(int onoff); #endif diff -Nru xymon-4.3.12~lucid/lib/color.c xymon-4.3.17/lib/color.c --- xymon-4.3.12~lucid/lib/color.c 2012-07-23 11:47:20.000000000 +0000 +++ xymon-4.3.17/lib/color.c 2013-11-25 08:22:31.000000000 +0000 @@ -11,7 +11,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: color.c 7105 2012-07-23 11:47:20Z storner $"; +static char rcsid[] = "$Id: color.c 7315 2013-11-25 08:22:31Z storner $"; #include #include @@ -114,7 +114,7 @@ else if (use_recentgifs) { strcat(filename, (oldage ? "" : "-recent")); } - strcat(filename, ".gif"); + sprintf(filename+strlen(filename), ".%s", xgetenv("IMAGEFILETYPE")); return filename; } diff -Nru xymon-4.3.12~lucid/lib/environ.c xymon-4.3.17/lib/environ.c --- xymon-4.3.12~lucid/lib/environ.c 2012-07-14 16:32:11.000000000 +0000 +++ xymon-4.3.17/lib/environ.c 2014-01-19 12:17:56.000000000 +0000 @@ -11,7 +11,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: environ.c 7060 2012-07-14 16:32:11Z storner $"; +static char rcsid[] = "$Id: environ.c 7350 2014-01-19 12:17:56Z storner $"; #include #include @@ -36,7 +36,7 @@ { "XYMONSERVERSECCGIURL", "/xymon-cgisecure" }, { "XYMONNETWORK", "" }, { "BBLOCATION", "" }, - { "PATH", "/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:"BUILD_HOME"/bin" }, + { "PATH", "/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:"XYMONHOME"/bin" }, { "DELAYRED", "" }, { "DELAYYELLOW", "" }, { "XYMONDPORT", "1984" }, @@ -67,7 +67,7 @@ { "XYMONSNAPURL", "$XYMONSERVERWWWURL/snap" }, { "XYMONWAP", "$XYMONSERVERWWWURL/wml" }, { "CGIBINURL", "$XYMONSERVERCGIURL" }, - { "XYMONHOME", BUILD_HOME }, + { "XYMONHOME", XYMONHOME }, { "XYMONTMP", "$XYMONHOME/tmp" }, { "HOSTSCFG", "$XYMONHOME/etc/hosts.cfg" }, { "XYMON", "$XYMONHOME/bin/xymon" }, @@ -110,6 +110,7 @@ { "XYMONNONGREENEXT", "eventlog.sh acklog.sh" }, { "DOTHEIGHT", "16" }, { "DOTWIDTH", "16" }, + { "IMAGEFILETYPE", "gif" }, { "RRDHEIGHT", "120" }, { "RRDWIDTH", "576" }, { "COLUMNDOCURL", "$CGIBINURL/columndoc.sh?%s" }, diff -Nru xymon-4.3.12~lucid/lib/eventlog.c xymon-4.3.17/lib/eventlog.c --- xymon-4.3.12~lucid/lib/eventlog.c 2012-07-16 11:08:37.000000000 +0000 +++ xymon-4.3.17/lib/eventlog.c 2013-11-25 08:22:31.000000000 +0000 @@ -13,7 +13,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: eventlog.c 7085 2012-07-16 11:08:37Z storner $"; +static char rcsid[] = "$Id: eventlog.c 7315 2013-11-25 08:22:31Z storner $"; #include #include @@ -802,8 +802,8 @@ xgetenv("XYMONSKIN"), dotgiffilename(ewalk->oldcolor, 0, 0), xgetenv("DOTHEIGHT"), xgetenv("DOTWIDTH"), colorname(ewalk->oldcolor), colorname(ewalk->oldcolor)); - fprintf(output, "\"From\n", - xgetenv("XYMONSKIN")); + fprintf(output, "\"From\n", + xgetenv("XYMONSKIN"), xgetenv("IMAGEFILETYPE")); fprintf(output, "\n", histlogurl(hostname, ewalk->service->name, ewalk->eventtime, NULL)); fprintf(output, "\"%s\"\n", diff -Nru xymon-4.3.12~lucid/lib/headfoot.c xymon-4.3.17/lib/headfoot.c --- xymon-4.3.12~lucid/lib/headfoot.c 2012-07-16 11:08:37.000000000 +0000 +++ xymon-4.3.17/lib/headfoot.c 2014-02-13 11:22:08.000000000 +0000 @@ -11,7 +11,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: headfoot.c 7085 2012-07-16 11:08:37Z storner $"; +static char rcsid[] = "$Id: headfoot.c 7435 2014-02-13 11:22:08Z storner $"; #include #include @@ -55,6 +55,8 @@ static pcre *pagepattern = NULL; static char *ippattern_text = NULL; static pcre *ippattern = NULL; +static char *classpattern_text = NULL; +static pcre *classpattern = NULL; static void * hostnames; static void * testnames; @@ -154,7 +156,7 @@ hostenv_pagepath = strdup(s); } -void sethostenv_filter(char *hostptn, char *pageptn, char *ipptn) +void sethostenv_filter(char *hostptn, char *pageptn, char *ipptn, char *classptn) { const char *errmsg; int errofs; @@ -165,6 +167,8 @@ if (pagepattern) { pcre_free(pagepattern); pagepattern = NULL; } if (ippattern_text) xfree(ippattern_text); if (ippattern) { pcre_free(ippattern); ippattern = NULL; } + if (classpattern_text) xfree(classpattern_text); + if (classpattern) { pcre_free(classpattern); classpattern = NULL; } /* Setup the pattern to match names against */ if (hostptn) { @@ -179,6 +183,10 @@ ippattern_text = strdup(ipptn); ippattern = pcre_compile(ipptn, PCRE_CASELESS, &errmsg, &errofs, NULL); } + if (classptn) { + classpattern_text = strdup(classptn); + classpattern = pcre_compile(classptn, PCRE_CASELESS, &errmsg, &errofs, NULL); + } } static listpool_t *find_listpool(char *listname) @@ -387,6 +395,15 @@ if (result < 0) return NULL; } + if (classpattern && hinfo) { + char *hostclass = xmh_item(hinfo, XMH_CLASS); + if (!hostclass) return NULL; + + result = pcre_exec(classpattern, NULL, hostclass, strlen(hostclass), 0, 0, + ovector, (sizeof(ovector)/sizeof(int))); + if (result < 0) return NULL; + } + return hinfo; } @@ -842,6 +859,9 @@ else if (strcmp(t_start, "IPFILTER") == 0) { if (ippattern_text) fprintf(output, "%s", ippattern_text); } + else if (strcmp(t_start, "CLASSFILTER") == 0) { + if (classpattern_text) fprintf(output, "%s", classpattern_text); + } else if (strcmp(t_start, "HOSTLIST") == 0) { xtreePos_t handle; treerec_t *rec; diff -Nru xymon-4.3.12~lucid/lib/headfoot.h xymon-4.3.17/lib/headfoot.h --- xymon-4.3.12~lucid/lib/headfoot.h 2011-07-31 21:01:52.000000000 +0000 +++ xymon-4.3.17/lib/headfoot.h 2014-02-13 11:22:08.000000000 +0000 @@ -19,7 +19,7 @@ extern void sethostenv_histlog(char *histtime); extern void sethostenv_template(char *dir); extern void sethostenv_refresh(int n); -extern void sethostenv_filter(char *hostptn, char *pageptn, char *ipptn); +extern void sethostenv_filter(char *hostptn, char *pageptn, char *ipptn, char *classptn); extern void sethostenv_clearlist(char *listname); extern void sethostenv_addtolist(char *listname, char *name, char *val, char *extra, int selected); extern void sethostenv_critack(int prio, char *ttgroup, char *ttextra, char *infourl, char *docurl); diff -Nru xymon-4.3.12~lucid/lib/holidays.c xymon-4.3.17/lib/holidays.c --- xymon-4.3.12~lucid/lib/holidays.c 2012-07-14 16:32:11.000000000 +0000 +++ xymon-4.3.17/lib/holidays.c 2013-07-29 04:26:20.000000000 +0000 @@ -12,7 +12,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: holidays.c 7060 2012-07-14 16:32:11Z storner $"; +static char rcsid[] = "$Id: holidays.c 7240 2013-07-29 04:26:20Z storner $"; #include #include @@ -672,10 +672,16 @@ } } else { - int year = atoi(hset); + char *set_tok, *y_tok; + int year; + + set_tok = strtok(hset, " "); + y_tok = strtok(NULL, " "); + year = atoi(y_tok); + load_holidays(year); - printholidays(hset, sbuf); - printf("Holidays in set: %s\n", STRBUF(sbuf)); + printholidays(set_tok, sbuf, 0, 11); + printf("Holidays year %d in set: %s\n", year, STRBUF(sbuf)); clearstrbuffer(sbuf); } } while (1); diff -Nru xymon-4.3.12~lucid/lib/ipaccess.c xymon-4.3.17/lib/ipaccess.c --- xymon-4.3.12~lucid/lib/ipaccess.c 2011-07-31 21:01:52.000000000 +0000 +++ xymon-4.3.17/lib/ipaccess.c 2013-07-25 16:04:40.000000000 +0000 @@ -11,7 +11,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: ipaccess.c 6712 2011-07-31 21:01:52Z storner $"; +static char rcsid[] = "$Id: ipaccess.c 7217 2013-07-25 16:04:40Z storner $"; #include #include @@ -76,6 +76,12 @@ } } + /* If sender is 0.0.0.0 (i.e. it arrived via backfeed channel), then OK */ + if (sender.s_addr == INADDR_ANY) { + dbgprintf("<- oksender(1-c)\n"); + return 1; + } + /* It's someone else reporting about the host. Check the access list */ i = 0; do { diff -Nru xymon-4.3.12~lucid/lib/loadalerts.c xymon-4.3.17/lib/loadalerts.c --- xymon-4.3.12~lucid/lib/loadalerts.c 2012-07-24 16:24:39.000000000 +0000 +++ xymon-4.3.17/lib/loadalerts.c 2014-01-21 16:09:01.000000000 +0000 @@ -12,7 +12,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: loadalerts.c 7120 2012-07-24 16:24:39Z storner $"; +static char rcsid[] = "$Id: loadalerts.c 7359 2014-01-21 16:09:01Z storner $"; #include #include @@ -981,6 +981,8 @@ * this check to all messages. */ if (crit && crit->timespec && !timematch(xmh_item(hinfo, XMH_HOLIDAYS), crit->timespec)) { + /* Try again in a minute */ + if (nexttime) *nexttime = getcurrenttime(NULL) + 60; traceprintf("Failed '%s' (time criteria)\n", cfline); if (!printmode) return 0; } diff -Nru xymon-4.3.12~lucid/lib/loadhosts.c xymon-4.3.17/lib/loadhosts.c --- xymon-4.3.12~lucid/lib/loadhosts.c 2013-04-21 08:55:57.000000000 +0000 +++ xymon-4.3.17/lib/loadhosts.c 2014-01-26 11:24:52.000000000 +0000 @@ -13,7 +13,7 @@ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: loadhosts.c 7184 2013-04-21 08:55:57Z storner $"; +static char rcsid[] = "$Id: loadhosts.c 7374 2014-01-26 11:24:52Z storner $"; #include #include @@ -168,6 +168,12 @@ xmh_item_name[XMH_FLAG_PULLDATA] = "XMH_FLAG_PULLDATA"; xmh_item_key[XMH_FLAG_MULTIHOMED] = "MULTIHOMED"; xmh_item_name[XMH_FLAG_MULTIHOMED] = "XMH_MULTIHOMED"; + xmh_item_key[XMH_FLAG_HTTP_HEADER_MATCH] = "headermatch"; + xmh_item_name[XMH_FLAG_HTTP_HEADER_MATCH] = "XMH_FLAG_HTTP_HEADER_MATCH"; + xmh_item_key[XMH_FLAG_SNI] = "sni"; // Enable SNI (Server name Indication) for TLS requests + xmh_item_name[XMH_FLAG_SNI] = "XMH_FLAG_SNI"; + xmh_item_key[XMH_FLAG_NOSNI] = "nosni"; // Disable SNI (Server name Indication) for TLS requests + xmh_item_name[XMH_FLAG_NOSNI] = "XMH_FLAG_NOSNI"; xmh_item_key[XMH_LDAPLOGIN] = "ldaplogin="; xmh_item_name[XMH_LDAPLOGIN] = "XMH_LDAPLOGIN"; xmh_item_key[XMH_CLASS] = "CLASS:"; diff -Nru xymon-4.3.12~lucid/lib/loadhosts.h xymon-4.3.17/lib/loadhosts.h --- xymon-4.3.12~lucid/lib/loadhosts.h 2011-11-30 11:53:42.000000000 +0000 +++ xymon-4.3.17/lib/loadhosts.h 2014-01-26 11:24:52.000000000 +0000 @@ -54,6 +54,9 @@ XMH_FLAG_HIDEHTTP, XMH_FLAG_PULLDATA, XMH_FLAG_MULTIHOMED, + XMH_FLAG_SNI, + XMH_FLAG_NOSNI, + XMH_FLAG_HTTP_HEADER_MATCH, XMH_LDAPLOGIN, XMH_IP, XMH_HOSTNAME, diff -Nru xymon-4.3.12~lucid/lib/Makefile xymon-4.3.17/lib/Makefile --- xymon-4.3.12~lucid/lib/Makefile 2012-08-02 11:20:21.000000000 +0000 +++ xymon-4.3.17/lib/Makefile 2014-02-10 21:13:18.000000000 +0000 @@ -3,14 +3,14 @@ XYMONLIBOBJS = osdefs.o acklog.o availability.o calc.o cgi.o cgiurls.o clientlocal.o color.o crondate.o digest.o encoding.o environ.o errormsg.o eventlog.o files.o headfoot.o xymonrrd.o holidays.o htmllog.o ipaccess.o loadalerts.o loadcriticalconf.o links.o matching.o md5.o memory.o misc.o msort.o netservices.o notifylog.o readmib.o reportlog.o rmd160c.o sha1.o sha2.o sig.o stackio.o strfunc.o suid.o timefunc.o tree.o url.o webaccess.o -XYMONCOMMLIBOBJS = $(XYMONLIBOBJS) loadhosts.o locator.o sendmsg.o +XYMONCOMMLIBOBJS = $(XYMONLIBOBJS) loadhosts.o locator.o sendmsg.o xymond_ipc.o xymond_buffer.o XYMONTIMELIBOBJS = run.o timing.o CLIENTLIBOBJS = osdefs.o cgiurls.o color-client.o crondate.o digest.o encoding.o environ-client.o errormsg.o holidays.o ipaccess.o md5.o memory.o misc.o msort.o rmd160c.o sha1.o sha2.o sig.o stackio.o strfunc.o suid.o timefunc-client.o tree.o ifeq ($(LOCALCLIENT),yes) CLIENTLIBOBJS += matching.o endif -XYMONCLIENTCOMMLIBOBJS = loadhosts.o sendmsg.o +XYMONCLIENTCOMMLIBOBJS = locator.o loadhosts.o sendmsg.o xymond_ipc.o xymond_buffer.o XYMONCLIENTLIB = libxymonclient.a XYMONCLIENTLIBS = $(XYMONCLIENTLIB) @@ -27,7 +27,7 @@ CFLAGS += -I../include -all: test-endianness $(XYMONLIB) $(XYMONCOMMLIB) $(XYMONTIMELIB) $(XYMONCLIENTCOMMLIB) $(XYMONCLIENTLIB) loadhosts stackio availability md5 sha1 rmd160 locator +all: test-endianness $(XYMONLIB) $(XYMONCOMMLIB) $(XYMONTIMELIB) $(XYMONCLIENTCOMMLIB) $(XYMONCLIENTLIB) loadhosts stackio availability md5 sha1 rmd160 locator tree client: test-endianness $(XYMONCLIENTLIB) $(XYMONCLIENTCOMMLIB) $(XYMONTIMELIB) @@ -79,10 +79,10 @@ $(CC) $(CFLAGS) `./test-endianness` -c -o $@ $< environ.o: environ.c - $(CC) $(CFLAGS) -DXYMONTOPDIR=\"$(XYMONTOPDIR)\" -DXYMONLOGDIR=\"$(XYMONLOGDIR)\" -DXYMONHOSTNAME=\"$(XYMONHOSTNAME)\" -DXYMONHOSTIP=\"$(XYMONHOSTIP)\" -DXYMONHOSTOS=\"$(XYMONHOSTOS)\" -DBUILD_HOME=\"$(XYMONTOPDIR)/server\" -c -o $@ environ.c + $(CC) $(CFLAGS) -DXYMONTOPDIR=\"$(XYMONTOPDIR)\" -DXYMONLOGDIR=\"$(XYMONLOGDIR)\" -DXYMONHOSTNAME=\"$(XYMONHOSTNAME)\" -DXYMONHOSTIP=\"$(XYMONHOSTIP)\" -DXYMONHOSTOS=\"$(XYMONHOSTOS)\" -DXYMONHOME=\"$(XYMONHOME)\" -c -o $@ environ.c environ-client.o: environ.c - $(CC) $(CFLAGS) -DXYMONTOPDIR=\"$(XYMONTOPDIR)\" -DXYMONLOGDIR=\"$(XYMONLOGDIR)\" -DXYMONHOSTNAME=\"$(XYMONHOSTNAME)\" -DXYMONHOSTIP=\"$(XYMONHOSTIP)\" -DXYMONHOSTOS=\"$(XYMONHOSTOS)\" -DBUILD_HOME=\"$(XYMONTOPDIR)/client\" -c -o $@ environ.c + $(CC) $(CFLAGS) -DXYMONTOPDIR=\"$(XYMONTOPDIR)\" -DXYMONLOGDIR=\"$(XYMONLOGDIR)\" -DXYMONHOSTNAME=\"$(XYMONHOSTNAME)\" -DXYMONHOSTIP=\"$(XYMONHOSTIP)\" -DXYMONHOSTOS=\"$(XYMONHOSTOS)\" -DXYMONHOME=\"$(XYMONCLIENTHOME)\" -c -o $@ environ.c color-client.o: color.c $(CC) $(CFLAGS) -DCLIENTONLY -c -o $@ $< @@ -111,6 +111,9 @@ locator: locator.c $(CC) $(CFLAGS) -DSTANDALONE -o $@ locator.c $(XYMONCOMMLIBS) $(XYMONLIBS) +tree: tree.c + $(CC) $(CFLAGS) -DSTANDALONE -o $@ tree.c + clean: - rm -f *.o *.a *~ loadhosts stackio availability test-endianness md5 sha1 rmd160 locator + rm -f *.o *.a *~ loadhosts stackio availability test-endianness md5 sha1 rmd160 locator tree diff -Nru xymon-4.3.12~lucid/lib/memory.c xymon-4.3.17/lib/memory.c --- xymon-4.3.12~lucid/lib/memory.c 2011-07-31 21:01:52.000000000 +0000 +++ xymon-4.3.17/lib/memory.c 2014-01-26 11:12:07.000000000 +0000 @@ -11,7 +11,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: memory.c 6712 2011-07-31 21:01:52Z storner $"; +static char rcsid[] = "$Id: memory.c 7371 2014-01-26 11:12:07Z storner $"; #include #include @@ -359,3 +359,20 @@ return printedbytes; } + +char *xresultbuf(int maxsz) +{ + static char rrbuf[10000]; + static char *rrbufnext = rrbuf; + char *result; + + if ((rrbufnext + maxsz) >= (rrbuf + sizeof(rrbuf))) + result = rrbufnext = rrbuf; + else { + result = rrbufnext; + rrbufnext += maxsz; + } + + return result; +} + diff -Nru xymon-4.3.12~lucid/lib/memory.h xymon-4.3.17/lib/memory.h --- xymon-4.3.12~lucid/lib/memory.h 2011-07-31 21:01:52.000000000 +0000 +++ xymon-4.3.17/lib/memory.h 2014-01-26 11:12:07.000000000 +0000 @@ -36,6 +36,7 @@ extern char *xstrncat(char *dest, const char *src, size_t maxlen); extern char *xstrncpy(char *dest, const char *src, size_t maxlen); extern int xsprintf(char *dest, const char *fmt, ...); +extern char *xresultbuf(int maxsz); #ifdef XYMON_MEMORY_WRAPPERS diff -Nru xymon-4.3.12~lucid/lib/misc.c xymon-4.3.17/lib/misc.c --- xymon-4.3.12~lucid/lib/misc.c 2012-07-13 16:29:38.000000000 +0000 +++ xymon-4.3.17/lib/misc.c 2014-01-19 21:18:21.000000000 +0000 @@ -11,7 +11,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: misc.c 7040 2012-07-13 16:29:38Z storner $"; +static char rcsid[] = "$Id: misc.c 7355 2014-01-19 21:18:21Z storner $"; #include "config.h" @@ -204,7 +204,7 @@ } -char *msg_data(char *msg) +char *msg_data(char *msg, int stripcr) { /* Find the start position of the data following the "status host.test " message */ char *result; @@ -220,6 +220,15 @@ result += strcspn(result, " \t\n"); /* Skip anything until we see a space, TAB or NL */ result += strspn(result, " \t"); /* Skip all whitespace */ + if (stripcr) { + /* Replace with blanks */ + char *cr = result; + do { + cr = strchr(cr, '\r'); + if (cr) *cr = ' '; + } while (cr); + } + return result; } diff -Nru xymon-4.3.12~lucid/lib/misc.h xymon-4.3.17/lib/misc.h --- xymon-4.3.12~lucid/lib/misc.h 2012-07-13 16:29:38.000000000 +0000 +++ xymon-4.3.17/lib/misc.h 2013-08-15 08:53:34.000000000 +0000 @@ -23,7 +23,7 @@ extern char *skipword(char *l); extern char *skipwhitespace(char *l); extern int argnmatch(char *arg, char *match); -extern char *msg_data(char *msg); +extern char *msg_data(char *msg, int stripcr); extern char *gettok(char *s, char *delims); extern char *wstok(char *s); extern void sanitize_input(strbuffer_t *l, int stripcomment, int unescape); diff -Nru xymon-4.3.12~lucid/lib/sendmsg.c xymon-4.3.17/lib/sendmsg.c --- xymon-4.3.12~lucid/lib/sendmsg.c 2013-07-23 12:20:59.000000000 +0000 +++ xymon-4.3.17/lib/sendmsg.c 2014-01-07 11:16:14.000000000 +0000 @@ -11,7 +11,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: sendmsg.c 7204 2013-07-23 12:20:59Z storner $"; +static char rcsid[] = "$Id: sendmsg.c 7325 2014-01-07 11:16:14Z storner $"; #include "config.h" @@ -32,12 +32,21 @@ #include #include +#include +#include +#include +#include +#include + +#include +#include + #include "libxymon.h" #define SENDRETRIES 2 /* These commands go to all Xymon servers */ -static char *multircptcmds[] = { "status", "combo", "meta", "data", "notify", "enable", "disable", "drop", "rename", "client", NULL }; +static char *multircptcmds[] = { "status", "combo", "extcombo", "meta", "data", "notify", "enable", "disable", "drop", "rename", "client", NULL }; static char errordetails[1024]; /* Stuff for combo message handling */ @@ -48,19 +57,25 @@ static strbuffer_t *xymonmsg = NULL; /* Complete combo message buffer */ static strbuffer_t *msgbuf = NULL; /* message buffer for one status message */ static int msgcolor; /* color of status message in msgbuf */ +static int combo_is_local = 0; static int maxmsgspercombo = 100; /* 0 = no limit. 100 is a reasonable default. */ static int sleepbetweenmsgs = 0; static int xymondportnumber = 0; static char *xymonproxyhost = NULL; static int xymonproxyport = 0; static char *proxysetting = NULL; +static char *comboofsstr = NULL; +static int comboofssz = 0; +static int *combooffsets = NULL; static int xymonmetaqueued; /* Anything in the buffer ? */ static strbuffer_t *metamsg = NULL; /* Complete meta message buffer */ static strbuffer_t *metabuf = NULL; /* message buffer for one meta message */ -int dontsendmessages = 0; +static int backfeedqueue = -1; +static int max_backfeedsz = 16384; +int dontsendmessages = 0; void setproxy(char *proxy) { @@ -442,6 +457,8 @@ * server. */ + // errprintf("sendtomany: onercpt=%s\n", onercpt); + if (strcmp(onercpt, "0.0.0.0") != 0) allservers = 0; else if (strncmp(msg, "schedule", 8) == 0) @@ -455,12 +472,15 @@ i = strspn(msg, "abcdefghijklmnopqrstuvwxyz"); msgcmd = (char *)malloc(i+1); strncpy(msgcmd, msg, i); *(msgcmd+i) = '\0'; + // errprintf("sendtomany: msgcmd=%s\n", msgcmd); for (i = 0; (multircptcmds[i] && strcmp(multircptcmds[i], msgcmd)); i++) ; xfree(msgcmd); allservers = (multircptcmds[i] != NULL); } + // errprintf("sendtomany: allservers=%d\n", allservers); + if (allservers && !morercpts) { sprintf(errordetails+strlen(errordetails), "No recipients listed! XYMSRV was %s, XYMSERVERS %s", onercpt, textornull(morercpts)); @@ -568,6 +588,51 @@ } +int sendmessage_init_local(void) +{ + backfeedqueue = setup_feedback_queue(CHAN_CLIENT); + if (backfeedqueue == -1) return -1; + + max_backfeedsz = 1024*shbufsz(C_FEEDBACK_QUEUE)-1; + return max_backfeedsz; +} + +void sendmessage_finish_local(void) +{ + close_feedback_queue(backfeedqueue, CHAN_CLIENT); +} + +sendresult_t sendmessage_local(char *msg) +{ + int n, done = 0; + msglen_t msglen; + + if (backfeedqueue == -1) { + return sendmessage(msg, NULL, XYMON_TIMEOUT, NULL); + } + + /* Make sure we dont overflow the message buffer */ + msglen = strlen(msg); + if (msglen > max_backfeedsz) { + errprintf("Truncating backfeed channel message from %d to %d\n", msglen, max_backfeedsz); + *(msg+max_backfeedsz) = '\0'; + msglen = max_backfeedsz; + } + + /* This will block if queue is full, but that is OK */ + do { + n = msgsnd(backfeedqueue, msg, msglen+1, 0); + if ((n == 0) || ((n == -1) && (errno != EINTR))) done = 1; + } while (!done); + + if (n == -1) { + errprintf("Sending via backfeed channel failed: %s\n", strerror(errno)); + return XYMONSEND_ECONNFAILED; + } + + return XYMONSEND_OK; +} + sendresult_t sendmessage(char *msg, char *recipient, int timeout, sendreturn_t *response) { @@ -639,16 +704,36 @@ } if (xgetenv("SLEEPBETWEENMSGS")) sleepbetweenmsgs = atoi(xgetenv("SLEEPBETWEENMSGS")); + + comboofssz = 10*maxmsgspercombo; + comboofsstr = (char *)malloc(comboofssz+1); + combooffsets = (int *)malloc((maxmsgspercombo+1)*sizeof(int)); } void combo_start(void) { + int n; + combo_params(); + memset(comboofsstr, ' ', comboofssz); + memcpy(comboofsstr, "extcombo", 8); + *(comboofsstr + comboofssz) = '\0'; + + memset(combooffsets, 0, maxmsgspercombo*sizeof(int)); + combooffsets[0] = comboofssz; + if (xymonmsg == NULL) xymonmsg = newstrbuffer(0); clearstrbuffer(xymonmsg); - addtobuffer(xymonmsg, "combo\n"); + addtobufferraw(xymonmsg, comboofsstr, comboofssz); xymonmsgqueued = 0; + combo_is_local = 0; +} + +void combo_start_local(void) +{ + combo_start(); + combo_is_local = 1; } void meta_start(void) @@ -660,12 +745,20 @@ static void combo_flush(void) { + int i; + char *outp; if (!xymonmsgqueued) { dbgprintf("Flush, but xymonmsg is empty\n"); return; } + outp = strchr(STRBUF(xymonmsg), ' '); + for (i = 0; (i <= xymonmsgqueued); i++) { + outp += sprintf(outp, " %d", combooffsets[i]); + } + *outp = '\n'; + if (debug) { char *p1, *p2; @@ -685,8 +778,14 @@ } while (p1 && p2); } - sendmessage(STRBUF(xymonmsg), NULL, XYMON_TIMEOUT, NULL); - combo_start(); /* Get ready for the next */ + if (combo_is_local) { + sendmessage_local(STRBUF(xymonmsg)); + combo_start_local(); + } + else { + sendmessage(STRBUF(xymonmsg), NULL, XYMON_TIMEOUT, NULL); + combo_start(); + } } static void meta_flush(void) @@ -700,20 +799,23 @@ meta_start(); /* Get ready for the next */ } -static void combo_add(strbuffer_t *buf) +void combo_add(strbuffer_t *buf) { - /* Check if there is room for the message + 2 newlines */ - if (maxmsgspercombo && (xymonmsgqueued >= maxmsgspercombo)) { - /* Nope ... flush buffer */ - combo_flush(); + if (combo_is_local) { + /* Check if message fits into the backfeed message buffer */ + if ( (STRBUFLEN(xymonmsg) + STRBUFLEN(buf)) >= max_backfeedsz) { + combo_flush(); + } } else { - /* Yep ... add delimiter before new status (but not before the first!) */ - if (xymonmsgqueued) addtobuffer(xymonmsg, "\n\n"); + /* Check if there is room for the message + 2 newlines */ + if (maxmsgspercombo && (xymonmsgqueued >= maxmsgspercombo)) { + combo_flush(); + } } addtostrbuffer(xymonmsg, buf); - xymonmsgqueued++; + combooffsets[++xymonmsgqueued] = STRBUFLEN(xymonmsg); } static void meta_add(strbuffer_t *buf) @@ -735,6 +837,7 @@ void combo_end(void) { combo_flush(); + combo_is_local = 0; dbgprintf("%d status messages merged into %d transmissions\n", xymonstatuscount, xymonmsgcount); } diff -Nru xymon-4.3.12~lucid/lib/sendmsg.h xymon-4.3.17/lib/sendmsg.h --- xymon-4.3.12~lucid/lib/sendmsg.h 2011-07-31 21:01:52.000000000 +0000 +++ xymon-4.3.17/lib/sendmsg.h 2013-08-05 11:54:11.000000000 +0000 @@ -48,6 +48,12 @@ extern void combo_start(void); extern void combo_end(void); +extern void combo_add(strbuffer_t *msg); +extern void combo_start_local(void); + +extern int sendmessage_init_local(void); +extern void sendmessage_finish_local(void); +extern sendresult_t sendmessage_local(char *msg); extern void init_status(int color); extern void addtostatus(char *p); diff -Nru xymon-4.3.12~lucid/lib/strfunc.c xymon-4.3.17/lib/strfunc.c --- xymon-4.3.12~lucid/lib/strfunc.c 2013-04-21 10:53:07.000000000 +0000 +++ xymon-4.3.17/lib/strfunc.c 2014-02-04 16:08:37.000000000 +0000 @@ -11,13 +11,14 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: strfunc.c 7186 2013-04-21 10:53:07Z storner $"; +static char rcsid[] = "$Id: strfunc.c 7390 2014-02-04 16:08:37Z storner $"; #include "config.h" #include #include #include +#include #include "libxymon.h" #include "version.h" @@ -122,6 +123,20 @@ if (newtext) strbuf_addtobuffer(buf, newtext, strlen(newtext)); } +void addtobuffer_many(strbuffer_t *buf, ...) +{ + va_list ap; + char *newtext; + + va_start(ap, buf); + newtext = va_arg(ap, char *); + while (newtext) { + strbuf_addtobuffer(buf, newtext, strlen(newtext)); + newtext = va_arg(ap, char *); + } + va_end(ap); +} + void addtostrbuffer(strbuffer_t *buf, strbuffer_t *newtext) { strbuf_addtobuffer(buf, STRBUF(newtext), STRBUFLEN(newtext)); diff -Nru xymon-4.3.12~lucid/lib/strfunc.h xymon-4.3.17/lib/strfunc.h --- xymon-4.3.12~lucid/lib/strfunc.h 2011-07-31 21:01:52.000000000 +0000 +++ xymon-4.3.17/lib/strfunc.h 2014-01-19 15:40:00.000000000 +0000 @@ -14,6 +14,7 @@ extern strbuffer_t *newstrbuffer(int initialsize); extern strbuffer_t *convertstrbuffer(char *buffer, int bufsz); extern void addtobuffer(strbuffer_t *buf, char *newtext); +extern void addtobuffer_many(strbuffer_t *buf, ...); extern void addtostrbuffer(strbuffer_t *buf, strbuffer_t *newtext); extern void addtobufferraw(strbuffer_t *buf, char *newdata, int bytes); extern void clearstrbuffer(strbuffer_t *buf); diff -Nru xymon-4.3.12~lucid/lib/timefunc.c xymon-4.3.17/lib/timefunc.c --- xymon-4.3.12~lucid/lib/timefunc.c 2012-07-14 16:32:11.000000000 +0000 +++ xymon-4.3.17/lib/timefunc.c 2014-02-13 09:58:18.000000000 +0000 @@ -11,7 +11,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: timefunc.c 7060 2012-07-14 16:32:11Z storner $"; +static char rcsid[] = "$Id: timefunc.c 7433 2014-02-13 09:58:18Z storner $"; #include #include @@ -122,6 +122,8 @@ oneday = days; + if (STRBUFLEN(result) > 0) addtobuffer(result, "
"); + while (!daysdone) { switch (*oneday) { case '*': dtext = "All days"; break; diff -Nru xymon-4.3.12~lucid/lib/timing.c xymon-4.3.17/lib/timing.c --- xymon-4.3.12~lucid/lib/timing.c 2012-07-14 16:32:11.000000000 +0000 +++ xymon-4.3.17/lib/timing.c 2014-01-07 12:40:09.000000000 +0000 @@ -11,8 +11,9 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: timing.c 7060 2012-07-14 16:32:11Z storner $"; +static char rcsid[] = "$Id: timing.c 7328 2014-01-07 12:40:09Z storner $"; +#include // For POSIX timer definitions #include #include #include @@ -36,6 +37,9 @@ time_t gettimer(void) { + int res; + struct timespec t; + #if (_POSIX_TIMERS > 0) && defined(_POSIX_MONOTONIC_CLOCK) res = clock_gettime(CLOCK_MONOTONIC, &t); if(-1 == res) @@ -56,6 +60,7 @@ { struct timeval t; struct timezone tz; + int res; #if (_POSIX_TIMERS > 0) && defined(_POSIX_MONOTONIC_CLOCK) res = clock_gettime(CLOCK_MONOTONIC, tp); diff -Nru xymon-4.3.12~lucid/lib/tree.c xymon-4.3.17/lib/tree.c --- xymon-4.3.12~lucid/lib/tree.c 2013-04-21 10:30:59.000000000 +0000 +++ xymon-4.3.17/lib/tree.c 2014-02-08 21:49:50.000000000 +0000 @@ -19,8 +19,214 @@ #include #include +#include "config.h" #include "tree.h" + +#ifdef HAVE_BINARY_TREE +#include + +typedef struct treerec_t { + char *key; + void *userdata; + int (*compare)(const char *a, const char *b); + struct treerec_t *link; +} treerec_t; + +typedef struct xtree_t { + void *root; + int (*compare)(const char *a, const char *b); +} xtree_t; +static treerec_t *i_curr = NULL; + + +static int xtree_i_compare(const void *pa, const void *pb) +{ + const treerec_t *reca = pa, *recb = pb; + return (reca->compare)(reca->key, recb->key); +} + + +void *xtreeNew(int(*xtreeCompare)(const char *a, const char *b)) +{ + xtree_t *newtree; + + newtree = (xtree_t *)calloc(1, sizeof(xtree_t)); + newtree->compare = xtreeCompare; + newtree->root = NULL; + + return newtree; +} + +void xtreeDestroy(void *treehandle) +{ + free(treehandle); +} + +xtreeStatus_t xtreeAdd(void *treehandle, char *key, void *userdata) +{ + xtree_t *tree = treehandle; + treerec_t *rec, **erec; + + if (!tree) return XTREE_STATUS_NOTREE; + + rec = (treerec_t *)calloc(1, sizeof(treerec_t)); + rec->key = key; + rec->userdata = userdata; + rec->compare = tree->compare; + + erec = tsearch(rec, &tree->root, xtree_i_compare); + if (erec == NULL) { + free(rec); + return XTREE_STATUS_MEM_EXHAUSTED; + } + if (*erec != rec) { + /* Was already there */ + free(rec); + return XTREE_STATUS_DUPLICATE_KEY; + } + + return XTREE_STATUS_OK; +} + + +void *xtreeDelete(void *treehandle, char *key) +{ + xtree_t *tree = treehandle; + treerec_t **result, *zombie, rec; + void *userdata; + + if (!tree) return NULL; + + rec.key = key; + rec.userdata = NULL; + rec.compare = tree->compare; + result = tfind(&rec, &tree->root, xtree_i_compare); + if (result == NULL) { + /* Not found */ + return NULL; + } + + userdata = (*result)->userdata; + zombie = (*result); + tdelete(&rec, &tree->root, xtree_i_compare); + free(zombie); + + return userdata; +} + + +xtreePos_t xtreeFind(void *treehandle, char *key) +{ + xtree_t *tree = treehandle; + treerec_t **result, rec; + + if (!tree) return NULL; + + rec.key = key; + rec.userdata = NULL; + rec.compare = tree->compare; + result = tfind(&rec, &tree->root, xtree_i_compare); + + return (result ? *result : NULL); +} + + +static void xtree_i_action(const void *nodep, const VISIT which, const int depth) +{ + treerec_t *rec = NULL; + + switch (which) { + case preorder: + break; + case postorder: + rec = *(treerec_t **) nodep; + break; + case endorder: + break; + case leaf: + rec = *(treerec_t **) nodep; + break; + } + + if (rec) { + /* + * Each time here, we have rec pointing to the next record in the tree, and i_curr is then + * pointing to the previous record. So build a linked list of the records going backwards + * as we move through the tree. + * + * R0 <- R1:link <- R2:link <- R3:link + * ^ + * i_curr + * + * becomes + * + * R0 <- R1:link <- R2:link <- R3:link <- rec:link + * ^ + * i_curr + */ + rec->link = i_curr; + i_curr = rec; + } +} + +xtreePos_t xtreeFirst(void *treehandle) +{ + xtree_t *tree = treehandle; + treerec_t *walk, *right, *left; + + if (!tree) return NULL; + + i_curr = NULL; + twalk(tree->root, xtree_i_action); + if (!i_curr) return NULL; + + /* + * We have walked the tree and created a reverse-linked list of the records. + * Now reverse the list so we get the records in the right sequence. + * i_curr points to the last entry. + * + * R1 <- R2 <- R3 <- R4 + * ^ + * i_curr + * + * must be reversed to + * + * R1 -> R2 -> R3 -> R4 + */ + + walk = i_curr; + right = NULL; + while (walk->link) { + left = walk->link; + walk->link = right; + right = walk; + walk = left; + } + walk->link = right; + + i_curr = NULL; + return walk; +} + +xtreePos_t xtreeNext(void *treehandle, xtreePos_t pos) +{ + return pos ? ((treerec_t *)pos)->link : NULL; +} + + +char *xtreeKey(void *treehandle, xtreePos_t pos) +{ + return pos ? ((treerec_t *)pos)->key : NULL; +} + +void *xtreeData(void *treehandle, xtreePos_t pos) +{ + return pos ? ((treerec_t *)pos)->userdata : NULL; +} + +#else + typedef struct treerec_t { char *key; void *userdata; @@ -262,6 +468,7 @@ return NULL; } +#endif #ifdef STANDALONE @@ -270,6 +477,7 @@ char buf[1024], key[1024], data[1024]; void *th = NULL; xtreePos_t n; + xtreeStatus_t stat; char *rec, *p; do { @@ -286,8 +494,8 @@ p = strchr(key, '\n'); if (p) *p = '\0'; printf("Data:");fflush(stdout); fgets(data, sizeof(data), stdin); p = strchr(data, '\n'); if (p) *p = '\0'; - n = xtreeAdd(th, strdup(key), strdup(data)); - printf("Result: %d\n", n); + stat = xtreeAdd(th, strdup(key), strdup(data)); + printf("Result: %d\n", stat); break; case 'D': case 'd': @@ -306,7 +514,7 @@ printf("Key:");fflush(stdout); fgets(key, sizeof(key), stdin); p = strchr(key, '\n'); if (p) *p = '\0'; n = xtreeFind(th, key); - if (n >= 0) { + if (n != xtreeEnd(th)) { printf("Found record: Data was '%s'\n", (char *)xtreeData(th, n)); } else { @@ -316,8 +524,8 @@ case 'U': case 'u': n = xtreeFirst(th); - while (n >= 0) { - printf("%02d: Key '%s', data '%s'\n", n, (char *)xtreeKey(th, n), (char *)xtreeData(th, n)); + while (n != xtreeEnd(th)) { + printf("Key '%s', data '%s'\n", (char *)xtreeKey(th, n), (char *)xtreeData(th, n)); n = xtreeNext(th, n); } break; diff -Nru xymon-4.3.12~lucid/lib/tree.h xymon-4.3.17/lib/tree.h --- xymon-4.3.12~lucid/lib/tree.h 2011-09-04 06:01:06.000000000 +0000 +++ xymon-4.3.17/lib/tree.h 2014-02-08 21:49:50.000000000 +0000 @@ -22,9 +22,13 @@ XTREE_STATUS_NOTREE } xtreeStatus_t; +#ifdef HAVE_BINARY_TREE +#define xtreeEnd(X) (NULL) +typedef void *xtreePos_t; +#else #define xtreeEnd(X) (-1) - typedef int xtreePos_t; +#endif extern void *xtreeNew(int(*xtreeCompare)(const char *a, const char *b)); extern void xtreeDestroy(void *treehandle); diff -Nru xymon-4.3.12~lucid/lib/xymond_buffer.c xymon-4.3.17/lib/xymond_buffer.c --- xymon-4.3.12~lucid/lib/xymond_buffer.c 1970-01-01 00:00:00.000000000 +0000 +++ xymon-4.3.17/lib/xymond_buffer.c 2013-07-25 16:04:40.000000000 +0000 @@ -0,0 +1,64 @@ +/*----------------------------------------------------------------------------*/ +/* Xymon message daemon. */ +/* */ +/* This module contains a shared routine to find the size of a shared memory */ +/* buffer used for one of the Xymon communications-channels. */ +/* */ +/* Copyright (C) 2004-2011 Henrik Storner */ +/* */ +/* This program is released under the GNU General Public License (GPL), */ +/* version 2. See the file "COPYING" for details. */ +/* */ +/*----------------------------------------------------------------------------*/ + +static char rcsid[] = "$Id: xymond_buffer.c 7217 2013-07-25 16:04:40Z storner $"; + +#include +#include + +#include "libxymon.h" +#include "xymond_buffer.h" + +unsigned int shbufsz(enum msgchannels_t chnid) +{ + unsigned int defvalue = 0, result = 0; + char *v = NULL; + + if (chnid != C_LAST) { + switch (chnid) { + case C_STATUS: v = getenv("MAXMSG_STATUS"); defvalue = 256; break; + case C_CLIENT: v = getenv("MAXMSG_CLIENT"); defvalue = 512; break; + case C_CLICHG: v = getenv("MAXMSG_CLICHG"); defvalue = shbufsz(C_CLIENT); break; + case C_DATA: v = getenv("MAXMSG_DATA"); defvalue = 256; break; + case C_NOTES: v = getenv("MAXMSG_NOTES"); defvalue = 256; break; + case C_STACHG: v = getenv("MAXMSG_STACHG"); defvalue = shbufsz(C_STATUS); break; + case C_PAGE: v = getenv("MAXMSG_PAGE"); defvalue = shbufsz(C_STATUS); break; + case C_ENADIS: v = getenv("MAXMSG_ENADIS"); defvalue = 32; break; + case C_USER: v = getenv("MAXMSG_USER"); defvalue = 128; break; + case C_FEEDBACK_QUEUE: v = getenv("MAXMSG_STATUS"); defvalue = 256; break; + default: break; + } + + if (v) { + result = atoi(v); + /* See if it is an old setting in bytes */ + if (result > 32*1024) result = (result / 1024); + } + + if (result < 32) result = defvalue; + } + else { + enum msgchannels_t i; + unsigned int isz; + + result = 0; + + for (i=C_STATUS; (i < C_LAST); i++) { + isz = shbufsz(i); + if (isz > result) result = isz; + } + } + + return result; +} + diff -Nru xymon-4.3.12~lucid/lib/xymond_buffer.h xymon-4.3.17/lib/xymond_buffer.h --- xymon-4.3.12~lucid/lib/xymond_buffer.h 1970-01-01 00:00:00.000000000 +0000 +++ xymon-4.3.17/lib/xymond_buffer.h 2013-07-25 16:04:40.000000000 +0000 @@ -0,0 +1,18 @@ +/*----------------------------------------------------------------------------*/ +/* Xymon message daemon. */ +/* */ +/* Copyright (C) 2004-2011 Henrik Storner */ +/* */ +/* This program is released under the GNU General Public License (GPL), */ +/* version 2. See the file "COPYING" for details. */ +/* */ +/*----------------------------------------------------------------------------*/ + +#ifndef __XYMOND_BUFFER_H__ +#define __XYMOND_BUFFER_H__ + +enum msgchannels_t { C_STATUS=1, C_STACHG, C_PAGE, C_DATA, C_NOTES, C_ENADIS, C_CLIENT, C_CLICHG, C_USER, C_FEEDBACK_QUEUE, C_LAST }; + +extern unsigned int shbufsz(enum msgchannels_t chnid); +#endif + diff -Nru xymon-4.3.12~lucid/lib/xymond_ipc.c xymon-4.3.17/lib/xymond_ipc.c --- xymon-4.3.12~lucid/lib/xymond_ipc.c 1970-01-01 00:00:00.000000000 +0000 +++ xymon-4.3.17/lib/xymond_ipc.c 2013-08-16 09:47:06.000000000 +0000 @@ -0,0 +1,191 @@ +/*----------------------------------------------------------------------------*/ +/* Xymon message daemon. */ +/* */ +/* This module implements the setup/teardown of the xymond communications */ +/* channel, using standard System V IPC mechanisms: Shared memory and */ +/* semaphores. */ +/* */ +/* The concept is to use a shared memory segment for each "channel" that */ +/* xymond supports. This memory segment is used to pass a single xymond */ +/* message between the xymond master daemon, and the xymond_channel workers. */ +/* Two semaphores are used to synchronize between the master daemon and the */ +/* workers, i.e. the workers wait for a semaphore to go up indicating that a */ +/* new message has arrived, and the master daemon then waits for the other */ +/* semaphore to go 0 indicating that the workers have read the message. A */ +/* third semaphore is used as a simple counter to tell how many workers have */ +/* attached to a channel. */ +/* */ +/* Copyright (C) 2004-2011 Henrik Storner */ +/* */ +/* This program is released under the GNU General Public License (GPL), */ +/* version 2. See the file "COPYING" for details. */ +/* */ +/*----------------------------------------------------------------------------*/ + +static char rcsid[] = "$Id: xymond_ipc.c 7283 2013-08-16 09:47:06Z storner $"; + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "libxymon.h" + +#include "xymond_ipc.h" + +char *channelnames[C_LAST+1] = { + "", /* First one is index 0 - not used */ + "status", + "stachg", + "page", + "data", + "notes", + "enadis", + "client", + "clichg", + "user", + "feedback", + NULL +}; + +xymond_channel_t *setup_channel(enum msgchannels_t chnid, int role) +{ + key_t key; + struct stat st; + struct sembuf s; + xymond_channel_t *newch; + unsigned int bufsz; + int flags = ((role == CHAN_MASTER) ? (IPC_CREAT | 0600) : 0); + char *xymonhome = xgetenv("XYMONHOME"); + + if ( (xymonhome == NULL) || (stat(xymonhome, &st) == -1) ) { + errprintf("XYMONHOME not defined, or points to invalid directory - cannot continue.\n"); + return NULL; + } + + bufsz = 1024*shbufsz(chnid); + dbgprintf("Setting up %s channel (id=%d)\n", channelnames[chnid], chnid); + + dbgprintf("calling ftok('%s',%d)\n", xymonhome, chnid); + key = ftok(xymonhome, chnid); + if (key == -1) { + errprintf("Could not generate shmem key based on %s: %s\n", xymonhome, strerror(errno)); + return NULL; + } + dbgprintf("ftok() returns: 0x%X\n", key); + + newch = (xymond_channel_t *)malloc(sizeof(xymond_channel_t)); + newch->seq = 0; + newch->channelid = chnid; + newch->msgcount = 0; + newch->shmid = shmget(key, bufsz, flags); + if (newch->shmid == -1) { + errprintf("Could not get shm of size %d: %s\n", bufsz, strerror(errno)); + xfree(newch); + return NULL; + } + dbgprintf("shmget() returns: 0x%X\n", newch->shmid); + + newch->channelbuf = (char *) shmat(newch->shmid, NULL, 0); + if (newch->channelbuf == (char *)-1) { + errprintf("Could not attach shm %s\n", strerror(errno)); + if (role == CHAN_MASTER) shmctl(newch->shmid, IPC_RMID, NULL); + xfree(newch); + return NULL; + } + + newch->semid = semget(key, 3, flags); + if (newch->semid == -1) { + errprintf("Could not get sem: %s\n", strerror(errno)); + shmdt(newch->channelbuf); + if (role == CHAN_MASTER) shmctl(newch->shmid, IPC_RMID, NULL); + xfree(newch); + return NULL; + } + + if (role == CHAN_CLIENT) { + /* + * Clients must register their presence. + * We use SEM_UNDO; so if the client crashes, it wont leave a stale count. + */ + s.sem_num = CLIENTCOUNT; s.sem_op = +1; s.sem_flg = SEM_UNDO; + if (semop(newch->semid, &s, 1) == -1) { + errprintf("Could not register presence: %s\n", strerror(errno)); + shmdt(newch->channelbuf); + xfree(newch); + return NULL; + } + } + else if (role == CHAN_MASTER) { + int n; + + n = semctl(newch->semid, CLIENTCOUNT, GETVAL); + if (n > 0) { + errprintf("FATAL: xymond sees clientcount %d, should be 0\nCheck for hanging xymond_channel processes or stale semaphores\n", n); + shmdt(newch->channelbuf); + shmctl(newch->shmid, IPC_RMID, NULL); + semctl(newch->semid, 0, IPC_RMID); + xfree(newch); + return NULL; + } + } + +#ifdef MEMORY_DEBUG + add_to_memlist(newch->channelbuf, bufsz); +#endif + return newch; +} + +void close_channel(xymond_channel_t *chn, int role) +{ + if (chn == NULL) return; + + /* No need to de-register, this happens automatically because we registered with SEM_UNDO */ + + if (role == CHAN_MASTER) semctl(chn->semid, 0, IPC_RMID); + + MEMUNDEFINE(chn->channelbuf); + shmdt(chn->channelbuf); + if (role == CHAN_MASTER) shmctl(chn->shmid, IPC_RMID, NULL); +} + +int setup_feedback_queue(int role) +{ + char *xymonhome = xgetenv("XYMONHOME"); + struct stat st; + key_t key; + int flags = ((role == CHAN_MASTER) ? (IPC_CREAT | 0666) : 0); + int queueid; + + if ( (xymonhome == NULL) || (stat(xymonhome, &st) == -1) ) { + errprintf("XYMONHOME not defined, or points to invalid directory - cannot continue.\n"); + return -1; + } + + key = ftok(xymonhome, C_FEEDBACK_QUEUE); + if (key == -1) { + errprintf("Could not generate backfeed key based on %s: %s\n", xymonhome, strerror(errno)); + return -1; + } + + queueid = msgget(key, flags); + + return queueid; +} + +void close_feedback_queue(int queueid, int role) +{ + int n; + + if ((queueid >= 0) && (role == CHAN_MASTER)) { + n = msgctl(queueid, IPC_RMID, NULL); + } +} + diff -Nru xymon-4.3.12~lucid/lib/xymond_ipc.h xymon-4.3.17/lib/xymond_ipc.h --- xymon-4.3.12~lucid/lib/xymond_ipc.h 1970-01-01 00:00:00.000000000 +0000 +++ xymon-4.3.17/lib/xymond_ipc.h 2013-07-25 16:04:40.000000000 +0000 @@ -0,0 +1,43 @@ +/*----------------------------------------------------------------------------*/ +/* Xymon message daemon. */ +/* */ +/* Copyright (C) 2004-2011 Henrik Storner */ +/* */ +/* This program is released under the GNU General Public License (GPL), */ +/* version 2. See the file "COPYING" for details. */ +/* */ +/*----------------------------------------------------------------------------*/ + +#ifndef __XYMOND_IPC_H__ +#define __XYMOND_IPC_H__ + +#include "xymond_buffer.h" + +/* Semaphore numbers */ +#define BOARDBUSY 0 +#define GOCLIENT 1 +#define CLIENTCOUNT 2 + +#define CHAN_MASTER 0 +#define CHAN_CLIENT 1 + +typedef struct xymond_channel_t { + enum msgchannels_t channelid; + int shmid; + int semid; + char *channelbuf; + unsigned int seq; + unsigned long msgcount; + struct xymond_channel_t *next; +} xymond_channel_t; + +extern char *channelnames[]; + +extern xymond_channel_t *setup_channel(enum msgchannels_t chnname, int role); +extern void close_channel(xymond_channel_t *chn, int role); + +extern int setup_feedback_queue(int role); +extern void close_feedback_queue(int queueid, int role); + +#endif + diff -Nru xymon-4.3.12~lucid/lib/xymonrrd.c xymon-4.3.17/lib/xymonrrd.c --- xymon-4.3.12~lucid/lib/xymonrrd.c 2011-09-04 06:01:06.000000000 +0000 +++ xymon-4.3.17/lib/xymonrrd.c 2014-01-07 09:26:13.000000000 +0000 @@ -11,7 +11,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: xymonrrd.c 6745 2011-09-04 06:01:06Z storner $"; +static char rcsid[] = "$Id: xymonrrd.c 7322 2014-01-07 09:26:13Z storner $"; #include #include @@ -30,7 +30,7 @@ /* This is the information needed to generate links on the trends column page */ xymongraph_t *xymongraphs = NULL; -static const char *xymonlinkfmt = "
\"xymongraph \"Zoom
\n"; +static const char *xymonlinkfmt = "
\"xymongraph \"Zoom
\n"; static const char *metafmt = "\n %s\n \n \n\n"; @@ -288,7 +288,7 @@ if (bgcolor != -1) sprintf(svcurl+strlen(svcurl), "&color=%s", colorname(bgcolor)); sprintf(svcurl+strlen(svcurl), "&graph_start=%d&graph_end=%d", (int)starttime, (int)endtime); - sprintf(rrdparturl, fmt, rrdservicename, svcurl, svcurl, rrdservicename, svcurl, xgetenv("XYMONSKIN")); + sprintf(rrdparturl, fmt, rrdservicename, svcurl, svcurl, rrdservicename, svcurl, xgetenv("XYMONSKIN"), xgetenv("IMAGEFILETYPE")); if ((strlen(rrdparturl) + strlen(rrdurl) + 1) >= rrdurlsize) { rrdurlsize += (4096 + rrdparturlsize); rrdurl = (char *) realloc(rrdurl, rrdurlsize); diff -Nru xymon-4.3.12~lucid/README.backfeed xymon-4.3.17/README.backfeed --- xymon-4.3.12~lucid/README.backfeed 1970-01-01 00:00:00.000000000 +0000 +++ xymon-4.3.17/README.backfeed 2013-07-26 09:53:28.000000000 +0000 @@ -0,0 +1,96 @@ +Enabling the "backfeed" channel on the Xymon server +=================================================== + +Background +---------- +Traditionally, all communication between modules on the +Xymon server uses a TCP connection to xymond. This is a +simple standardized way of talking to the daemon, e.g. to +send status updates from xymond_client or xymonnet into +the xymond daemon. + +However, a TCP connection also carries quite a bit of overhead. +On a server with a very high load of messages this can be a +problem - empirical evidence shows that the limit appears to +be around 3300 messages/second. + + +Solution +-------- +To solve this, an alternative interface has been implemented +using the standard SysV IPC "message queue" interface. This +is a POSIX standard, and other parts of SysV IPC is already +used by Xymon. + + +Operating system configuration +------------------------------ +Unfortunately, most systems have default settings for the +message queue parameters MSGMNB (total # of bytes allowed in +the queue) and MSGMAX (maximum size of a single mssage) settings. +E.g. on Linux, defaults for these are 16 kB and 8 Kb, respectively. +Since Xymon by default permits status messages of up to 256 kB +in size, these settings are inadequate. + +On Linux, you change the settings via the "sysctl" utility. Most +Linux systems have these settings defined in /etc/sysctl.conf, so +you add these parameters: + kernel.msgmax=262144 + kernel.msgmnb=1048576 +The "msgmax" setting should match your MAXMSG_STATUS setting in +xymonserver.cfg, converted to bytes (MAXMSG_STATUS is in kB, so +you must multiply it by 1024 for the kernel.msgmax value). +"msgmnb" should be 4 times the msgmax setting. After setting these, +either run "sysctl -f /etc/sysctl.conf" or reboot the server +to enable the new settings. + +For other systems, please refer to your OS documentation. + + +Enabling the backfeed queue +--------------------------- +The backfeed queue is disabled by default. To enable it, add the +"--bfq" option to xymond (in your tasks.cfg) and restart Xymon. +You can verify that this has been enabled by checking the output +from "ipcs -q" - you should see a line with a message queue owned +by the Xymon userid: + + ------ Message Queues -------- + key msqid owner perms used-bytes messages + 0x0a01205e 98305 xymon 666 0 0 + + +Using the backfeed queue +------------------------ +xymond_client and xymonnet will automatically use the backfeed queue, +if available. + +If you have custom scripts or tools running on the Xymon server, then +you can send messages into the queue using the standard "xymon" utility. +To do so, set the recipient to "0". E.g. + + xymon 0 "status localhost.test green" + +will send a status update via the backfeed queue. + +NOTE: The backfeed queue is "one-way", so it can only be used for "status", +"data", "drop" and "rename" messages - i.e., any message where xymond does +not return a response. + + +Checking if the queue is used +----------------------------- +The "xymond" status page includes statistics on the kinds of messages +received by xymond. If the backfeed queue is used, you should see +the number reported in the "backfeed messages" line increase. + +You can also query xymond for "senderstats": This lists the number of +connections to xymond from each IP-address. The backfeed queue shows up +as IP "0.0.0.0": + +$ xymon 127.0.0.1 "senderstats" +0.0.0.0 1360796 +127.0.0.1 1648 +10.0.31.155 1397281 + + diff -Nru xymon-4.3.12~lucid/RELEASENOTES xymon-4.3.17/RELEASENOTES --- xymon-4.3.12~lucid/RELEASENOTES 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/RELEASENOTES 2014-02-23 09:44:57.000000000 +0000 @@ -1,8 +1,65 @@ <<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> - * * * Release notes for Xymon 4.3.12 * * * + * * * Release notes for Xymon 4.3.17 * * * <<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> +This documents the important changes between Xymon releases, i.e. +changes you should be aware of when upgrading. + +For a full list of changes and enhancements, please see the +Changes file. + + +Changes for 4.3.15 - 4.3.17 +=========================== +No significant changes. + + +Changes for 4.3.14 +================== +In previous Xymon versions, a client-only configuration (i.e. one +configured with "./configure --client") would place the client +files in a "client" subdirectory below the directory specified +during configuration. This is the same directory layout as a server +installation, where the server and client parts of Xymon are +in separate subdirectories. +In 4.3.14, the default has changed so a client-only installation +now installs in the directory given during the configure-step. +The "/client" has been eliminated, so if you are upgrading an +existing client you must either move the old client installation +one level up from the "client/" directory, or change the Makefile +generated by "configure --client" and add "/client" to the +XYMONTOPDIR setting. + +The SNI support added in 4.3.13 causes problems with some older +webservers, whose SSL implementation cannot handshake correctly +when SNI is used. The failed handshake causes Xymon to report +the site as down. In 4.3.14, the default is changed so SNI is +disabled. A new "--sni" option was added to xymonnet to control the +default setting, and two new tags "sni" and "nosni" can be used in +hosts.cfg to control SNI for each host that is tested. + + +Changes for 4.3.13 +================== +This is mostly a bugfix release. Apart from simple bugs (see +the Changes file), there are some enhancements: + +Alerts sent via e-mail have line-endings converted +to plain , since the carriage-return characters would +cause some mailers to send alerts as a (binary) attachment +to an empty mail message. + +https-URL's can be forced to use TLS only, by using +"httpst://..." similar to how SSLv2 and SSLv3 can be chosen. + +SSL connections (e.g. for https URL's) now use the TLS +"Server Name Indication" (SNI) if your OpenSSL library +supports it. This allows testing of systems that have +multiple SSL websites located on the same physical IP+port +(i.e. virtual name-based hosts). + + Changes for 4.3.12 ================== NOTE: This release includes a bugfix for a security issue @@ -130,298 +187,3 @@ http://xymon.svn.sourceforge.net/viewvc/xymon/sandbox/tigramenu/?view=tar together with instructions for using it with Xymon 4.3.0. - -Changes from 4.2.2 -> 4.2.3 -=========================== -See the "Changes" file for a list of the changes in 4.2.3. - -The 4.2.3 release primarily touches the network test module, -where a number of DNS bugs were fixed - these could cause -network tests (especially tests of DNS servers) to crash -in 4.2.2. - -This release also marks the beginning of a series of -releases leading up the the 5.0 release. New features -will be added in coming 4.3 / 4.4 etc. versions releases -throughout 2009. - - -Changes from 4.2.0 -> 4.2.2 -=========================== -The 4.2.2 release is an interim release. It contains the -original 4.2.0 release plus the following changes: - -*) Due to the Hobbit project being renamed to Xymon (for - legal reasons), the documentation has been updated to - refer to this as the name of the project. Note that the - 4.2.2 release does not change any filenames for - configuration files or programs. -*) All patches from the "all-in-one" patch have been applied -*) Patches from Debian and Mandriva source archives and - elsewhere have been merged, fixing: - - The "Critical Systems" configuration report would crash - when hosts were in NKview.cfg, but no NK tags were in - bb-hosts (from Mandriva) - - SSL certificates with 4-digit expiration years would - crash the network tester (from Debian) - - Newer OpenLDAP versions have a different API, so - the LDAP test code would not build correctly (from - Debian) - - Old Big Brother clients report disk output with no - header line (from Debian) - - The bb-hosts syntax for HTTP testing via a proxy - could not support https target-URL's (from Debian) - - Certain SuSE versions would not be identified by - the Linux client as such (only affected OS name - displayed in the "info" status). - - hobbitping could loop indefinitely in case of - network errors. - - Installing on newer Darwin versions failed because - "nireport" was used to find user-info. Changed to - use "dscl". - - Alert-scripts might fail because of size limitations - on how large environment variables could be passed. - - 64-bit systems might put odd numbers into the - acknowledgment-log - - Fixed display of alert duration on the "info" page. - - NetBSD systems with >2 GB RAM would report strange - memory data. -*) Support for sending custom graph data in a "trends" - data message (from - http://www.hswn.dk/hobbiton/2007/01/msg00236.html) -*) Split-NCV and TRACKMAX support for custom graphs (from - http://www.hobbitmon.com/hobbiton/2007/03/msg00368.htm). -*) Support for the "BBWin" client http://bbwin.sf.net/ - in centralized (server-side) configuration mode. - Based on BBWin v. 0.12. -*) Support for the "hobbit-perl-client" add-on - http://hobbit-perl-client.sf.net/ . - Based on perl-http-client v1.15 -*) Support for the "Devmon" SNMP data collector - http://devmon.sf.net/ based on Devmon 0.3.0. - -A detailed changelog can be found in the Changes -document. - - -Note: There was never an official 4.2.1 release. - -Below are the release notes for the 4.2.0 version - - * * * * * - -This release contains several new programs, enhanced functionality -and changes to the configuration files. - -New Critical Systems View - "NK" tags now deprecated -==================================================== -The "Critical Systems" view is now built dynamically by a new -CGI tool, hobbit-nkview. It uses a new configuration file -separate from the bb-hosts file, which is maintained by the -hobbit-nkedit CGI. - - *** The "NK" tags in bb-hosts are being deprecated *** - -The NK tags in the bb-hosts file will only be handled in -Xymon 4.x. It is recommended that you begin to move your -critical systems view to the new hobbit-nkview configuration. - - -Modem-bank testing ("dialup" host definition) does not work -=========================================================== -Previous versions of Xymon supported the Big Brother "dialup" -host definition for pinging a range of IP-adresses, e.g. a -modem-bank or a pool of IP-adresses handed out by a DHCP server. -This feature is not supported in Xymon 4.2, but may re-appear -in a different form in a later version. -(Note: This has nothing to do with the "dialup" directive -which can be applied to individual hosts, to make them go -clear when they are offline instead of red or purple). - - -Installation -============ -Follow the normal procedure for building and installing Xymon, -i.e. "./configure; make; make install". Note that Xymon -now installs hobbitping suid-root, so root privileges are -needed for a server installation. - -Xymon 4.2 uses one more IPC communication channel than the -previous release (for a total of 8 shared memory segments totalling -2336 KB of shared memory, and 8 semaphore sets of 3 semaphores each). -If your system has a limited number of IPC shared-memory segments -and/or semaphores, you may need to increase this. See the installation -document at docs/install.html for some information about this, or -refer to your operating system documentation on System V IPC. - - -bbproxy upgrade -=============== -If you have a multi-host setup using the bbproxy utility, then -you must upgrade bbproxy for the new Xymon clients to be fully -functional. - - -Configuration file changes -========================== -If you are upgrading from a previous version of Xymon, you will -need to merge several new configuration items into your Xymon -configuration files, in order to make full use of these enhance- -ments. These notes describe what changes to perform. - - -xymonserver.cfg ----------------- -Several new status columns are being reported by the Xymon client, -and these have associated graphs. In order for them to show up -correctly, you must change the two graph-settings: -- TEST2RRD: Add ",files,procs=processes,ports,clock,lines" to - the current setting. -- GRAPHS: Add ",files,processes,ports,ifstat,clock,lines" to - the current setting. - -Xymon now includes a ping utility, which is faster than "fping" -which was used in previous Xymon versions. To use this utility, -change the FPING setting to FPING="hobbitping". However, the -hobbitping utility is still somewhat experimental, so if you -run into problems with the connectivity tests, it is advised that -you use fping instead. - -The following settings in xymonserver.cfg are no longer used -and may be deleted: BBPAGE, BBPAGERS, USEHOBBITD, PAGELEVELS, -PURPLEDELAY, BBREL, BBRELDATE, CLIENTSVCS. - - -hobbitcgi.cfg -------------- -The bb-ack.cgi tool has a new option, "--no-pin", which allows -you to acknowledge alerts without having to bother with the -acknowledgment code. To use this, add the "--no-pin" option to the -CGI_ACK_OPTS setting. - -Five new CGI programs have been added in Xymon 4.2. To ensure -they are invoked correctly, add these lines to your hobbitcgi.cfg file: - -# hobbitgraph.cgi options -CGI_HOSTGRAPHS_OPTS="--env=/home/hobbit/server/etc/xymonserver.cfg" -# hobbit-nkview.cgi options -CGI_NKVIEW_OPTS="--env=/home/hobbit/server/etc/xymonserver.cfg" -# hobbit-nkedit.cgi options -CGI_NKEDIT_OPTS="--env=/home/hobbit/server/etc/xymonserver.cfg" -# hobbit-ackinfo.cgi options -CGI_ACKINFO_OPTS="--env=/home/hobbit/server/etc/xymonserver.cfg" -#hobbit-ghosts.cgi options -CGI_GHOSTS_OPT="--env=/home/hobbit/etc/xymonserver.cfg" - -(Replace "/home/hobbit" with the top-level directory of your -Xymon server installation). - - -hobbitgraph.cfg ---------------- -Several new graphs require additions to the hobbitgraph.cfg -file. If you haven't added any custom graphs, it is recommended -that you install the new version of the file located in the -hobbit-4.2/hobbitd/etcfiles/ directory. If you have added custom -graphs, copy the following sections from the 4.2 version of the -file to your hobbitgraph.cfg file: apache3-multi, conn-multi, -ifstat, files, processes, ports, clock, lines. - - -hobbitlaunch.cfg ----------------- -The path for the [bbcombotest] module was incorrect. To use the -bbcombotest feature, make sure that it has - CMD BBHOME/bin/bbcombotest - -A new Xymon module has been implemented, which saves a snapshot -of the client data reported by a Xymon client prior to a status -going into a critical or warning state. This aids in diagnosing -problems where the critical status appearing in Xymon is only -a symptom of the real problem, and you need to look at other types -of data to determine the root cause. To enable this module, two -changes are needed: - -* The [hobbitd] command must have the option "--store-clientlogs=!msgs" - added. See the hobbitd(8) man-page for further information. -* A new [hostdata] section must be added: - # "hostdata" stores the Xymon client messages on disk when some status for a host - # changes. This lets you access a lot of data collected from a host around the time - # when a problem occurred. However, it may use a significant amount of disk space - # if you have lots of Xymon clients. - # Note: The --store-clientlogs option for the [hobbitd] provides control over - # which status-changes will cause a client message to be stored. - [hostdata] - ENVFILE $BBHOME/etc/xymonserver.cfg - NEEDS hobbitd - CMD hobbitd_channel --channel=clichg --log=$BBSERVERLOGS/hostdata.log hobbitd_hostdata - -If you want to use the new "hobbitfetch" utility to collect data from -clients, you must add a [hobbitfetch] section to run the data collector. -Add this to your hobbitlaunch.cfg file: - - # "hobbitfetch" is used when you have clients that cannot connect to your Xymon server, - # but the Xymon server can connect to the client. Normally the clients will initiate - # a connection to the Xymon server to deliver the data they collect, but this is - # forbidden in some firewall setups. By enabling the hobbitfetch task, hosts that have - # the "pulldata" tag in the bb-hosts file will be polled by hobbitfetch for their data. - # - # NOTE: On the clients you must enable the "msgcache" task, since this is what - # hobbitfetch is talking to. - [hobbitfetch] - ENVFILE $BBHOME/etc/xymonserver.cfg - CMD $BBHOME/bin/hobbitfetch --server=YOUR.HOBBIT.SERVER.IP --no-daemon --pidfile=$BBSERVERLOGS/hobbitfetch.pid - LOGFILE $BBSERVERLOGS/hobbitfetch.log - - -~hobbit/server/www/menu/menu_items.js ------------------------------------ -Two new menu items have been added, and the "NK view" has been replaced by -the new "Critical systems" view. To make this visible, change this: -- Replace the "NK view" section with - ['Critical systems', '/hobbit-cgi/hobbit-nkview.sh'], - Note that this requires you to migrate your current "NK" tags in - the bb-hosts file to the new Critical Systems configuration file. - See the "Critical Systems" menu item in the "Help" menu. -- In the "Reports" menu, after the "Config report" line, add - ['Metrics Report', '/hobbit-cgi/hobbit-hostgraphs.sh'], - ['Ghost Clients', '/hobbit-cgi/hobbit-ghosts.sh'], -- In the "Administration" menu, after the "Enable/Disable" line, add - ['Edit critical systems', '/hobbit-seccgi/hobbit-nkedit.sh'], -- In the "Help" menu, after the "Tips and Tricks" line, add - ['Custom graphs', '/hobbit/help/howtograph.html'], -- In the "Help" menu, after the "Configuring Alerts" line, add - ['Critical systems', '/hobbit/help/criticalsystems.html'], - ['Custom graphs', '/hobbit/help/howtograph.html'], -The "/hobbit-cgi" part of the URL may be different, depending on your setup. - - -~hobbit/server/www/menu/menu_tpl.js ---------------------------------- -The width of menu items need to be increased slightly. Change line 25 -of this file from "'width': 150" to "'width': 160". - - -bb-services ------------ -The [spamd] definition had an erroneous "expect" string. It should -be changed to - expect "SPAMD" - -A "cupsd" definition has been added to test the CUPS printing system. -# CUPS print server. It answers to HTTP requests. -[cupsd] - send "GET /printers\r\n" - expect "HTTP/1.1 200 OK" - port 631 - -And an "AJP13" definition has been added for the Apache JServer -protocol version 1.3. -# AJP (Apache JServ Protocol) 1.3 - sends an AJP "ping" request. -# Ref: http://tomcat.apache.org/connectors-doc/common/ajpv13a.html -# From Charles Goyard -[ajp13] - send "\x12\x34\x00\x01\x0a" - expect "\x41\x42\x00\x01\x09" - port 8009 - diff -Nru xymon-4.3.12~lucid/rpm/xymon-client.init xymon-4.3.17/rpm/xymon-client.init --- xymon-4.3.12~lucid/rpm/xymon-client.init 2011-03-08 17:20:28.000000000 +0000 +++ xymon-4.3.17/rpm/xymon-client.init 2014-02-03 21:54:05.000000000 +0000 @@ -58,12 +58,12 @@ ;; stop) echo -n "Stopping $DESC: " - su -c "$DAEMON stop" - xymon + su -c "$DAEMON $DMNOPTS stop" - xymon echo "$NAME." ;; restart) echo -n "Restarting $DESC: " - su -c "$DAEMON stop" - xymon + su -c "$DAEMON $DMNOPTS stop" - xymon su -c "$DAEMON $DMNOPTS start" - xymon echo "$NAME." ;; diff -Nru xymon-4.3.12~lucid/rpm/xymon.spec xymon-4.3.17/rpm/xymon.spec --- xymon-4.3.12~lucid/rpm/xymon.spec 2012-08-03 12:10:23.000000000 +0000 +++ xymon-4.3.17/rpm/xymon.spec 2014-01-19 12:15:13.000000000 +0000 @@ -143,6 +143,7 @@ %attr(644, root, root) %config /etc/xymon/* %attr(644, root, root) %config /etc/httpd/conf.d/xymon-apache.conf %attr(755, root, root) %dir /etc/xymon +%attr(755, root, root) %dir /etc/xymon/tasks.d %attr(755, root, root) %dir /usr/lib/xymon/server/download %attr(755, root, root) %dir /etc/xymon/web %attr(755, xymon, xymon) %dir /var/log/xymon diff -Nru xymon-4.3.12~lucid/web/ackinfo.cgi.1 xymon-4.3.17/web/ackinfo.cgi.1 --- xymon-4.3.12~lucid/web/ackinfo.cgi.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/ackinfo.cgi.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH ACKINFO.CGI 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH ACKINFO.CGI 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME ackinfo.cgi \- Xymon CGI script to acknowledge alerts .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/acknowledge.c xymon-4.3.17/web/acknowledge.c --- xymon-4.3.12~lucid/web/acknowledge.c 2011-12-06 12:56:24.000000000 +0000 +++ xymon-4.3.17/web/acknowledge.c 2014-01-27 16:56:50.000000000 +0000 @@ -14,7 +14,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: acknowledge.c 6790 2011-12-06 12:56:24Z storner $"; +static char rcsid[] = "$Id: acknowledge.c 7381 2014-01-27 16:56:50Z storner $"; #include #include @@ -247,11 +247,20 @@ char *hostname, *pagename; int gotfilter = 0, filtererror = 0; sendreturn_t *sres = NULL; + int col, firstcolor = 1, alertcolors = colorset(xgetenv("ALERTCOLORS"), ((1 << COL_GREEN) | (1 << COL_BLUE))); headfoot(stdout, "acknowledge", "", "header", COL_RED); cmd = (char *)malloc(1024); - strcpy(cmd, "xymondboard color=red,yellow fields=hostname,testname,cookie"); + strcpy(cmd, "xymondboard fields=hostname,testname,cookie color="); + for (col = 0; (col < COL_COUNT); col++) { + if ((1 << col) & alertcolors) { + if (!firstcolor) strcat(cmd, ","); + strcat(cmd, colorname(col)); + firstcolor = 0; + } + } + // printf("\n", cmd); if (obeycookies && !gotfilter && ((hostname = get_cookie("host")) != NULL)) { if (*hostname) { @@ -329,7 +338,7 @@ } if (first) { - fprintf(stdout, "

No active alertsNo active alerts
\n"); } else { generate_ackline(stdout, NULL, NULL, NULL); diff -Nru xymon-4.3.12~lucid/web/acknowledge.cgi.1 xymon-4.3.17/web/acknowledge.cgi.1 --- xymon-4.3.12~lucid/web/acknowledge.cgi.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/acknowledge.cgi.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH ACKNOWLEDGE.CGI 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH ACKNOWLEDGE.CGI 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME acknowledge.cgi \- Xymon CGI script to acknowledge alerts .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/appfeed.cgi.1 xymon-4.3.17/web/appfeed.cgi.1 --- xymon-4.3.12~lucid/web/appfeed.cgi.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/appfeed.cgi.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH APPFEED.CGI 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH APPFEED.CGI 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME appfeed.cgi \- Xymon CGI feeder for Smartphone apps .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/boilerplate.c xymon-4.3.17/web/boilerplate.c --- xymon-4.3.12~lucid/web/boilerplate.c 2011-07-31 21:01:52.000000000 +0000 +++ xymon-4.3.17/web/boilerplate.c 2014-02-13 11:22:08.000000000 +0000 @@ -8,7 +8,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: boilerplate.c 6712 2011-07-31 21:01:52Z storner $"; +static char rcsid[] = "$Id: boilerplate.c 7435 2014-02-13 11:22:08Z storner $"; #include #include @@ -35,7 +35,7 @@ while (cwalk) { /* * cwalk->name points to the name of the setting. - * cwakl->value points to the value (may be an empty string). + * cwalk->value points to the value (may be an empty string). */ cwalk = cwalk->next; diff -Nru xymon-4.3.12~lucid/web/cgioptions.cfg.5 xymon-4.3.17/web/cgioptions.cfg.5 --- xymon-4.3.12~lucid/web/cgioptions.cfg.5 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/cgioptions.cfg.5 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH CGIOPTIONS.CFG 5 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH CGIOPTIONS.CFG 5 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME cgioptions.cfg \- Command-line parameters for the Xymon CGI tools diff -Nru xymon-4.3.12~lucid/web/confreport.cgi.1 xymon-4.3.17/web/confreport.cgi.1 --- xymon-4.3.12~lucid/web/confreport.cgi.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/confreport.cgi.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH CONFREPORT.CGI 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH CONFREPORT.CGI 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME confreport.cgi \- Xymon Configuration report .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/critical.cfg.5 xymon-4.3.17/web/critical.cfg.5 --- xymon-4.3.12~lucid/web/critical.cfg.5 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/critical.cfg.5 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH CRITICAL.CFG 5 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH CRITICAL.CFG 5 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME critical.cfg \- Configuration of the showgraph CGI diff -Nru xymon-4.3.12~lucid/web/criticaleditor.cgi.1 xymon-4.3.17/web/criticaleditor.cgi.1 --- xymon-4.3.12~lucid/web/criticaleditor.cgi.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/criticaleditor.cgi.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH CRITICALEDITOR.CGI 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH CRITICALEDITOR.CGI 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME criticaleditor.cgi \- Xymon Critical Systems View Editor CGI .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/criticalview.c xymon-4.3.17/web/criticalview.c --- xymon-4.3.12~lucid/web/criticalview.c 2012-07-14 16:32:11.000000000 +0000 +++ xymon-4.3.17/web/criticalview.c 2014-01-08 09:03:48.000000000 +0000 @@ -8,7 +8,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: criticalview.c 7060 2012-07-14 16:32:11Z storner $"; +static char rcsid[] = "$Id: criticalview.c 7335 2014-01-08 09:03:48Z storner $"; #include #include @@ -446,6 +446,7 @@ char *envarea = NULL; char **critconfig = NULL; int cccount = 0; + char *hffile = "critical"; critconfig = (char **)calloc(1, sizeof(char *)); @@ -476,6 +477,10 @@ critconfig = (char **)realloc(critconfig, (1 + cccount)*sizeof(char *)); critconfig[cccount] = NULL; } + else if (argnmatch(argv[argi], "--hffile=")) { + char *p = strchr(argv[argi], '='); + hffile = strdup(p+1); + } } if (!critconfig[0]) { @@ -546,8 +551,8 @@ } generate_critpage(rbstate[i], hostsonpage[i], stdout, - (i == 0) ? (critconfig[1] ? "critmulti" : "critical") : "divider", - (critconfig[i+1] == NULL) ? "critical" : "divider", + (i == 0) ? (critconfig[1] ? "critmulti" : hffile) : "divider", + (critconfig[i+1] == NULL) ? hffile : "divider", partcolor[i], partprio[i]); } } diff -Nru xymon-4.3.12~lucid/web/criticalview.cgi.1 xymon-4.3.17/web/criticalview.cgi.1 --- xymon-4.3.12~lucid/web/criticalview.cgi.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/criticalview.cgi.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH CRITICALVIEW.CGI 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH CRITICALVIEW.CGI 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME criticalview.cgi \- Xymon Critical Systems view CGI .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/csvinfo.cgi.1 xymon-4.3.17/web/csvinfo.cgi.1 --- xymon-4.3.12~lucid/web/csvinfo.cgi.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/csvinfo.cgi.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH CSVINFO.CGI 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH CSVINFO.CGI 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME csvinfo.cgi \- CGI program to show host information from a CSV file .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/datepage.cgi.1 xymon-4.3.17/web/datepage.cgi.1 --- xymon-4.3.12~lucid/web/datepage.cgi.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/datepage.cgi.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH DATEPAGE.CGI 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH DATEPAGE.CGI 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME datepage.cgi \- Xymon CGI script to view pre-built reports by date .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/enadis.c xymon-4.3.17/web/enadis.c --- xymon-4.3.12~lucid/web/enadis.c 2012-07-18 12:16:31.000000000 +0000 +++ xymon-4.3.17/web/enadis.c 2014-02-13 11:22:08.000000000 +0000 @@ -8,7 +8,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: enadis.c 7096 2012-07-18 12:16:31Z storner $"; +static char rcsid[] = "$Id: enadis.c 7435 2014-02-13 11:22:08Z storner $"; #include #include @@ -45,6 +45,7 @@ char *hostpattern = NULL; char *pagepattern = NULL; char *ippattern = NULL; +char *classpattern = NULL; void errormsg(char *msg) { @@ -202,6 +203,9 @@ else if ((strcmp(pwalk->name, "ippattern") == 0) && pwalk->value && strlen(pwalk->value)) { ippattern = strdup(pwalk->value); } + else if ((strcmp(pwalk->name, "classpattern") == 0) && pwalk->value && strlen(pwalk->value)) { + classpattern = strdup(pwalk->value); + } pwalk = pwalk->next; } @@ -362,7 +366,7 @@ load_hostnames(xgetenv("HOSTSCFG"), NULL, get_fqdn()); sethostenv("", "", "", colorname(COL_BLUE), NULL); - sethostenv_filter(hostpattern, pagepattern, ippattern); + sethostenv_filter(hostpattern, pagepattern, ippattern, classpattern); printf("Content-type: %s\n\n", xgetenv("HTMLCONTENTTYPE")); showform(stdout, "maint", "maint_form", COL_BLUE, getcurrenttime(NULL), NULL, NULL); return 0; diff -Nru xymon-4.3.12~lucid/web/enadis.cgi.8 xymon-4.3.17/web/enadis.cgi.8 --- xymon-4.3.12~lucid/web/enadis.cgi.8 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/enadis.cgi.8 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH ENADIS.CGI 8 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH ENADIS.CGI 8 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME enadis.cgi \- CGI program to enable/disable Xymon tests .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/eventlog.cgi.1 xymon-4.3.17/web/eventlog.cgi.1 --- xymon-4.3.12~lucid/web/eventlog.cgi.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/eventlog.cgi.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH EVENTLOG.CGI 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH EVENTLOG.CGI 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME eventlog.cgi \- CGI program to report the Xymon eventlog .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/findhost.c xymon-4.3.17/web/findhost.c --- xymon-4.3.12~lucid/web/findhost.c 2011-07-31 21:01:52.000000000 +0000 +++ xymon-4.3.17/web/findhost.c 2014-01-26 11:11:09.000000000 +0000 @@ -37,7 +37,7 @@ * */ -static char rcsid[] = "$Id: findhost.c 6712 2011-07-31 21:01:52Z storner $"; +static char rcsid[] = "$Id: findhost.c 7370 2014-01-26 11:11:09Z storner $"; #include #include @@ -106,7 +106,7 @@ printf("Content-Type: %s\n\n", xgetenv("HTMLCONTENTTYPE")); headfoot(stdout, "findhost", "", "header", COL_BLUE); printf("

\n"); - printf("\n"); + printf("\n"); } void print_footer(void) @@ -192,20 +192,23 @@ (comment && regexec (&re, comment, (size_t)0, NULL, 0) == 0) ) { /* match */ - addtobuffer(outbuf, "\n"); - addtobuffer(outbuf, "\n"); + addtobuffer_many(outbuf, + "\n", + "\n", + "\n", + NULL); oneurl = (char *)malloc(4 + strlen(xgetenv("XYMONWEB")) + strlen(xmh_item(hostwalk, XMH_PAGEPATH)) + strlen(hostname)); sprintf(oneurl, "%s/%s/#%s", xgetenv("XYMONWEB"), xmh_item(hostwalk, XMH_PAGEPATH), hostname); - addtobuffer(outbuf, "\n", - htmlquoted(tests[testi]), (long int)starttime, (long int)endtime); + fprintf(stdout, "&service=%s&graph_start=%ld&graph_end=%ld&graph=custom&action=view&graph_height=%s&graph_width=%s\">\n", + htmlquoted(tests[testi]), (long int)starttime, (long int)endtime, xgetenv("RRDHEIGHT"), xgetenv("RRDWIDTH")); } fprintf(stdout, "
Hostname (DisplayName)Location (Group Name)
Hostname (DisplayName)IPLocation (Group Name)
"); - addtobuffer(outbuf, displayname ? displayname : hostname); - addtobuffer(outbuf, "
", (displayname ? displayname : hostname), " ", ip, " "); - addtobuffer(outbuf, xmh_item(hostwalk, XMH_PAGEPATHTITLE)); - addtobuffer(outbuf, "\n"); + addtobuffer_many(outbuf, + " ", + xmh_item(hostwalk, XMH_PAGEPATHTITLE), + "\n", + NULL); gotany++; /* See if all of the matches so far are on one page */ @@ -225,15 +228,17 @@ clonewalk = next_host(hostwalk, 1); while (clonewalk && (strcmp(xmh_item(hostwalk, XMH_HOSTNAME), xmh_item(clonewalk, XMH_HOSTNAME)) == 0)) { - addtobuffer(outbuf, "
"); - addtobuffer(outbuf, xmh_item(clonewalk, XMH_PAGEPATHTITLE)); - addtobuffer(outbuf, "\n"); + addtobuffer_many(outbuf, + "
", + xmh_item(clonewalk, XMH_PAGEPATHTITLE), + "\n", + NULL); clonewalk = next_host(clonewalk, 1); gotany++; } diff -Nru xymon-4.3.12~lucid/web/findhost.cgi.1 xymon-4.3.17/web/findhost.cgi.1 --- xymon-4.3.12~lucid/web/findhost.cgi.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/findhost.cgi.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH FINDHOST.CGI 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH FINDHOST.CGI 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME findhost.cgi \- Xymon CGI script to find hosts .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/ghostlist.cgi.1 xymon-4.3.17/web/ghostlist.cgi.1 --- xymon-4.3.12~lucid/web/ghostlist.cgi.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/ghostlist.cgi.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH GHOSTLIST.CGI 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH GHOSTLIST.CGI 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME ghostlist.cgi \- CGI program to view ghost clients .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/graphs.cfg.5 xymon-4.3.17/web/graphs.cfg.5 --- xymon-4.3.12~lucid/web/graphs.cfg.5 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/graphs.cfg.5 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH GRAPHS.CFG 5 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH GRAPHS.CFG 5 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME graphs.cfg \- Configuration of the showgraph CGI diff -Nru xymon-4.3.12~lucid/web/history.cgi.1 xymon-4.3.17/web/history.cgi.1 --- xymon-4.3.12~lucid/web/history.cgi.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/history.cgi.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH HISTORY.CGI 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH HISTORY.CGI 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME history.cgi \- CGI program to display service history .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/hostgraphs.c xymon-4.3.17/web/hostgraphs.c --- xymon-4.3.12~lucid/web/hostgraphs.c 2011-07-31 21:01:52.000000000 +0000 +++ xymon-4.3.17/web/hostgraphs.c 2014-02-23 09:27:44.000000000 +0000 @@ -10,7 +10,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: hostgraphs.c 6712 2011-07-31 21:01:52Z storner $"; +static char rcsid[] = "$Id: hostgraphs.c 7441 2014-02-23 09:27:44Z storner $"; #include #include @@ -26,6 +26,7 @@ char *hostpattern = NULL; char *pagepattern = NULL; char *ippattern = NULL; +char *classpattern = NULL; char **hosts = NULL; char **tests = NULL; time_t starttime = 0; @@ -45,7 +46,7 @@ while (cwalk) { /* * cwalk->name points to the name of the setting. - * cwakl->value points to the value (may be an empty string). + * cwalk->value points to the value (may be an empty string). */ if ((strcmp(cwalk->name, "hostpattern") == 0) && cwalk->value && strlen(cwalk->value)) { @@ -57,6 +58,9 @@ else if ((strcmp(cwalk->name, "ippattern") == 0) && cwalk->value && strlen(cwalk->value)) { ippattern = strdup(cwalk->value); } + else if ((strcmp(cwalk->name, "classpattern") == 0) && cwalk->value && strlen(cwalk->value)) { + classpattern = strdup(cwalk->value); + } else if (strcmp(cwalk->name, "DoReport") == 0) { action = A_GENERATE; } @@ -218,8 +222,8 @@ sprintf(pagepattern, "^%s$|^%s/.+", cookie, cookie); } - if (hostpattern || pagepattern || ippattern) - sethostenv_filter(hostpattern, pagepattern, ippattern); + if (hostpattern || pagepattern || ippattern || classpattern) + sethostenv_filter(hostpattern, pagepattern, ippattern, classpattern); showform(stdout, hffile, formfile, COL_BLUE, getcurrenttime(NULL), NULL, NULL); } else if ((action == A_GENERATE) && hosts && hosts[0] && tests && tests[0]) { @@ -235,8 +239,8 @@ for (hosti=1; (hosts[hosti]); hosti++) fprintf(stdout, ",%s", htmlquoted(hosts[hosti])); - fprintf(stdout, "&service=%s&graph_start=%ld&graph_end=%ld&graph=custom&action=view\">


\n"); diff -Nru xymon-4.3.12~lucid/web/hostgraphs.cgi.1 xymon-4.3.17/web/hostgraphs.cgi.1 --- xymon-4.3.12~lucid/web/hostgraphs.cgi.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/hostgraphs.cgi.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH HOSTGRAPHS.CGI 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH HOSTGRAPHS.CGI 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME hostgraphs.cgi \- CGI program to show multiple graphs .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/report.cgi.1 xymon-4.3.17/web/report.cgi.1 --- xymon-4.3.12~lucid/web/report.cgi.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/report.cgi.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH REPORT.CGI 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH REPORT.CGI 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME report.cgi \- CGI front-end to xymongen reporting .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/reportlog.cgi.1 xymon-4.3.17/web/reportlog.cgi.1 --- xymon-4.3.12~lucid/web/reportlog.cgi.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/reportlog.cgi.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH REPORTLOG.CGI 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH REPORTLOG.CGI 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME reportlog.cgi \- CGI program to report service availability log .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/showgraph.c xymon-4.3.17/web/showgraph.c --- xymon-4.3.12~lucid/web/showgraph.c 2012-07-28 06:29:24.000000000 +0000 +++ xymon-4.3.17/web/showgraph.c 2014-02-23 09:32:44.000000000 +0000 @@ -11,7 +11,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: showgraph.c 7128 2012-07-28 06:29:24Z storner $"; +static char rcsid[] = "$Id: showgraph.c 7442 2014-02-23 09:32:44Z storner $"; #include #include @@ -158,7 +158,13 @@ do { n = sendto(ctlsocket, bufp, bytesleft, 0, (struct sockaddr *)&myaddr, myaddrsz); if (n == -1) { - if (errno != EAGAIN) { + if (errno == EDESTADDRREQ) { + /* Probably a left-over rrdctl file, ignore it */ + } + else if (errno == EAGAIN) { + /* Harmless */ + } + else { errprintf("Sendto failed: %s\n", strerror(errno)); } @@ -664,8 +670,8 @@ case ACT_MENU: fprintf(output, " \"%s\n", uri, grtype_s, grtype_s); - fprintf(output, " \"Zoom \n", - uri, grtype_s, colorname(bgcolor), getenv("XYMONSKIN")); + fprintf(output, " \"Zoom \n", + uri, grtype_s, colorname(bgcolor), xgetenv("XYMONSKIN"), xgetenv("IMAGEFILETYPE")); break; case ACT_SELZOOM: @@ -712,6 +718,11 @@ addtobuffer(result, "&service="); addtobuffer(result, urlencode(service)); } + if (haveupperlimit) { + snprintf(numbuf, sizeof(numbuf)-1, "%f", upperlimit); + addtobuffer(result, "&upper="); + addtobuffer(result, urlencode(numbuf)); + } if (graphheight) { snprintf(numbuf, sizeof(numbuf)-1, "%d", graphheight); addtobuffer(result, "&graph_height="); diff -Nru xymon-4.3.12~lucid/web/showgraph.cgi.1 xymon-4.3.17/web/showgraph.cgi.1 --- xymon-4.3.12~lucid/web/showgraph.cgi.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/showgraph.cgi.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH SHOWGRAPH.CGI 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH SHOWGRAPH.CGI 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME showgraph.cgi \- CGI to generate Xymon trend graphs .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/snapshot.cgi.1 xymon-4.3.17/web/snapshot.cgi.1 --- xymon-4.3.12~lucid/web/snapshot.cgi.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/snapshot.cgi.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH SNAPSHOT.CGI 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH SNAPSHOT.CGI 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME snapshot.cgi \- CGI program to rebuild the Xymon webpages for a specific point in time. .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/statusreport.cgi.1 xymon-4.3.17/web/statusreport.cgi.1 --- xymon-4.3.12~lucid/web/statusreport.cgi.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/statusreport.cgi.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH STATUSREPORT.CGI 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH STATUSREPORT.CGI 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME statusreport.cgi \- CGI program to report a status for a group of servers .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/svcstatus.c xymon-4.3.17/web/svcstatus.c --- xymon-4.3.12~lucid/web/svcstatus.c 2012-07-24 15:48:41.000000000 +0000 +++ xymon-4.3.17/web/svcstatus.c 2013-09-04 08:49:55.000000000 +0000 @@ -10,7 +10,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: svcstatus.c 7117 2012-07-24 15:48:41Z storner $"; +static char rcsid[] = "$Id: svcstatus.c 7312 2013-09-04 08:49:55Z storner $"; #include #include @@ -50,11 +50,11 @@ static char *hostdatadir = NULL; -static void errormsg(char *msg) +static void errormsg(int status, char *msg) { snprintf(errortxt, sizeof(errortxt), - "Refresh: 30\nContent-type: %s\n\nInvalid request\n%s\n", - xgetenv("HTMLCONTENTTYPE"), msg); + "Status: %d\nRefresh: 30\nContent-type: %s\n\nInvalid request\n%s\n", + status, xgetenv("HTMLCONTENTTYPE"), msg); errortxt[sizeof(errortxt)-1] = '\0'; } @@ -134,7 +134,7 @@ } if (!hostname || !service || ((source == SRC_HISTLOGS) && !tstamp) ) { - errormsg("Invalid request"); + errormsg(403, "Invalid request"); return 1; } @@ -164,12 +164,12 @@ } if ((loadres != 0) && (loadres != -2)) { - errormsg("Cannot load host configuration"); + errormsg(500, "Cannot load host configuration"); return 1; } if ((loadres == -2) || (hinfo = hostinfo(hostname)) == NULL) { - errormsg("No such host"); + errormsg(403, "No such host"); return 1; } @@ -199,7 +199,7 @@ load_hostinfo(hostname); load_web_access_config(accessfn); if (!web_access_allowed(getenv("REMOTE_USER"), hostname, service, WEB_ACCESS_VIEW)) { - errormsg("Not available (restricted)."); + errormsg(403, "Not available (restricted)."); return 1; } } @@ -233,7 +233,7 @@ if (xymondresult != XYMONSEND_OK) { char *errtxt = (char *)malloc(1024 + strlen(xymondreq)); sprintf(errtxt, "Status not available: Req=%s, result=%d\n", htmlquoted(xymondreq), xymondresult); - errormsg(errtxt); + errormsg(500, errtxt); return 1; } else { @@ -336,7 +336,7 @@ /* Check service as a pcre pattern. And no spaces in servicenames */ if (strchr(service, ' ') == NULL) dummy = compileregex(service); if (dummy == NULL) { - errormsg("Invalid testname pattern"); + errormsg(500, "Invalid testname pattern"); return 1; } @@ -352,7 +352,7 @@ sprintf(re, "^(%s)$", complist); dummy = compileregex(re); if (dummy == NULL) { - errormsg("Invalid testname pattern"); + errormsg(500, "Invalid testname pattern"); return 1; } @@ -366,7 +366,7 @@ if (xymondresult == XYMONSEND_OK) log = getsendreturnstr(sres, 1); freesendreturnbuf(sres); if ((xymondresult != XYMONSEND_OK) || (log == NULL) || (strlen(log) == 0)) { - errormsg("Status not available\n"); + errormsg(404, "Status not available\n"); return 1; } @@ -525,7 +525,7 @@ char *p, *unchangedstr, *receivedfromstr, *clientidstr, *hostnamedash; int n; - if (!tstamp) { errormsg("Invalid request"); return 1; } + if (!tstamp) { errormsg(500, "Invalid request"); return 1; } if (loadhostdata(hostname, &ip, &displayname, &compacts, 0) != 0) return 1; hostnamedash = strdup(hostname); @@ -537,13 +537,13 @@ sethostenv_histlog(tstamp); if ((stat(logfn, &st) == -1) || (st.st_size < 10) || (!S_ISREG(st.st_mode))) { - errormsg("Historical status log not available\n"); + errormsg(404, "Historical status log not available\n"); return 1; } fd = fopen(logfn, "r"); if (!fd) { - errormsg("Unable to access historical logfile\n"); + errormsg(404, "Unable to access historical logfile\n"); return 1; } log = (char *)malloc(st.st_size+1); diff -Nru xymon-4.3.12~lucid/web/svcstatus.cgi.1 xymon-4.3.17/web/svcstatus.cgi.1 --- xymon-4.3.12~lucid/web/svcstatus.cgi.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/svcstatus.cgi.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH SVCSTATUS.CGI 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH SVCSTATUS.CGI 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME svcstatus.cgi \- CGI program to view Xymon status logs .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/xymonpage.cgi.1 xymon-4.3.17/web/xymonpage.cgi.1 --- xymon-4.3.12~lucid/web/xymonpage.cgi.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/xymonpage.cgi.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH XYMONPAGE 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH XYMONPAGE 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME xymonpage \- Utility to show a webpage using header and footer .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/web/xymonwebaccess.5 xymon-4.3.17/web/xymonwebaccess.5 --- xymon-4.3.12~lucid/web/xymonwebaccess.5 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/web/xymonwebaccess.5 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH XYMON-WEBACCESS 5 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH XYMON-WEBACCESS 5 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME xymon-webaccess \- Web-based access controls in Xymon diff -Nru xymon-4.3.12~lucid/xymond/alerts.cfg.5 xymon-4.3.17/xymond/alerts.cfg.5 --- xymon-4.3.12~lucid/xymond/alerts.cfg.5 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/xymond/alerts.cfg.5 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH ALERTS.CFG 5 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH ALERTS.CFG 5 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME alerts.cfg \- Configuration for for xymond_alert module @@ -89,6 +89,16 @@ Rule excluding an alert by the group name. Groupnames are assigned to a status via the GROUP setting in the analysis.cfg file. .sp +.BR "CLASS=classname" +Rule matching an alert by the class that the host belongs to. By default, the classname is +the operating system name; you can set another class either in +.I hosts.cfg(5) +using the CLASS tag, or a client running on the server can set the class (via a parameter +to the client startup-script). +.sp +.BR "EXCLASS=classname" +Rule excluding an alert by the class name. +.sp .BR "COLOR=color[,color]" Rule matching an alert by color. Can be "red", "yellow", or "purple". The forms "!red", "!yellow" and "!purple" can also be used to NOT send an alert if the color is the specified one. .sp diff -Nru xymon-4.3.12~lucid/xymond/analysis.cfg.5 xymon-4.3.17/xymond/analysis.cfg.5 --- xymon-4.3.12~lucid/xymond/analysis.cfg.5 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/xymond/analysis.cfg.5 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH ANALYSIS.CFG 5 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH ANALYSIS.CFG 5 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME analysis.cfg \- Configuration file for the xymond_client module @@ -215,7 +215,7 @@ .SH MSGS STATUS COLUMN SETTINGS .sp -.BR "LOG logfilename pattern [COLOR=color] [IGNORE=excludepattern]" +.BR "LOG logfilename pattern [COLOR=color] [IGNORE=excludepattern] [OPTIONAL]" .sp The Xymon client extracts interesting lines from one or more logfiles - see the @@ -244,6 +244,9 @@ "excludepattern" is a string or regular expression that can be used to filter out any unwanted strings that happen to match "pattern". .sp +The \fBOPTIONAL\fR keyword causes the check to be skipped if the logfile +does not exist. +.sp Example: Trigger a red alert when the string "ERROR" appears in the "/var/adm/syslog" file: .br LOG /var/adm/syslog ERROR @@ -263,7 +266,7 @@ .SH FILES STATUS COLUMN SETTINGS .sp -.BR "FILE filename [color] [things to check] [TRACK]" +.BR "FILE filename [color] [things to check] [OPTIONAL] [TRACK]" .sp .BR "DIR directoryname [color] [sizeMINSIZE] [TRACK]" .sp @@ -277,6 +280,12 @@ \fBcolor\fR is the color that triggers when one or more of the checks fail. +The \fBOPTIONAL\fR keyword causes this check to be skipped if the file does +not exist. E.g. you can use this to check if files that should be temporary are +not deleted, by checking that they are not older than the max time you would +expect them to stick around, and then using OPTIONAL to ignore the state +where no files exist. + The \fBTRACK\fR keyword causes the size of the file or directory to be tracked in an RRD file, and presented in a graph on the "files" status display. diff -Nru xymon-4.3.12~lucid/xymond/client/freebsd.c xymon-4.3.17/xymond/client/freebsd.c --- xymon-4.3.12~lucid/xymond/client/freebsd.c 2012-11-30 06:22:35.000000000 +0000 +++ xymon-4.3.17/xymond/client/freebsd.c 2013-07-24 14:52:08.000000000 +0000 @@ -10,7 +10,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char freebsd_rcsid[] = "$Id: freebsd.c 7174 2012-11-30 06:22:35Z storner $"; +static char freebsd_rcsid[] = "$Id: freebsd.c 7213 2013-07-24 14:52:08Z storner $"; void handle_freebsd_client(char *hostname, char *clienttype, enum ostype_t os, void *hinfo, char *sender, time_t timestamp, @@ -47,7 +47,7 @@ timestr = getdata("date"); uptimestr = getdata("uptime"); - clockstr = getdata("clockstr"); + clockstr = getdata("clock"); msgcachestr = getdata("msgcache"); whostr = getdata("who"); psstr = getdata("ps"); diff -Nru xymon-4.3.12~lucid/xymond/client/solaris.c xymon-4.3.17/xymond/client/solaris.c --- xymon-4.3.12~lucid/xymond/client/solaris.c 2012-08-01 16:16:57.000000000 +0000 +++ xymon-4.3.17/xymond/client/solaris.c 2014-01-19 21:26:25.000000000 +0000 @@ -10,7 +10,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char solaris_rcsid[] = "$Id: solaris.c 7149 2012-08-01 16:16:57Z storner $"; +static char solaris_rcsid[] = "$Id: solaris.c 7356 2014-01-19 21:26:25Z storner $"; void handle_solaris_client(char *hostname, char *clienttype, enum ostype_t os, void *hinfo, char *sender, time_t timestamp, @@ -128,7 +128,7 @@ } } - if ((blktotal > 0) && (blkfree > 0)) { + if ((blktotal >= 0) && (blkfree >= 0)) { /* Values from swap -l are numbers of 512-byte blocks. Convert to MB = N*512/(1024*1024) = N/2048 */ memswapused = (blktotal - blkfree) / 2048; memswapfree = blkfree / 2048; @@ -153,7 +153,7 @@ sprintf(msgline, "data %s.iostatdisk\n%s\n", commafy(hostname), osname(os)); addtobuffer(msg, msgline); addtobuffer(msg, p); - sendmessage(STRBUF(msg), NULL, XYMON_TIMEOUT, NULL); + combo_add(msg); } freestrbuffer(msg); } diff -Nru xymon-4.3.12~lucid/xymond/client/zos.c xymon-4.3.17/xymond/client/zos.c --- xymon-4.3.12~lucid/xymond/client/zos.c 2012-07-14 16:32:11.000000000 +0000 +++ xymon-4.3.17/xymond/client/zos.c 2013-08-05 11:54:11.000000000 +0000 @@ -11,7 +11,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char zos_rcsid[] = "$Id: zos.c 7060 2012-07-14 16:32:11Z storner $"; +static char zos_rcsid[] = "$Id: zos.c 7252 2013-08-05 11:54:11Z storner $"; void zos_cpu_report(char *hostname, char *clientclass, enum ostype_t os, @@ -529,7 +529,7 @@ freestrbuffer(monmsg); - if (anycountdata) sendmessage(STRBUF(countdata), NULL, XYMON_TIMEOUT, NULL); + if (anycountdata) combo_add(countdata); clearstrbuffer(countdata); } diff -Nru xymon-4.3.12~lucid/xymond/client/zvm.c xymon-4.3.17/xymond/client/zvm.c --- xymon-4.3.12~lucid/xymond/client/zvm.c 2012-07-14 16:32:11.000000000 +0000 +++ xymon-4.3.17/xymond/client/zvm.c 2013-08-05 11:54:11.000000000 +0000 @@ -11,7 +11,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char zvm_rcsid[] = "$Id: zvm.c 7060 2012-07-14 16:32:11Z storner $"; +static char zvm_rcsid[] = "$Id: zvm.c 7252 2013-08-05 11:54:11Z storner $"; static void zvm_cpu_report(char *hostname, char *clientclass, enum ostype_t os, void *hinfo, char *fromline, char *timestr, @@ -186,8 +186,8 @@ sprintf(msgline, "data %s.mdc\n%s\n%d:%d:%d\n", commafy(hostname), osname(os), mdcreads, mdcwrites, mdchitpct); addtobuffer(msg, msgline); - sendmessage(STRBUF(msg), NULL, XYMON_TIMEOUT, NULL); - } + combo_add(msg); + } freestrbuffer(msg); } @@ -351,7 +351,7 @@ freestrbuffer(monmsg); - if (anycountdata) sendmessage(STRBUF(countdata), NULL, XYMON_TIMEOUT, NULL); + if (anycountdata) combo_add(countdata); clearstrbuffer(countdata); } diff -Nru xymon-4.3.12~lucid/xymond/client/zvse.c xymon-4.3.17/xymond/client/zvse.c --- xymon-4.3.12~lucid/xymond/client/zvse.c 2011-11-30 11:56:42.000000000 +0000 +++ xymon-4.3.17/xymond/client/zvse.c 2013-08-05 11:54:11.000000000 +0000 @@ -11,7 +11,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char zvse_rcsid[] = "$Id: zvse.c 6783 2011-11-30 11:56:42Z storner $"; +static char zvse_rcsid[] = "$Id: zvse.c 7252 2013-08-05 11:54:11Z storner $"; static void zvse_cpu_report(char *hostname, char *clientclass, enum ostype_t os, void *hinfo, char *fromline, char *timestr, @@ -419,7 +419,7 @@ freestrbuffer(monmsg); - if (anycountdata) sendmessage(STRBUF(countdata), NULL, XYMON_TIMEOUT, NULL); + if (anycountdata) combo_add(countdata); clearstrbuffer(countdata); } diff -Nru xymon-4.3.12~lucid/xymond/client_config.c xymon-4.3.17/xymond/client_config.c --- xymon-4.3.12~lucid/xymond/client_config.c 2012-07-24 15:48:41.000000000 +0000 +++ xymon-4.3.17/xymond/client_config.c 2013-08-25 14:03:44.000000000 +0000 @@ -13,7 +13,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: client_config.c 7117 2012-07-24 15:48:41Z storner $"; +static char rcsid[] = "$Id: client_config.c 7304 2013-08-25 14:03:44Z storner $"; #include #include @@ -2981,7 +2981,7 @@ return result; } -char *check_rrdds_thresholds(char *hostname, char *classname, char *pagepaths, char *rrdkey, void * valnames, char *vals) +strbuffer_t *check_rrdds_thresholds(char *hostname, char *classname, char *pagepaths, char *rrdkey, void * valnames, char *vals) { static strbuffer_t *resbuf = NULL; char msgline[1024]; @@ -3117,7 +3117,7 @@ if (valscopy) xfree(valscopy); if (vallist) xfree(vallist); - return (STRBUFLEN(resbuf) > 0) ? STRBUF(resbuf) : NULL; + return (STRBUFLEN(resbuf) > 0) ? resbuf : NULL; } diff -Nru xymon-4.3.12~lucid/xymond/client_config.h xymon-4.3.17/xymond/client_config.h --- xymon-4.3.12~lucid/xymond/client_config.h 2011-11-30 11:56:42.000000000 +0000 +++ xymon-4.3.17/xymond/client_config.h 2013-08-25 14:03:44.000000000 +0000 @@ -65,7 +65,7 @@ char *mibname, char *keyname, char *mibdata, strbuffer_t *summarybuf, int *anyrules); -extern char *check_rrdds_thresholds(char *hostname, char *classname, char *pagepaths, char *rrdkey, void *valnames, char *vals); +extern strbuffer_t *check_rrdds_thresholds(char *hostname, char *classname, char *pagepaths, char *rrdkey, void *valnames, char *vals); extern int scan_log(void *hinfo, char *classname, diff -Nru xymon-4.3.12~lucid/xymond/client-local.cfg.5 xymon-4.3.17/xymond/client-local.cfg.5 --- xymon-4.3.12~lucid/xymond/client-local.cfg.5 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/xymond/client-local.cfg.5 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH CLIENT-LOCAL.CFG 5 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH CLIENT-LOCAL.CFG 5 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME client-local.cfg \- Local configuration settings for Xymon clients @@ -40,6 +40,20 @@ change is entered into the client-local.cfg file, and until you see the result in the status messages reported by the client. +By default, xymond will look for a matching entry by matching the client +hostname, classname or operating system name against the section expressions. +Hostname matches are used first, then classname matches, then OS matches. +The first match found is the one that is returned to the client. + +If xymond is started with the "--merge-clientlocal" option, then xymond +will instead merge all of the matching sections into one, and return all +of this data to the client. So you can have host-specific entries, and +then supplement them with class- or os-generic entries. Note that the +merging does not remove entries, so if you have e.g. a "log" entry defined +in both a hostname- and an osname-matching section, then both entries +will be sent back to the client. + + .SH FILE FORMAT The file is divided into sections, delimited by "[name]" lines. A section name can be either an operating system identifier - @@ -51,6 +65,19 @@ can configure special configurations for individual hosts, and have a default configuration for all other hosts of a certain type. +It will often be practical to use regular expressions for hostnames. +To do this you must use +.sp + [host=] +.sp +where is a Perl-compatible regular expression. The same +kind of matching can be done on operating system or host class, using +.sp + [os=] +.br + [class=] + + Apart from the section delimiter, the file format is free-form, or rather it is defined by the tools that make use of the configuration. diff -Nru xymon-4.3.12~lucid/xymond/combo.cfg.5 xymon-4.3.17/xymond/combo.cfg.5 --- xymon-4.3.12~lucid/xymond/combo.cfg.5 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/xymond/combo.cfg.5 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH COMBO.CFG 5 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH COMBO.CFG 5 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME combo.cfg \- Configuration of combostatus tool diff -Nru xymon-4.3.12~lucid/xymond/combostatus.1 xymon-4.3.17/xymond/combostatus.1 --- xymon-4.3.12~lucid/xymond/combostatus.1 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/xymond/combostatus.1 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH COMBOSTATUS 1 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH COMBOSTATUS 1 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME combostatus \- Xymon combination test tool .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/xymond/do_alert.c xymon-4.3.17/xymond/do_alert.c --- xymon-4.3.12~lucid/xymond/do_alert.c 2012-12-18 21:38:57.000000000 +0000 +++ xymon-4.3.17/xymond/do_alert.c 2014-01-27 16:55:41.000000000 +0000 @@ -13,7 +13,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: do_alert.c 7176 2012-12-18 21:38:57Z storner $"; +static char rcsid[] = "$Id: do_alert.c 7380 2014-01-27 16:55:41Z storner $"; #include #include @@ -264,7 +264,7 @@ switch (recip->format) { case ALERTFORM_TEXT: case ALERTFORM_PLAIN: - bom = msg_data(alert->pagemessage); + bom = msg_data(alert->pagemessage, 1); eoln = strchr(bom, '\n'); if (eoln) *eoln = '\0'; /* If there's a "<-- flags:.... -->" then remove it from the message */ @@ -332,7 +332,7 @@ } addtobuffer(buf, info); - bom = msg_data(alert->pagemessage); + bom = msg_data(alert->pagemessage, 1); eoln = strchr(bom, '\n'); if (eoln) { bom = eoln; @@ -351,7 +351,7 @@ sprintf(info, "%s:%s %s [%d]\n", alert->hostname, alert->testname, colorname(alert->color), alert->cookie); addtobuffer(buf, info); - addtobuffer(buf, msg_data(alert->pagemessage)); + addtobuffer(buf, msg_data(alert->pagemessage, 0)); addtobuffer(buf, "\n"); sprintf(info, "See %s%s\n", xgetenv("XYMONWEBHOST"), @@ -689,31 +689,42 @@ recip_t *recip; repeat_t *rpt; time_t r_next = -1; + void *hinfo = hostinfo(alert->hostname); stoprulefound = 0; while (!stoprulefound && ((recip = next_recipient(alert, &first, NULL, &r_next)) != NULL)) { found = 1; - /* - * This runs in the parent xymond_alert proces, so we must create - * a repeat-record here - or all alerts will get repeated every minute. - */ - rpt = find_repeatinfo(alert, recip, 1); - if (rpt) { - if (rpt->nextalert <= now) rpt->nextalert = (now + recip->interval); - if (rpt->nextalert < nexttime) nexttime = rpt->nextalert; - } - else if (r_next != -1) { - if (r_next < nexttime) nexttime = r_next; + + if (recip->criteria && recip->criteria->timespec && !timematch(xmh_item(hinfo, XMH_HOLIDAYS), recip->criteria->timespec)) { + /* Recipient not active due to time-restrictions. */ + if ((r_next != -1) && (r_next < nexttime)) nexttime = r_next; } else { /* - * This can happen, e.g. if we get an alert, but the minimum - * DURATION has not been met. - * This simply means we dropped the alert -for now - for some - * reason, so it should be retried again right away. Put in a - * 1 minute delay to prevent run-away alerts from flooding us. + * This runs in the parent xymond_alert proces, so we must create + * a repeat-record here - or all alerts will get repeated every minute. + * + * NB: Even though we say "create", find_repeatinfo() will return NULL + * for ignored alerts. */ - if ((now + 60) < nexttime) nexttime = now + 60; + rpt = find_repeatinfo(alert, recip, 1); + if (rpt) { + if (rpt->nextalert <= now) rpt->nextalert = (now + recip->interval); + if (rpt->nextalert < nexttime) nexttime = rpt->nextalert; + } + else if (r_next != -1) { + if (r_next < nexttime) nexttime = r_next; + } + else { + /* + * This can happen, e.g. if we get an alert, but the minimum + * DURATION has not been met. + * This simply means we dropped the alert -for now - for some + * reason, so it should be retried again right away. Put in a + * 1 minute delay to prevent run-away alerts from flooding us. + */ + if ((now + 60) < nexttime) nexttime = now + 60; + } } } diff -Nru xymon-4.3.12~lucid/xymond/do_rrd.c xymon-4.3.17/xymond/do_rrd.c --- xymon-4.3.12~lucid/xymond/do_rrd.c 2013-07-23 12:20:59.000000000 +0000 +++ xymon-4.3.17/xymond/do_rrd.c 2013-08-25 14:03:44.000000000 +0000 @@ -8,7 +8,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: do_rrd.c 7204 2013-07-23 12:20:59Z storner $"; +static char rcsid[] = "$Id: do_rrd.c 7304 2013-08-25 14:03:44Z storner $"; #include #include @@ -270,7 +270,7 @@ xtreePos_t handle; updcacheitem_t *cacheitem = NULL; int pollinterval; - char *modifymsg; + strbuffer_t *modifymsg; time_t updtime = 0; /* Reset the RRD poll interval */ @@ -441,7 +441,7 @@ * Match the RRD data against any DS client-configuration modifiers. */ modifymsg = check_rrdds_thresholds(hostname, classname, pagepaths, rrdfn, ((rrdtpldata_t *)template)->dsnames, rrdvalues); - if (modifymsg) sendmessage(modifymsg, NULL, XYMON_TIMEOUT, NULL); + if (modifymsg) combo_add(modifymsg); /* * See if we want the data to go to an external handler. diff -Nru xymon-4.3.12~lucid/xymond/etcfiles/analysis.cfg xymon-4.3.17/xymond/etcfiles/analysis.cfg --- xymon-4.3.12~lucid/xymond/etcfiles/analysis.cfg 2012-08-02 16:08:56.000000000 +0000 +++ xymon-4.3.17/xymond/etcfiles/analysis.cfg 2014-01-26 11:08:21.000000000 +0000 @@ -178,7 +178,7 @@ # Example: Go red if the text "I/O error" or "read error" appears. # LOG %/var/(adm|log)/messages %(I/O|read).error COLOR=red # -# FILE filename [color] [things to check] [TRACK] +# FILE filename [things to check] [color] [TRACK] # NB: The files you wish to monitor must be listed in a "file:..." # entry in the client-local.cfg file, in order for the client to # report any data about them. @@ -230,7 +230,7 @@ # Example: Check the timestamp, size and SHA-1 hash of the /bin/sh program: # FILE /bin/sh MTIME=1128514608 SIZE=645140 SHA1=5bd81afecf0eb93849a2fd9df54e8bcbe3fefd72 # -# DIR directory [color] [SIZEminsize] [TRACK] +# DIR directory [SIZEminsize] [color] [TRACK] # NB: The directories you wish to monitor must be listed in a "dir:..." # entry in the client-local.cfg file, in order for the client to # report any data about them. diff -Nru xymon-4.3.12~lucid/xymond/etcfiles/columndoc.csv xymon-4.3.17/xymond/etcfiles/columndoc.csv --- xymon-4.3.12~lucid/xymond/etcfiles/columndoc.csv 2012-08-04 12:13:20.000000000 +0000 +++ xymon-4.3.17/xymond/etcfiles/columndoc.csv 2013-07-30 12:46:12.000000000 +0000 @@ -55,3 +55,6 @@ trends;The trends column holds a collection of the graphs that show trends in the utilisation, response-times etc. for the services monitored on this host.; graphs;The graphs column holds a collection of the graphs that show trends in the utilisation, response-times etc. for the services monitored on this host.; larrd;The larrd column holds a collection of the graphs that show trends in the utilisation, response-times etc. for the services monitored on this host.; +lpd;The lpd column shows the status of the line printer daemon check.; +netbios-ssn;The netbios-ssn column shows the status when trying to communicate with the netbios-ssn service on the host. It makes sure that the NETBIOS Session Service for NT Authentication is working for the given host.; +snpp;The snpp column shows the status when trying to communicate with the Simple Network Paging Protocol (SNPP) service on the host.; diff -Nru xymon-4.3.12~lucid/xymond/etcfiles/graphs.cfg xymon-4.3.17/xymond/etcfiles/graphs.cfg --- xymon-4.3.12~lucid/xymond/etcfiles/graphs.cfg 2011-03-08 17:20:28.000000000 +0000 +++ xymon-4.3.17/xymond/etcfiles/graphs.cfg 2013-07-30 12:48:53.000000000 +0000 @@ -1151,6 +1151,7 @@ CDEF:in@RRDIDX@=inbytes@RRDIDX@,8,* DEF:outbytes@RRDIDX@=@RRDFN@:bytesSent:AVERAGE CDEF:out@RRDIDX@=outbytes@RRDIDX@,8,* + CDEF:tot@RRDIDX@=in@RRDIDX@,out@RRDIDX@,+ LINE2:in@RRDIDX@#@COLOR@:@RRDPARAM@ inbound GPRINT:in@RRDIDX@:LAST: \: %10.1lf (cur) GPRINT:in@RRDIDX@:MAX: \: %10.1lf (max) @@ -1161,6 +1162,11 @@ GPRINT:out@RRDIDX@:MAX: \: %10.1lf (max) GPRINT:out@RRDIDX@:MIN: \: %10.1lf (min) GPRINT:out@RRDIDX@:AVERAGE: \: %10.1lf (avg)\n + LINE2:tot@RRDIDX@#@COLOR@:@RRDPARAM@ I/O total + GPRINT:tot@RRDIDX@:LAST: \: %5.1lf%s (cur) + GPRINT:tot@RRDIDX@:MAX: \: %5.1lf%s (max) + GPRINT:tot@RRDIDX@:MIN: \: %5.1lf%s (min) + GPRINT:tot@RRDIDX@:AVERAGE: \: %5.1lf%s (avg)\n [files] FNPATTERN ^filesizes.(.+).rrd diff -Nru xymon-4.3.12~lucid/xymond/etcfiles/xymonserver.cfg.DIST xymon-4.3.17/xymond/etcfiles/xymonserver.cfg.DIST --- xymon-4.3.12~lucid/xymond/etcfiles/xymonserver.cfg.DIST 2013-07-23 12:20:59.000000000 +0000 +++ xymon-4.3.17/xymond/etcfiles/xymonserver.cfg.DIST 2014-01-19 21:49:42.000000000 +0000 @@ -46,7 +46,9 @@ PINGCOLUMN="conn" # Column where the ping-test reports results. INFOCOLUMN="info" # Column where the info-pages are reported. +INFOCOLUMNGIF="green.gif" # Icon file used for the info-column. TRENDSCOLUMN="trends" # Column where the RRD graphs are reported. +TRENDSCOLUMNGIF="green.gif" # Icon file used for the trends-column. MAXMSGSPERCOMBO="100" # How many individual messages to combine in a combo-message. 0=unlimited. SLEEPBETWEENMSGS="0" # Delay between sending each combo message, in milliseconds. @@ -174,6 +176,7 @@ XYMONNONGREENEXT="eventlog.sh acklog.sh" # What extensions to have on the All non-green page. DOTHEIGHT="16" # Height (in pixels) of the color GIF's DOTWIDTH="16" # Width (in pixels) of the color GIF's +IMAGEFILETYPE="gif" # Filetype of the icon image files. You can change this to "png" or "jpg" COLUMNDOCURL="$CGIBINURL/columndoc.sh?%s" # URL formatting string for column-links # HOSTDOCURL is a formatting string for generating links to host documentation. # If NOT set, Xymon will scan the "notes" directory for files matching the hostname diff -Nru xymon-4.3.12~lucid/xymond/Makefile xymon-4.3.17/xymond/Makefile --- xymon-4.3.12~lucid/xymond/Makefile 2012-11-14 11:29:54.000000000 +0000 +++ xymon-4.3.17/xymond/Makefile 2014-02-10 21:13:18.000000000 +0000 @@ -12,18 +12,18 @@ PROGRAMS += xymond_rrd endif -XYMONDOBJS = xymond.o xymond_buffer.o xymond_ipc.o -CHANNELOBJS = xymond_channel.o xymond_buffer.o xymond_ipc.o +XYMONDOBJS = xymond.o +CHANNELOBJS = xymond_channel.o LOCATOROBJS = xymond_locator.o -SAMPLEOBJS = xymond_sample.o xymond_worker.o xymond_buffer.o -FILESTOREOBJS = xymond_filestore.o xymond_worker.o xymond_buffer.o -HISTORYOBJS = xymond_history.o xymond_worker.o xymond_buffer.o -ALERTOBJS = xymond_alert.o xymond_worker.o xymond_buffer.o do_alert.o -RRDOBJS = xymond_rrd.o xymond_worker.o xymond_buffer.o do_rrd.o client_config.o -HOSTDATAOBJS = xymond_hostdata.o xymond_worker.o xymond_buffer.o -CAPTUREOBJS = xymond_capture.o xymond_worker.o xymond_buffer.o -CLIENTOBJS = xymond_client.o xymond_worker.o xymond_buffer.o client_config.o -DISTRIBUTEOBJS= xymond_distribute.o xymond_worker.o xymond_buffer.o +SAMPLEOBJS = xymond_sample.o xymond_worker.o +FILESTOREOBJS = xymond_filestore.o xymond_worker.o +HISTORYOBJS = xymond_history.o xymond_worker.o +ALERTOBJS = xymond_alert.o xymond_worker.o do_alert.o +RRDOBJS = xymond_rrd.o xymond_worker.o do_rrd.o client_config.o +HOSTDATAOBJS = xymond_hostdata.o xymond_worker.o +CAPTUREOBJS = xymond_capture.o xymond_worker.o +CLIENTOBJS = xymond_client.o xymond_worker.o client_config.o +DISTRIBUTEOBJS= xymond_distribute.o xymond_worker.o COMBOTESTOBJS = combostatus.o MAILACKOBJS = xymon-mailack.o TRIMHISTOBJS = trimhistory.o @@ -88,8 +88,8 @@ xymond_client: $(CLIENTOBJS) $(XYMONCOMMLIB) $(CC) $(LDFLAGS) -o $@ $(RPATHOPT) $(CLIENTOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS) $(PCRELIBS) -../client/xymond_client: $(CLIENTOBJS) ../lib/xymonclient.a - $(CC) -o $@ $(RPATHOPT) $(CLIENTOBJS) ../lib/xymonclient.a $(PCRELIBS) $(NETLIBS) $(LIBRTDEF) +../client/xymond_client: $(CLIENTOBJS) ../lib/libxymonclientcomm.a ../lib/libxymontime.a ../lib/libxymonclient.a + $(CC) -o $@ $(RPATHOPT) $(CLIENTOBJS) ../lib/libxymonclientcomm.a ../lib/libxymontime.a ../lib/libxymonclient.a $(PCRELIBS) $(NETLIBS) $(LIBRTDEF) xymond_client.o: xymond_client.c client/*.c $(CC) $(CFLAGS) -c -o $@ xymond_client.c @@ -173,7 +173,7 @@ ifndef PKGBUILD chown $(XYMONUSER) $(INSTALLROOT)$(MANROOT)/man1 $(INSTALLROOT)$(MANROOT)/man5 $(INSTALLROOT)$(MANROOT)/man8 chgrp `$(IDTOOL) -g $(XYMONUSER)` $(INSTALLROOT)$(MANROOT)/man1 $(INSTALLROOT)$(MANROOT)/man5 $(INSTALLROOT)$(MANROOT)/man8 - chmod 755 $(INSTALLROOT)$(MANROOT)/man1 $(INSTALLROOT)$(MANROOT)/man5 $(INSTALLROOT)$(MANROOT)/man8 + chmod 755 $(INSTALLROOT)$(MANROOT) $(INSTALLROOT)$(MANROOT)/man1 $(INSTALLROOT)$(MANROOT)/man5 $(INSTALLROOT)$(MANROOT)/man8 endif cp -fp *.1 $(INSTALLROOT)$(MANROOT)/man1/ cp -fp *.5 $(INSTALLROOT)$(MANROOT)/man5/ @@ -191,12 +191,14 @@ cd wwwfiles; find . | grep -v RCS | grep -v ".svn" | grep -v DIST | ../../build/setup-newfiles $(INSTALLROOT)$(INSTALLWWWDIR)/ ../../build/md5.dat cd webfiles; find . | grep -v RCS | grep -v ".svn" | grep -v DIST | ../../build/setup-newfiles $(INSTALLROOT)$(INSTALLWEBDIR)/ ../../build/md5.dat touch $(INSTALLROOT)$(INSTALLETCDIR)/critical.cfg $(INSTALLROOT)$(INSTALLETCDIR)/critical.cfg.bak - chmod g+w $(INSTALLROOT)$(INSTALLETCDIR)/critical.cfg $(INSTALLROOT)$(INSTALLETCDIR)/critical.cfg.bak - mkdir -p $(INSTALLROOT)$(XYMONLOGDIR) + chmod 664 $(INSTALLROOT)$(INSTALLETCDIR)/critical.cfg $(INSTALLROOT)$(INSTALLETCDIR)/critical.cfg.bak + mkdir -p $(INSTALLROOT)$(XYMONLOGDIR); chmod 755 $(INSTALLROOT)$(XYMONLOGDIR) + mkdir -p $(INSTALLROOT)$(INSTALLETCDIR)/tasks.d; chmod 755 $(INSTALLROOT)$(INSTALLETCDIR)/tasks.d ifndef PKGBUILD chown $(XYMONUSER) $(INSTALLROOT)$(XYMONLOGDIR) $(INSTALLROOT)$(XYMONHOME) $(INSTALLROOT)$(XYMONHOME)/* $(INSTALLROOT)$(INSTALLBINDIR)/* $(INSTALLROOT)$(INSTALLETCDIR)/* $(INSTALLROOT)$(INSTALLEXTDIR)/* $(INSTALLROOT)$(INSTALLWEBDIR)/* $(INSTALLROOT)$(INSTALLWWWDIR)/gifs $(INSTALLROOT)$(INSTALLWWWDIR)/gifs/* $(INSTALLROOT)$(INSTALLWWWDIR)/menu $(INSTALLROOT)$(INSTALLWWWDIR)/menu/* $(INSTALLROOT)$(INSTALLWWWDIR)/help $(INSTALLROOT)$(INSTALLWWWDIR)/notes $(INSTALLROOT)$(INSTALLWWWDIR)/html $(INSTALLROOT)$(INSTALLWWWDIR)/wml $(INSTALLROOT)$(XYMONVAR) $(INSTALLROOT)$(XYMONVAR)/* chgrp `$(IDTOOL) -g $(XYMONUSER)` $(INSTALLROOT)$(XYMONLOGDIR) $(INSTALLROOT)$(XYMONHOME) $(INSTALLROOT)$(XYMONHOME)/* $(INSTALLROOT)$(INSTALLBINDIR)/* $(INSTALLROOT)$(INSTALLETCDIR)/* $(INSTALLROOT)$(INSTALLEXTDIR)/* $(INSTALLROOT)$(INSTALLWEBDIR)/* $(INSTALLROOT)$(INSTALLWWWDIR)/gifs $(INSTALLROOT)$(INSTALLWWWDIR)/gifs/* $(INSTALLROOT)$(INSTALLWWWDIR)/menu $(INSTALLROOT)$(INSTALLWWWDIR)/menu/* $(INSTALLROOT)$(INSTALLWWWDIR)/help $(INSTALLROOT)$(INSTALLWWWDIR)/notes $(INSTALLROOT)$(INSTALLWWWDIR)/html $(INSTALLROOT)$(INSTALLWWWDIR)/wml $(INSTALLROOT)$(XYMONVAR) $(INSTALLROOT)$(XYMONVAR)/* chgrp $(HTTPDGID) $(INSTALLROOT)$(INSTALLETCDIR)/critical.cfg $(INSTALLROOT)$(INSTALLETCDIR)/critical.cfg.bak + chmod 664 $(INSTALLROOT)$(INSTALLETCDIR)/critical.cfg $(INSTALLROOT)$(INSTALLETCDIR)/critical.cfg.bak chown root $(INSTALLROOT)$(INSTALLBINDIR)/xymonping || echo "Could not make xymonping owned by root, continuing" chmod 4755 $(INSTALLROOT)$(INSTALLBINDIR)/xymonping || echo "Could not make xymonping suid-root, continuing" diff -Nru xymon-4.3.12~lucid/xymond/rrd/do_temperature.c xymon-4.3.17/xymond/rrd/do_temperature.c --- xymon-4.3.12~lucid/xymond/rrd/do_temperature.c 2012-07-14 16:32:11.000000000 +0000 +++ xymon-4.3.17/xymond/rrd/do_temperature.c 2013-07-30 12:47:38.000000000 +0000 @@ -8,7 +8,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char temperature_rcsid[] = "$Id: do_temperature.c 7060 2012-07-14 16:32:11Z storner $"; +static char temperature_rcsid[] = "$Id: do_temperature.c 7248 2013-07-30 12:47:38Z storner $"; int do_temperature_rrd(char *hostname, char *testname, char *classname, char *pagepaths, char *msg, time_t tstamp) { @@ -71,6 +71,13 @@ bol += strspn(bol, " \t"); + /* Strip off any leading bold and italic HTML tags */ + if (strncasecmp(bol, "", 6) == 0) { bol += 6; } + else if (strncasecmp(bol, "", 3) == 0) { bol += 3; } + else if (strncasecmp(bol, "", 6) == 0) { bol += 6; } + else if (strncasecmp(bol, "", 3) == 0) { bol += 3; } + bol += strspn(bol, " \t"); + p = bol + strlen(bol) - 1; while ((p > bol) && isspace((int)*p)) p--; while ((p > bol) && isdigit((int)*p)) p--; diff -Nru xymon-4.3.12~lucid/xymond/rrd/do_vmstat.c xymon-4.3.17/xymond/rrd/do_vmstat.c --- xymon-4.3.12~lucid/xymond/rrd/do_vmstat.c 2012-07-13 14:05:20.000000000 +0000 +++ xymon-4.3.17/xymond/rrd/do_vmstat.c 2014-01-07 21:52:08.000000000 +0000 @@ -8,7 +8,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char vmstat_rcsid[] = "$Id: do_vmstat.c 7026 2012-07-13 14:05:20Z storner $"; +static char vmstat_rcsid[] = "$Id: do_vmstat.c 7334 2014-01-07 21:52:08Z storner $"; typedef struct vmstat_layout_t { int index; @@ -116,7 +116,7 @@ /* This one matches FreeBSD 4.10 */ /* LARRD 0.43c compatible */ -static vmstat_layout_t vmstat_freebsd_layout[] = { +static vmstat_layout_t vmstat_freebsd4_layout[] = { { 0, "cpu_r" }, { 1, "cpu_b" }, { 2, "cpu_w" }, @@ -138,6 +138,30 @@ { -1, NULL } }; +/* FreeBSD v6 and later, possibly v5 also */ +static vmstat_layout_t vmstat_freebsd_layout[] = { + { 0, "cpu_r" }, + { 1, "cpu_b" }, + { 2, "cpu_w" }, + { 3, "mem_avm" }, + { 4, "mem_free" }, + { 5, "mem_flt" }, + { 6, "mem_re" }, + { 7, "mem_pi" }, + { 8, "mem_po" }, + { 9, "mem_fr" }, + { 10, "sr" }, + { 11, "dsk_da0" }, + { 12, "dsk_pa0" }, + { 13, "cpu_int" }, + { 14, "cpu_syc" }, + { 15, "cpu_csw" }, + { 16, "cpu_usr" }, + { 17, "cpu_sys" }, + { 18, "cpu_idl" }, + { -1, NULL } +}; + /* This one matches NetBSD 2.0 */ /* LARRD 0.43c does not support NetBSD */ static vmstat_layout_t vmstat_netbsd_layout[] = { @@ -381,7 +405,25 @@ case OS_HPUX: layout = vmstat_hpux_layout; break; case OS_FREEBSD: - layout = vmstat_freebsd_layout; break; + /* + * Special, because there are two layouts for FreeBSD + * FreeBSD v4.x has 19 fields, later versions of FreeBSD + * are the same as OpenBSD, with 18 fields. + */ + { + char **dsnames = NULL; + int dscount, i; + + dscount = rrddatasets(hostname, &dsnames); + layout = ((dscount == 19) ? vmstat_freebsd4_layout : vmstat_freebsd_layout); + + if ((dscount > 0) && dsnames) { + /* Free the dsnames list */ + for (i=0; (i1 week - + diff -Nru xymon-4.3.12~lucid/xymond/webfiles/maint_form xymon-4.3.17/xymond/webfiles/maint_form --- xymon-4.3.12~lucid/xymond/webfiles/maint_form 2012-07-15 10:49:22.000000000 +0000 +++ xymon-4.3.17/xymond/webfiles/maint_form 2014-02-13 11:22:08.000000000 +0000 @@ -52,7 +52,7 @@ Hostname pattern
- + @@ -68,6 +68,12 @@ + + + Class pattern
+ + + diff -Nru xymon-4.3.12~lucid/xymond/xymond.8 xymon-4.3.17/xymond/xymond.8 --- xymon-4.3.12~lucid/xymond/xymond.8 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/xymond/xymond.8 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH XYMOND 8 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH XYMOND 8 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME xymond \- Master network daemon for a Xymon server .SH SYNOPSIS @@ -60,6 +60,16 @@ Prevent status messages from going purple when they are no longer valid. Unlike the standard bbd daemon, purple-handling is done by xymond. +.IP "--merge-clientconfig" +The +.I client-local.cfg(5) +file contains client-configuration which can be found matching a client +against its hostname, its classname, or the name of the OS the client is +running. By default xymond will return one entry from the file to the +client, looking for a hostname, classname or OS match (in that order). +This option causes xymond to merge all matching entries together into +one and return all of it to the client. + .IP "--listen=IP[:PORT]" Specifies the IP-address and port where xymond will listen for incoming connections. By default, xymond listens on IP 0.0.0.0 (i.e. all IP- @@ -69,6 +79,10 @@ Specifies the listen-queue for incoming connections. You don't need to tune this unless you have a very busy xymond daemon. +.IP "--no-bfq" +Tells xymond to NOT use the local messagequeue interface for receiving status- +updates from xymond_client and xymonnet. + .IP "--daemon" xymond is normally started by .I xymonlaunch(8) @@ -203,6 +217,19 @@ from the Xymon server. The use of these may be seen as a security risk since they allow file downloads. +.IP "--ack-each-color" +By default, sending an ACK for a yellow status stops alerts from being sent +while the status remains yellow or red. A status change from yellow to red +will not re-enable alerts - the ACK covers all non-green statuses. +With this option, an ACK is valid only for the color of the status when the +ACK was sent. So an ACK for a yellow status is ignored if the status later +changes to red, but an ACK for a red status covers both yellow and red. +.br +Note: An ACK for a red status will clear any existing yellow acks. This +means that a long-lived ack for yellow is lost when you send a short-lived +ack for red. Hence alerts will restart when the red ack expires, even if +the status by then has changed to yellow. + .IP "--debug" Enable debugging output. diff -Nru xymon-4.3.12~lucid/xymond/xymond_alert.8 xymon-4.3.17/xymond/xymond_alert.8 --- xymon-4.3.12~lucid/xymond/xymond_alert.8 2013-07-24 08:47:41.000000000 +0000 +++ xymon-4.3.17/xymond/xymond_alert.8 2014-02-23 09:44:57.000000000 +0000 @@ -1,4 +1,4 @@ -.TH XYMOND_ALERT 8 "Version 4.3.12: 24 Jul 2013" "Xymon" +.TH XYMOND_ALERT 8 "Version 4.3.17: 23 Feb 2014" "Xymon" .SH NAME xymond_alert \- xymond worker module for sending out alerts .SH SYNOPSIS diff -Nru xymon-4.3.12~lucid/xymond/xymond_alert.c xymon-4.3.17/xymond/xymond_alert.c --- xymon-4.3.12~lucid/xymond/xymond_alert.c 2012-07-24 16:24:39.000000000 +0000 +++ xymon-4.3.17/xymond/xymond_alert.c 2014-01-21 16:09:01.000000000 +0000 @@ -40,7 +40,7 @@ * active alerts for this host.test combination. */ -static char rcsid[] = "$Id: xymond_alert.c 7120 2012-07-24 16:24:39Z storner $"; +static char rcsid[] = "$Id: xymond_alert.c 7359 2014-01-21 16:09:01Z storner $"; #include #include @@ -212,6 +212,7 @@ case SIGCHLD: break; + case SIGHUP: case SIGUSR1: nextcheckpoint = 0; break; @@ -506,6 +507,7 @@ sigaction(SIGINT, &sa, NULL); sigaction(SIGCHLD, &sa, NULL); sigaction(SIGUSR1, &sa, NULL); + sigaction(SIGHUP, &sa, NULL); if (xgetenv("XYMONSERVERLOGS")) { sprintf(acklogfn, "%s/acknowledge.log", xgetenv("XYMONSERVERLOGS")); diff -Nru xymon-4.3.12~lucid/xymond/xymond_buffer.c xymon-4.3.17/xymond/xymond_buffer.c --- xymon-4.3.12~lucid/xymond/xymond_buffer.c 2011-07-31 21:01:52.000000000 +0000 +++ xymon-4.3.17/xymond/xymond_buffer.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -/*----------------------------------------------------------------------------*/ -/* Xymon message daemon. */ -/* */ -/* This module contains a shared routine to find the size of a shared memory */ -/* buffer used for one of the Xymon communications-channels. */ -/* */ -/* Copyright (C) 2004-2011 Henrik Storner */ -/* */ -/* This program is released under the GNU General Public License (GPL), */ -/* version 2. See the file "COPYING" for details. */ -/* */ -/*----------------------------------------------------------------------------*/ - -static char rcsid[] = "$Id: xymond_buffer.c 6712 2011-07-31 21:01:52Z storner $"; - -#include -#include - -#include "libxymon.h" -#include "xymond_buffer.h" - -unsigned int shbufsz(enum msgchannels_t chnid) -{ - unsigned int defvalue = 0, result = 0; - char *v = NULL; - - if (chnid != C_LAST) { - switch (chnid) { - case C_STATUS: v = getenv("MAXMSG_STATUS"); defvalue = 256; break; - case C_CLIENT: v = getenv("MAXMSG_CLIENT"); defvalue = 512; break; - case C_CLICHG: v = getenv("MAXMSG_CLICHG"); defvalue = shbufsz(C_CLIENT); break; - case C_DATA: v = getenv("MAXMSG_DATA"); defvalue = 256; break; - case C_NOTES: v = getenv("MAXMSG_NOTES"); defvalue = 256; break; - case C_STACHG: v = getenv("MAXMSG_STACHG"); defvalue = shbufsz(C_STATUS); break; - case C_PAGE: v = getenv("MAXMSG_PAGE"); defvalue = shbufsz(C_STATUS); break; - case C_ENADIS: v = getenv("MAXMSG_ENADIS"); defvalue = 32; break; - case C_USER: v = getenv("MAXMSG_USER"); defvalue = 128; break; - default: break; - } - - if (v) { - result = atoi(v); - /* See if it is an old setting in bytes */ - if (result > 32*1024) result = (result / 1024); - } - - if (result < 32) result = defvalue; - } - else { - enum msgchannels_t i; - unsigned int isz; - - result = 0; - - for (i=C_STATUS; (i < C_LAST); i++) { - isz = shbufsz(i); - if (isz > result) result = isz; - } - } - - return result; -} - diff -Nru xymon-4.3.12~lucid/xymond/xymond_buffer.h xymon-4.3.17/xymond/xymond_buffer.h --- xymon-4.3.12~lucid/xymond/xymond_buffer.h 2011-07-31 21:01:52.000000000 +0000 +++ xymon-4.3.17/xymond/xymond_buffer.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -/*----------------------------------------------------------------------------*/ -/* Xymon message daemon. */ -/* */ -/* Copyright (C) 2004-2011 Henrik Storner */ -/* */ -/* This program is released under the GNU General Public License (GPL), */ -/* version 2. See the file "COPYING" for details. */ -/* */ -/*----------------------------------------------------------------------------*/ - -#ifndef __XYMOND_BUFFER_H__ -#define __XYMOND_BUFFER_H__ - -enum msgchannels_t { C_STATUS=1, C_STACHG, C_PAGE, C_DATA, C_NOTES, C_ENADIS, C_CLIENT, C_CLICHG, C_USER, C_LAST }; - -extern unsigned int shbufsz(enum msgchannels_t chnid); -#endif - diff -Nru xymon-4.3.12~lucid/xymond/xymond.c xymon-4.3.17/xymond/xymond.c --- xymon-4.3.12~lucid/xymond/xymond.c 2013-07-24 08:21:44.000000000 +0000 +++ xymon-4.3.17/xymond/xymond.c 2014-02-23 09:37:35.000000000 +0000 @@ -25,7 +25,7 @@ /* */ /*----------------------------------------------------------------------------*/ -static char rcsid[] = "$Id: xymond.c 7210 2013-07-24 08:21:44Z storner $"; +static char rcsid[] = "$Id: xymond.c 7445 2014-02-23 09:37:35Z storner $"; #include #include @@ -53,12 +53,10 @@ #include #include #include +#include #include "libxymon.h" -#include "xymond_buffer.h" -#include "xymond_ipc.h" - #define DISABLED_UNTIL_OK -1 /* @@ -133,6 +131,7 @@ time_t enabletime; /* time when test auto-enables after a disable */ time_t acktime; /* time when test acknowledgement expires */ time_t redstart, yellowstart; + int maxackedcolor; /* The most severe color that has been acked */ unsigned char *message; int msgsz; unsigned char *dismsg, *ackmsg; @@ -192,7 +191,7 @@ int clientsavedisk = 0; /* On disk via the CLICHG channel */ int allow_downloads = 1; int defaultvalidity = 30; /* Minutes */ - +int ackeachcolor = 0; #define NOTALK 0 #define RECEIVING 1 @@ -228,6 +227,11 @@ xymond_channel_t *clichgchn = NULL; /* Receives "clichg" messages */ xymond_channel_t *userchn = NULL; /* Receives "usermsg" messages */ +static int backfeedqueue = -1; +static unsigned long backfeedcount = 0; +static char *bf_buf = NULL; +static int bf_bufsz = 0; + #define NO_COLOR (COL_COUNT) static char *colnames[COL_COUNT+1]; int alertcolors, okcolors; @@ -267,6 +271,7 @@ xymond_statistics_t xymond_stats[] = { { "status", 0 }, { "combo", 0 }, + { "extcombo", 0 }, { "page", 0 }, { "summary", 0 }, { "data", 0 }, @@ -289,7 +294,7 @@ { NULL, 0 } }; -enum boardfield_t { F_NONE, F_HOSTNAME, F_TESTNAME, F_COLOR, F_FLAGS, +enum boardfield_t { F_NONE, F_IP, F_HOSTNAME, F_TESTNAME, F_MATCHEDTAG, F_COLOR, F_FLAGS, F_LASTCHANGE, F_LOGTIME, F_VALIDTIME, F_ACKTIME, F_DISABLETIME, F_SENDER, F_COOKIE, F_LINE1, F_ACKMSG, F_DISMSG, F_MSG, F_CLIENT, F_CLIENTTSTAMP, @@ -304,8 +309,12 @@ char *name; enum boardfield_t id; } boardfieldnames_t; + boardfieldnames_t boardfieldnames[] = { + { "ip", F_IP }, { "hostname", F_HOSTNAME }, + { "matchedtag", F_MATCHEDTAG }, + { "matchedtags", F_MATCHEDTAG }, { "testname", F_TESTNAME }, { "color", F_COLOR }, { "flags", F_FLAGS }, @@ -331,10 +340,19 @@ }; typedef struct boardfields_t { enum boardfield_t field; - enum xmh_item_t xmhfield; + enum xmh_item_t xmhfield; /* Only for field == F_HOSTINFO */ } boardfield_t; -#define BOARDFIELDS_MAX 50 -boardfield_t boardfields[BOARDFIELDS_MAX+1]; + +enum filtertype_t { FILTER_XMH, FILTER_PAGEPATH, FILTER_TEST, FILTER_TAG, FILTER_COLOR, FILTER_ACKLEVEL, FILTER_NOTDOWN, FILTER_DOWN }; + +typedef struct hostfilter_rec_t { + enum filtertype_t filtertype; + pcre *wantedptn; int wantedvalue; + struct hostfilter_rec_t *next; + enum xmh_item_t field; /* Only for filtertype == FILTER_XMH */ + xtreePos_t handle; +} hostfilter_rec_t; + /* Statistics counters */ unsigned long msgs_total = 0; @@ -451,6 +469,8 @@ clients = semctl(userchn->semid, CLIENTCOUNT, GETVAL); sprintf(msgline, "user channel messages: %10ld (%d readers)\n", userchn->msgcount, clients); addtobuffer(statsbuf, msgline); + sprintf(msgline, "backfeed messages : %10ld\n", backfeedcount); + addtobuffer(statsbuf, msgline); ghandle = xtreeFirst(rbghosts); if (ghandle != xtreeEnd(rbghosts)) addtobuffer(statsbuf, "\n\nGhost reports:\n"); @@ -500,10 +520,7 @@ clearstrbuffer(result); for (mwalk = msglist; (mwalk); mwalk = mwalk->next) { if ((mwalk->timestamp + MAX_SUBCLIENT_LIFETIME) < nowtimer) continue; /* Expired data */ - addtobuffer(result, "\n[collector:"); - addtobuffer(result, mwalk->collectorid); - addtobuffer(result, "]\n"); - addtobuffer(result, mwalk->msg); + addtobuffer_many(result, "\n[collector:", mwalk->collectorid, "]\n", mwalk->msg, NULL); } return STRBUF(result); @@ -901,6 +918,7 @@ *(channel->channelbuf + bufsz - 5) = '\0'; break; + case C_FEEDBACK_QUEUE: case C_LAST: break; } @@ -1049,29 +1067,34 @@ dbgprintf("<- log_multisrc\n"); } -xymond_log_t *find_log(char *hostname, char *testname, char *origin, xymond_hostlist_t **host) +xymond_log_t *find_log(hostfilter_rec_t *filter, xymond_hostlist_t **host) { - xtreePos_t hosthandle, testhandle, originhandle; - xymond_hostlist_t *hwalk; - char *owalk = NULL; - testinfo_t *twalk; + hostfilter_rec_t *fwalk; + xymond_hostlist_t *hrec = NULL; + testinfo_t *trec = NULL; xymond_log_t *lwalk; *host = NULL; - if ((hostname == NULL) || (testname == NULL)) return NULL; + if (!filter) return NULL; - hosthandle = xtreeFind(rbhosts, hostname); - if (hosthandle != xtreeEnd(rbhosts)) *host = hwalk = xtreeData(rbhosts, hosthandle); else return NULL; + for (fwalk = filter; (fwalk); fwalk = fwalk->next) { + switch(fwalk->filtertype) { + case FILTER_XMH: + if ((fwalk->field == XMH_HOSTNAME) && (fwalk->handle != xtreeEnd(rbhosts))) *host = hrec = xtreeData(rbhosts, fwalk->handle); + break; - testhandle = xtreeFind(rbtests, testname); - if (testhandle != xtreeEnd(rbtests)) twalk = xtreeData(rbtests, testhandle); else return NULL; + case FILTER_TEST: + if (fwalk->handle != xtreeEnd(rbtests)) trec = xtreeData(rbtests, fwalk->handle); + break; - if (origin) { - originhandle = xtreeFind(rborigins, origin); - if (originhandle != xtreeEnd(rborigins)) owalk = xtreeData(rborigins, originhandle); + default: + break; + } } - for (lwalk = hwalk->logs; (lwalk && ((lwalk->test != twalk) || (lwalk->origin != owalk))); lwalk = lwalk->next); + if (!hrec || !trec) return NULL; + + for (lwalk = hrec->logs; (lwalk && (lwalk->test != trec)); lwalk = lwalk->next); return lwalk; } @@ -1194,6 +1217,7 @@ if (createlog && (lwalk == NULL)) { lwalk = (xymond_log_t *)calloc(1, sizeof(xymond_log_t)); lwalk->lastchange = (time_t *)calloc((flapcount > 0) ? flapcount : 1, sizeof(time_t)); + lwalk->lastchange[0] = getcurrenttime(NULL); lwalk->color = lwalk->oldcolor = NO_COLOR; lwalk->host = hwalk; lwalk->test = twalk; @@ -1324,7 +1348,7 @@ textornull(hostname), textornull(testname), textornull(sender)); return; } - if (msg_data(msg) == (char *)msg) { + if (msg_data(msg, 0) == (char *)msg, 0) { errprintf("Bogus status message: msg_data finds no host.test. Sent from: '%s', data:'%s'\n", sender, msg); return; @@ -1449,6 +1473,12 @@ if (decide_alertstate(newcolor) == A_OK) { /* The test recovered. Clear the ack. */ log->acktime = 0; + log->maxackedcolor = 0; + } + + if (ackeachcolor && (log->maxackedcolor < newcolor)) { + /* Severity has increased above the one that was acked. Clear the current ack */ + log->acktime = 0; } if (log->acktime > now) { @@ -1457,6 +1487,7 @@ else { /* The acknowledge has expired. Clear the timestamp and the message buffer */ log->acktime = 0; + log->maxackedcolor = 0; if (log->ackmsg) { xfree(log->ackmsg); log->ackmsg = NULL; } } } @@ -1496,7 +1527,7 @@ * data collection, so it does not make sense to check it (thanks to Cade Robinson). * - some multi-homed hosts use a random IP for sending us data. */ - if ( (strcmp(log->sender, "xymond") != 0) && (strcmp(sender, "xymond") != 0) ) { + if ( (strcmp(log->sender, "xymond") != 0) && (strcmp(sender, "xymond") != 0) && (strcmp(sender, "0.0.0.0") != 0)) { if ((xmh_item(hinfo, XMH_FLAG_PULLDATA) == NULL) && (xmh_item(hinfo, XMH_FLAG_MULTIHOMED) == NULL)) { log_multisrc(log, sender); } @@ -1602,7 +1633,7 @@ } /* Get at the test flags. They are immediately after the color */ - p = msg_data(msg); + p = msg_data(msg, 0); p += strlen(colorname(newcolor)); if (strncmp(p, "