From 2850914a2e58d60a6066df472a01bb14bfe1fe46 Mon Sep 17 00:00:00 2001 From: Nicolas BOUTHORS Date: Mon, 15 Oct 2007 08:14:42 +0200 Subject: [PATCH] Initial version --- plugins/other/debsecan | 74 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100755 plugins/other/debsecan diff --git a/plugins/other/debsecan b/plugins/other/debsecan new file mode 100755 index 00000000..8572efcc --- /dev/null +++ b/plugins/other/debsecan @@ -0,0 +1,74 @@ +#!/bin/sh +# +# Plugin to monitor the number of CVE vulnerabilities present on a Debian +# system (using debsecan). Might work on other distib, who knows... +# +# Inspiration of the moment 10/10/2007 +# +# Nicolas BOUTHORS http://nbi.fr/ +# +# Licence : Public Domain +# +#%# family=auto +#%# capabilities=autoconf + +# Auto enable if we have debsecan only +if [ "$1" = "autoconf" ] ; then + if [ -x /usr/bin/debsecan ]; then + echo yes + else + echo no + fi + exit 0 +fi + +# Fail if we don't have debsecan +if [ ! -x /usr/bin/debsecan ]; then + exit 1 +fi + +if [ "$1" = "config" ] ; then + cat < /dev/null > /tmp/debsecan.munin.$$ +high=`grep -c '(high urgency)' /tmp/debsecan.munin.$$` +medium=`grep -c '(medium urgency)' /tmp/debsecan.munin.$$` +low=`grep -c '(low urgency)' /tmp/debsecan.munin.$$` +other=`grep -c -v -e '(low urgency)' -e '(medium urgency)' -e '(high urgency)' /tmp/debsecan.munin.$$` +cat <