From cc2567512e028a7772a65f2f8af524ebedd67907 Mon Sep 17 00:00:00 2001 From: Paul M Date: Fri, 18 Feb 2011 16:40:34 +0100 Subject: [PATCH] Initial version --- plugins/other/alertme_keyfobsathome | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 plugins/other/alertme_keyfobsathome diff --git a/plugins/other/alertme_keyfobsathome b/plugins/other/alertme_keyfobsathome new file mode 100755 index 00000000..b1ff6a02 --- /dev/null +++ b/plugins/other/alertme_keyfobsathome @@ -0,0 +1,34 @@ +#!/bin/sh +# http://exchange.munin-monitoring.org/plugins/alertme_power/details +# +# alertme_power relies on http://code.google.com/p/alertmepi/ +# to have been installed and working +# +# 20110120 - update to use correct mixed case for AlertMe and remove cruft +# left over from creating this plugin from another script +# +# add to the plugins-conf.d/munin so that it can read the /etc/alertme files +# [alertme_*] +# user root + + +if [ "$1" = "config" ] ; then + echo "graph_title AlertMe Keyfobs At Home" + echo "graph_category environmental" + echo "graph_info this graph shows AlertMe Keyfob present count" + echo "graph_vlabel number" + echo "KeyfobsAtHome.label number of keyfobs present" + exit +fi + + +echo -n "KeyfobsAtHome.value " +KFC=`/usr/local/bin/alertmepi.pl -k | wc -l` + +if [ $? -eq 0 ] ; then + echo $KFC +else + echo U +fi + +# end alertme_power munin_plugin