summaryrefslogtreecommitdiffstats
path: root/Monitoring
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2011-07-14 00:53:46 +0200
committermakefu <github@syntax-fehler.de>2011-07-14 00:53:46 +0200
commit370f9b3156315102dd08eedfea147f4e57c5518b (patch)
treeef04bb874e877e89cebf0797c5ce3f3be887cf3a /Monitoring
parent2a3f45e9fb50d62d1538abccf66b427bdaec8598 (diff)
parent2534de34483a72e8aa73437e3497ae6900e328d0 (diff)
Merge branch 'master' of github.com:krebscode/painload
Diffstat (limited to 'Monitoring')
-rw-r--r--Monitoring/Makefile2
-rw-r--r--Monitoring/conf/hostgroups_nagios2.cfg31
-rw-r--r--Monitoring/conf/shack_guests.cfg4
-rwxr-xr-xMonitoring/plugins/check_temper4
4 files changed, 5 insertions, 36 deletions
diff --git a/Monitoring/Makefile b/Monitoring/Makefile
index e1fe7083..794f9262 100644
--- a/Monitoring/Makefile
+++ b/Monitoring/Makefile
@@ -20,4 +20,4 @@ debian:
chown nagios:www-data /var/lib/nagios3 || true
chown nagios:www-data /var/lib/nagios3/rw || true
chmod g+x /var/lib/nagios3 || true
- chmod ug=rwx /var/lib/nagios3/rw/nagios.cmd || true
+ chmod ugo=rwx /var/lib/nagios3/rw/nagios.cmd || true
diff --git a/Monitoring/conf/hostgroups_nagios2.cfg b/Monitoring/conf/hostgroups_nagios2.cfg
deleted file mode 100644
index 63acbf50..00000000
--- a/Monitoring/conf/hostgroups_nagios2.cfg
+++ /dev/null
@@ -1,31 +0,0 @@
-# Some generic hostgroup definitions
-
-# A simple wildcard hostgroup
-define hostgroup {
- hostgroup_name all
- alias All Servers
- members *
- }
-
-# A list of your Debian GNU/Linux servers
-define hostgroup {
- hostgroup_name debian-servers
- alias Debian GNU/Linux Servers
- members localhost
- }
-
-# A list of your web servers
-define hostgroup {
- hostgroup_name http-servers
- alias HTTP servers
- members localhost
- }
-
-# A list of your ssh-accessible servers
-define hostgroup {
- hostgroup_name ssh-servers
- alias SSH servers
- members localhost
- }
-
-
diff --git a/Monitoring/conf/shack_guests.cfg b/Monitoring/conf/shack_guests.cfg
index 5b46a297..5832725a 100644
--- a/Monitoring/conf/shack_guests.cfg
+++ b/Monitoring/conf/shack_guests.cfg
@@ -36,7 +36,7 @@ define host{
#_TINC_ADDRESS 10.7.7.6
address 10.7.7.6
_SPEED_URL http://leechi.kicks-ass.org/tmp/live/chinaman_bitcoinslc_live
- _TEMPER_URL http://leechi.kicks-ass.org/tmp/live/chinaman_bitcoinslc_live
+ _TEMPER_URL http://leechi.kicks-ass.org/tmp/live/chinaman_ati_temper
hostgroups bitcoin-miner,tinc-nodes,ssh-servers
contact_groups krebsminers
}
@@ -53,7 +53,7 @@ define service {
}
define command {
command_name check_temper
- command_line $USER1$/check_speed $_HOSTTEMPER_URL$ $ARG1$
+ command_line $USER1$/check_temper $_HOSTTEMPER_URL$ $ARG1$
}
define service {
host_name chinaman
diff --git a/Monitoring/plugins/check_temper b/Monitoring/plugins/check_temper
index f2e0fd32..95191026 100755
--- a/Monitoring/plugins/check_temper
+++ b/Monitoring/plugins/check_temper
@@ -16,12 +16,12 @@ try:
ret = urllib.urlopen(URL).read().split()
date = ret[0]
temps = [float(i) for i in ret[1:]]
- print ("** %s : %s" % (date,' '.join([str(i)+"°C" for i in temps])))
+ print ("** %s : %s" % (date,' '.join([str(i)+"°C" for i in temps])))
if len(temps) != len(thresholds):
raise Exception("Number of temps != number of given thresholds")
for i,temp in enumerate(temps):
if temp > thresholds[i]:
- print ("!! %.2f°C > %.2f°C (field %d)!" %(temp,thresholds[i],i))
+ print ("!! %.2f°°C > %.2f°C (field %d)!" %(temp,thresholds[i],i))
ecode=2
except Exception,e:
print("!! Something awful happened: "+str(e))