Here is my nagios script for verifying that my regression tests are showing up on the server. Feel free to use it or modify it. Keep the copyright notice please.
$ cat /home/dan/bin/bacula-regress-check.sh #!/bin/sh # Copyright 2010 - Dan Langille <d...@langille.org> FETCH=/usr/bin/fetch RM=/bin/rm GREP=/usr/bin/grep EXPECTED_COUNT=14 URL="http://regress.bacula.org/index.php?project=bacula&date=" YYYY_MM_DD=`eval date -v-2d "+%Y-%m-%d"` ACTUAL_COUNT=`${FETCH} -qo - ${URL}${YYYY_MM_DD} | ${GREP} -c langille` if [ ${ACTUAL_COUNT} -eq ${EXPECTED_COUNT} ] then echo "Regression OK for ${YYYY_MM_DD}: Actual count = ${ACTUAL_COUNT}. Expected count = ${EXPECTED_COUNT}" EXIT=0 else echo "Missing data for ${YYYY_MM_DD}: Actual count = ${ACTUAL_COUNT}. Expected count = ${EXPECTED_COUNT}" EXIT=1 fi ${RM} -f ${TMPFILE} exit ${EXIT} This script is used by this entry in nrpe.cfg: command[check_bacula_regression_testing]=/home/dan/bin/bacula-regress-check.sh The output in nagios looks like this: Regression OK for 2010-11-14: Actual count = 14. Expected count = 14 -- Dan Langille - http://langille.org/ ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users