diff options
author | makefu <github@syntax-fehler.de> | 2011-07-14 00:53:46 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2011-07-14 00:53:46 +0200 |
commit | e00cdde8c6ca96bbcda02e082b891f262ad614bf (patch) | |
tree | 69a3bdb5d910ac10ee68fafa48643c35442a6d2c /Monitoring | |
parent | a3e7025c827664a1277b85cc482be67a82b6a6b0 (diff) | |
parent | 80493b71bbd6c43e60205bb50a3d1dd83b8bece2 (diff) |
Merge branch 'master' of github.com:krebscode/painload
Diffstat (limited to 'Monitoring')
-rw-r--r-- | Monitoring/Makefile | 2 | ||||
-rw-r--r-- | Monitoring/conf/hostgroups_nagios2.cfg | 31 | ||||
-rw-r--r-- | Monitoring/conf/shack_guests.cfg | 4 | ||||
-rwxr-xr-x | Monitoring/plugins/check_temper | 4 |
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)) |