Projet

Général

Profil

Paste
Télécharger au format
Statistiques
| Branche: | Révision:

root / plugins / environmental / alertme_keyfobsathome @ 9791e321

Historique | Voir | Annoter | Télécharger (855 octets)

1
#!/bin/sh
2
# http://exchange.munin-monitoring.org/plugins/alertme_power/details
3
#
4
# alertme_power relies on http://code.google.com/p/alertmepi/
5
# to have been installed and working
6
#
7
# 20110120 - update to use correct mixed case for AlertMe and remove cruft 
8
# left over from creating this plugin from another script
9
#
10
# add to the plugins-conf.d/munin so that it can read the /etc/alertme files
11
# [alertme_*]
12
#	user root
13

    
14

    
15
if [ "$1" = "config" ] ; then
16
	echo "graph_title AlertMe Keyfobs At Home"
17
	echo "graph_category environmental"
18
	echo "graph_info this graph shows AlertMe Keyfob present count"
19
	echo "graph_vlabel number"
20
	echo "KeyfobsAtHome.label number of keyfobs present"
21
	exit
22
fi
23

    
24

    
25
echo -n "KeyfobsAtHome.value "
26
KFC=`/usr/local/bin/alertmepi.pl -k | wc -l`
27

    
28
if [ $? -eq 0 ] ; then
29
 	echo $KFC 
30
else
31
	echo U
32
fi
33

    
34
# end alertme_power munin_plugin