From 4fb836b037f322e6228c7bf3267660a87d94f48b Mon Sep 17 00:00:00 2001 From: Felix Richter Date: Thu, 30 Jun 2011 22:55:26 +0200 Subject: added script to check btc guild miner status seems to be working --- Monitoring/plugins/btcguild_miner_check | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 Monitoring/plugins/btcguild_miner_check (limited to 'Monitoring') diff --git a/Monitoring/plugins/btcguild_miner_check b/Monitoring/plugins/btcguild_miner_check new file mode 100755 index 00000000..aacdefc9 --- /dev/null +++ b/Monitoring/plugins/btcguild_miner_check @@ -0,0 +1,27 @@ +#!/usr/bin/python2 +import json,urllib,datetime,sys +if len(sys.argv) != 4 : + print "** Usage: %s APIKEY WORKER_NAME LOW_WORKER_SPEED" % sys.argv[0] + print "** aka YOU ARE MADE OF STUPID" + exit (3) + +API_KEY=sys.argv[1] +WORKER_NAME=sys.argv[2] +LOW_WORKER_SPEED=float(sys.argv[3]) +url="http://www.btcguild.com/api.php?api_key=%s" % API_KEY +try: + result = json.load(urllib.urlopen(url)) +except e: + print "?? cannot parse json or connect to server" + exit (1) + +for k,v in result["workers"].iteritems(): + if v["worker_name"] == WORKER_NAME: + curr = v["hash_rate"] + if curr < LOW_WORKER_SPEED: + print "!! %f is below expected %f" (curr,LOW_WORKER_SPEED) + exit (2) + else: + print "++ everything fine, current speed is %f" % curr + exit(0) + -- cgit v1.2.3 From d46ed6db771013c8609f335febd57c85b4653598 Mon Sep 17 00:00:00 2001 From: Felix Richter Date: Thu, 30 Jun 2011 23:04:35 +0200 Subject: renamed btcguild script, added command to Monitoring shack_guest now contains the command to check chinaman --- Monitoring/conf/shack_guests.cfg | 13 +++++++++++++ Monitoring/plugins/btcguild_miner_check | 27 --------------------------- Monitoring/plugins/check_btcguild_miner | 27 +++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 27 deletions(-) delete mode 100755 Monitoring/plugins/btcguild_miner_check create mode 100755 Monitoring/plugins/check_btcguild_miner (limited to 'Monitoring') diff --git a/Monitoring/conf/shack_guests.cfg b/Monitoring/conf/shack_guests.cfg index 45617461..79796541 100644 --- a/Monitoring/conf/shack_guests.cfg +++ b/Monitoring/conf/shack_guests.cfg @@ -26,6 +26,7 @@ define host{ hostgroups bitcoin-miner } +#Chinaman define host{ use generic-host host_name chinaman @@ -36,6 +37,18 @@ define host{ hostgroups bitcoin-miner,tinc-nodes,ssh-servers contact_groups krebsminers } +define service { + host_name chinaman + service_description BTCGUILD hash rate checker + use generic-service + check_command check_btcguild_miner!4bf1543d2eca8648277bdc66c326eea9!txgen_chinaman!600 + contact_groups krebsminers + } + +define command { + command_name check_btcguild_miner + command_line $USER1$/check_btcguild_miner $ARG1$ $ARG2$ $ARG3$ + } define host{ use generic-host diff --git a/Monitoring/plugins/btcguild_miner_check b/Monitoring/plugins/btcguild_miner_check deleted file mode 100755 index aacdefc9..00000000 --- a/Monitoring/plugins/btcguild_miner_check +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/python2 -import json,urllib,datetime,sys -if len(sys.argv) != 4 : - print "** Usage: %s APIKEY WORKER_NAME LOW_WORKER_SPEED" % sys.argv[0] - print "** aka YOU ARE MADE OF STUPID" - exit (3) - -API_KEY=sys.argv[1] -WORKER_NAME=sys.argv[2] -LOW_WORKER_SPEED=float(sys.argv[3]) -url="http://www.btcguild.com/api.php?api_key=%s" % API_KEY -try: - result = json.load(urllib.urlopen(url)) -except e: - print "?? cannot parse json or connect to server" - exit (1) - -for k,v in result["workers"].iteritems(): - if v["worker_name"] == WORKER_NAME: - curr = v["hash_rate"] - if curr < LOW_WORKER_SPEED: - print "!! %f is below expected %f" (curr,LOW_WORKER_SPEED) - exit (2) - else: - print "++ everything fine, current speed is %f" % curr - exit(0) - diff --git a/Monitoring/plugins/check_btcguild_miner b/Monitoring/plugins/check_btcguild_miner new file mode 100755 index 00000000..aacdefc9 --- /dev/null +++ b/Monitoring/plugins/check_btcguild_miner @@ -0,0 +1,27 @@ +#!/usr/bin/python2 +import json,urllib,datetime,sys +if len(sys.argv) != 4 : + print "** Usage: %s APIKEY WORKER_NAME LOW_WORKER_SPEED" % sys.argv[0] + print "** aka YOU ARE MADE OF STUPID" + exit (3) + +API_KEY=sys.argv[1] +WORKER_NAME=sys.argv[2] +LOW_WORKER_SPEED=float(sys.argv[3]) +url="http://www.btcguild.com/api.php?api_key=%s" % API_KEY +try: + result = json.load(urllib.urlopen(url)) +except e: + print "?? cannot parse json or connect to server" + exit (1) + +for k,v in result["workers"].iteritems(): + if v["worker_name"] == WORKER_NAME: + curr = v["hash_rate"] + if curr < LOW_WORKER_SPEED: + print "!! %f is below expected %f" (curr,LOW_WORKER_SPEED) + exit (2) + else: + print "++ everything fine, current speed is %f" % curr + exit(0) + -- cgit v1.2.3 From df942da80db39b86664c2df0af3e68cc2e881f14 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 30 Jun 2011 23:38:47 +0200 Subject: merged fixes from testing on monitoring.shack check_btcguild_miner: tries json and then simplejson to import, fixes try-except block --- Monitoring/plugins/check_btcguild_miner | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Monitoring') diff --git a/Monitoring/plugins/check_btcguild_miner b/Monitoring/plugins/check_btcguild_miner index aacdefc9..102e73da 100755 --- a/Monitoring/plugins/check_btcguild_miner +++ b/Monitoring/plugins/check_btcguild_miner @@ -1,5 +1,11 @@ -#!/usr/bin/python2 -import json,urllib,datetime,sys +#!/usr/bin/python +import urllib,sys +try: + import json + getattr(json,"load") +except: #deal with it + import simplejson as json + if len(sys.argv) != 4 : print "** Usage: %s APIKEY WORKER_NAME LOW_WORKER_SPEED" % sys.argv[0] print "** aka YOU ARE MADE OF STUPID" @@ -11,7 +17,7 @@ LOW_WORKER_SPEED=float(sys.argv[3]) url="http://www.btcguild.com/api.php?api_key=%s" % API_KEY try: result = json.load(urllib.urlopen(url)) -except e: +except: print "?? cannot parse json or connect to server" exit (1) -- cgit v1.2.3 From 19cdbb144e30221dfad61f7e4c4a34d6f9badeee Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 30 Jun 2011 23:40:53 +0200 Subject: updated Monitoring makefile checks for python and if not available installs both, python and simplejson for debian --- Monitoring/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Monitoring') diff --git a/Monitoring/Makefile b/Monitoring/Makefile index 72269101..fd75ef1b 100644 --- a/Monitoring/Makefile +++ b/Monitoring/Makefile @@ -4,6 +4,7 @@ HTDOCS = /usr/share/nagios3/htdocs .phony: debian debian: + [ `which python` ] || apt-get install python python-simplejson [ `which nagios3` ] || apt-get install nagios3 rm $(NAGDIR)/conf.d/* || true cp -r conf/* $(NAGDIR)/conf.d/ -- cgit v1.2.3 From 1c8e1568b2a56769c07a6ac9dab6fdcefce92b02 Mon Sep 17 00:00:00 2001 From: Felix Richter Date: Fri, 1 Jul 2011 10:49:52 +0200 Subject: check_btcguild_miner: added Exception evaluation --- Monitoring/plugins/check_btcguild_miner | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'Monitoring') diff --git a/Monitoring/plugins/check_btcguild_miner b/Monitoring/plugins/check_btcguild_miner index 102e73da..2e6a8de3 100755 --- a/Monitoring/plugins/check_btcguild_miner +++ b/Monitoring/plugins/check_btcguild_miner @@ -1,5 +1,7 @@ #!/usr/bin/python -import urllib,sys + +import sys +from urllib2 import urlopen try: import json getattr(json,"load") @@ -16,16 +18,17 @@ WORKER_NAME=sys.argv[2] LOW_WORKER_SPEED=float(sys.argv[3]) url="http://www.btcguild.com/api.php?api_key=%s" % API_KEY try: - result = json.load(urllib.urlopen(url)) -except: - print "?? cannot parse json or connect to server" + fh = urlopen(url) + result = json.load(fh) +except Exception,e: + print "?? cannot parse json or connect to server: %s"% str(e) exit (1) for k,v in result["workers"].iteritems(): if v["worker_name"] == WORKER_NAME: curr = v["hash_rate"] if curr < LOW_WORKER_SPEED: - print "!! %f is below expected %f" (curr,LOW_WORKER_SPEED) + print "!! %f is below expected %f" % (curr,LOW_WORKER_SPEED) exit (2) else: print "++ everything fine, current speed is %f" % curr -- cgit v1.2.3 From c8d1f034ebfcc24b8ea9028ff0bdf1b6ca593837 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 1 Jul 2011 22:26:02 +0200 Subject: tweaked alarm in chinaman btcguild --- Monitoring/conf/shack_guests.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Monitoring') diff --git a/Monitoring/conf/shack_guests.cfg b/Monitoring/conf/shack_guests.cfg index 79796541..faf9f833 100644 --- a/Monitoring/conf/shack_guests.cfg +++ b/Monitoring/conf/shack_guests.cfg @@ -41,7 +41,7 @@ define service { host_name chinaman service_description BTCGUILD hash rate checker use generic-service - check_command check_btcguild_miner!4bf1543d2eca8648277bdc66c326eea9!txgen_chinaman!600 + check_command check_btcguild_miner!4bf1543d2eca8648277bdc66c326eea9!txgen_chinaman!450 contact_groups krebsminers } -- cgit v1.2.3 From a45fbaf64a5bd63136f8b44176143dac98ce9e4e Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 1 Jul 2011 22:28:54 +0200 Subject: removed leechi from monitoring --- Monitoring/conf/tinc_hosts.cfg | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'Monitoring') diff --git a/Monitoring/conf/tinc_hosts.cfg b/Monitoring/conf/tinc_hosts.cfg index 4b1ad9ab..717c75a8 100644 --- a/Monitoring/conf/tinc_hosts.cfg +++ b/Monitoring/conf/tinc_hosts.cfg @@ -31,15 +31,3 @@ define host{ parents shack-gw hostgroups tinc-nodes,ssh-servers } -# -# Leechi -# -define host{ - use generic-host - host_name leechi - alias no_omo - address leechi.kicks-ass.org - _TINC_ADDRESS 10.7.7.111 - parents shack-gw - hostgroups tinc-nodes,ssh-servers,http-servers - } -- cgit v1.2.3 From b95750ea04456b5cac4cc8155482ce0e097c5596 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 1 Jul 2011 22:30:03 +0200 Subject: added git pull to monitoring makefile for convenience --- Monitoring/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Monitoring') diff --git a/Monitoring/Makefile b/Monitoring/Makefile index fd75ef1b..e1fe7083 100644 --- a/Monitoring/Makefile +++ b/Monitoring/Makefile @@ -4,6 +4,7 @@ HTDOCS = /usr/share/nagios3/htdocs .phony: debian debian: + git pull origin master [ `which python` ] || apt-get install python python-simplejson [ `which nagios3` ] || apt-get install nagios3 rm $(NAGDIR)/conf.d/* || true -- cgit v1.2.3 From d16d607d74d45aff1b4e6c277b9ad5224e3f639e Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 11 Jul 2011 18:46:07 +0200 Subject: Monitoring: added temper and speed files these scripts need to be consolidatet somehow, added TODO to check_speed scripts provide a way to monitor speed and temperature which is replied by a web-server. This web server collected the informations before of that and tidies up the output --- Monitoring/plugins/check_speed | 32 ++++++++++++++++++++++++++++++++ Monitoring/plugins/check_temper | 31 +++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100755 Monitoring/plugins/check_speed create mode 100755 Monitoring/plugins/check_temper (limited to 'Monitoring') diff --git a/Monitoring/plugins/check_speed b/Monitoring/plugins/check_speed new file mode 100755 index 00000000..8c2975cd --- /dev/null +++ b/Monitoring/plugins/check_speed @@ -0,0 +1,32 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +#TODO check_speed is nearly the same as check_temper, consolidate both scripts, probably by giving HIGH:LOW as params +import sys +import urllib + +if len(sys.argv) < 2 or '-h' in sys.argv: + print ("usage: %s URL [low-mhashes] ..." % sys.argv[0]) + print (" Server reply should look like this: '2011-07-11T09:00 400.0'") + exit(3) + +URL=sys.argv[1] +thresholds=[ float(i) for i in sys.argv[2:]] + +ecode=0 +try: + ret = urllib.urlopen(URL).read().split() + date = ret[0] + temps = [float(i) for i in ret[1:]] + 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 ("Warning: %.2f Mhash < %.2f Mhash ! (field %d)" %(temp,thresholds[i],i)) + ecode=2 +except Exception,e: + print("!! Something aweful happened: "+str(e)) + exit (1) +if not ecode: + print ("Success: Everything is fine!") +print ("Info: %s Current Mhash: %s" % (date,' '.join([str(i) for i in temps]))) +exit(ecode) diff --git a/Monitoring/plugins/check_temper b/Monitoring/plugins/check_temper new file mode 100755 index 00000000..dc006307 --- /dev/null +++ b/Monitoring/plugins/check_temper @@ -0,0 +1,31 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +import sys +import urllib + +if len(sys.argv) < 2 or '-h' in sys.argv: + print ("usage: %s URL [high-val field 1] [high field 2] ..." % sys.argv[0]) + print (" Server reply should look like this: '2011-07-11T09:00 50.0 40.0'") + exit(3) + +URL=sys.argv[1] +thresholds=[ float(i) for i in sys.argv[2:]] + +ecode=0 +try: + ret = urllib.urlopen(URL).read().split() + date = ret[0] + speeds = [float(i) for i in ret[1:]] + if len(speeds) != len(thresholds): + raise Exception("Number of speeds != number of given thresholds") + for i,speed in enumerate(speeds): + if speed > thresholds[i]: + print ("Warning: %f°C > %f°C (field %d)!" %(speed,thresholds[i],i)) + ecode=2 +except Exception,e: + print("!! Something aweful happened: "+str(e)) + exit (1) +if not ecode: + print ("Success: Everything is fine!") +print ("Info: %s Current speeds: %s" % (date,' '.join([str(i) for i in speeds]))) +exit(ecode) -- cgit v1.2.3 From 378cff3f7464714fb8784b86ead266ef744f0c14 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 11 Jul 2011 19:28:46 +0200 Subject: added config for nagios for speed/temp scripts plugins/*: fixed some usability issues, Warning -> !! , Info -> ** , Stupid -> ?? conf/shack_guests: contains config for miner --- Monitoring/conf/hostgroups_nagios2.cfg | 31 ++++++++++++++++++++++++++++++ Monitoring/conf/shack_guests.cfg | 35 +++++++++++++++++++++++++++++----- Monitoring/plugins/check_speed | 24 ++++++++++++----------- Monitoring/plugins/check_temper | 22 ++++++++++----------- 4 files changed, 85 insertions(+), 27 deletions(-) create mode 100644 Monitoring/conf/hostgroups_nagios2.cfg (limited to 'Monitoring') diff --git a/Monitoring/conf/hostgroups_nagios2.cfg b/Monitoring/conf/hostgroups_nagios2.cfg new file mode 100644 index 00000000..63acbf50 --- /dev/null +++ b/Monitoring/conf/hostgroups_nagios2.cfg @@ -0,0 +1,31 @@ +# 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 faf9f833..7a8cc088 100644 --- a/Monitoring/conf/shack_guests.cfg +++ b/Monitoring/conf/shack_guests.cfg @@ -34,21 +34,46 @@ define host{ alias Chinaman Bitcoin Mining Rig address 10.42.0.96 _TINC_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 hostgroups bitcoin-miner,tinc-nodes,ssh-servers contact_groups krebsminers } +define command { + command_name check_speed + command_line $USER1$/check_speed $_HOSTSPEED_URL$ $ARG1$ + } define service { host_name chinaman - service_description BTCGUILD hash rate checker + service_description Temperature Checker use generic-service - check_command check_btcguild_miner!4bf1543d2eca8648277bdc66c326eea9!txgen_chinaman!450 + check_command check_temper!85 85 65 45 contact_groups krebsminers } - define command { - command_name check_btcguild_miner - command_line $USER1$/check_btcguild_miner $ARG1$ $ARG2$ $ARG3$ + command_name check_temper + command_line $USER1$/check_speed $_HOSTTEMPER_URL$ $ARG1$ + } +define service { + host_name chinaman + service_description Mining Speed checker + use generic-service + check_command check_speed!600 + contact_groups krebsminers } +#define service { +# host_name chinaman +# service_description BTCGUILD hash rate checker +# use generic-service +# check_command check_btcguild_miner!4bf1543d2eca8648277bdc66c326eea9!txgen_chinaman!450 +# contact_groups krebsminers +# } + + +#define command { +# command_name check_btcguild_miner +# command_line $USER1$/check_btcguild_miner $ARG1$ $ARG2$ $ARG3$ +# } define host{ use generic-host diff --git a/Monitoring/plugins/check_speed b/Monitoring/plugins/check_speed index 8c2975cd..14a5b612 100755 --- a/Monitoring/plugins/check_speed +++ b/Monitoring/plugins/check_speed @@ -1,12 +1,12 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -#TODO check_speed is nearly the same as check_temper, consolidate both scripts, probably by giving HIGH:LOW as params +#TODO check_speed is nearly the same as check_speeder, consolidate both scripts, probably by giving HIGH:LOW as params import sys import urllib if len(sys.argv) < 2 or '-h' in sys.argv: - print ("usage: %s URL [low-mhashes] ..." % sys.argv[0]) - print (" Server reply should look like this: '2011-07-11T09:00 400.0'") + print ("?? usage: %s URL [low-mhashes] ..." % sys.argv[0]) + print ("?? Server reply should look like this: '2011-07-11T09:00 400.0'") exit(3) URL=sys.argv[1] @@ -16,17 +16,19 @@ ecode=0 try: ret = urllib.urlopen(URL).read().split() date = ret[0] - temps = [float(i) for i in ret[1:]] - 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 ("Warning: %.2f Mhash < %.2f Mhash ! (field %d)" %(temp,thresholds[i],i)) + speeds = [float(i) for i in ret[1:]] + print ("** %s : %s Mhashes" % (date,' '.join([str(i) for i in speeds]))) + if len(speeds) != len(thresholds): + raise Exception("!! Number of speeds != number of given thresholds") + for i,speed in enumerate(speeds): + if speed < thresholds[i]: + print ("!! %.2f Mhash < %.2f Mhash ! (field %d)" %(speed,thresholds[i],i)) ecode=2 except Exception,e: print("!! Something aweful happened: "+str(e)) exit (1) +#TODO return WARNING if date is too old if not ecode: - print ("Success: Everything is fine!") -print ("Info: %s Current Mhash: %s" % (date,' '.join([str(i) for i in temps]))) + print ("** Everything is fine!") + exit(ecode) diff --git a/Monitoring/plugins/check_temper b/Monitoring/plugins/check_temper index dc006307..f2e0fd32 100755 --- a/Monitoring/plugins/check_temper +++ b/Monitoring/plugins/check_temper @@ -4,8 +4,8 @@ import sys import urllib if len(sys.argv) < 2 or '-h' in sys.argv: - print ("usage: %s URL [high-val field 1] [high field 2] ..." % sys.argv[0]) - print (" Server reply should look like this: '2011-07-11T09:00 50.0 40.0'") + print ("?? usage: %s URL [high-val field 1] [high field 2] ..." % sys.argv[0]) + print ("?? Server reply should look like this: '2011-07-11T09:00 50.0 40.0'") exit(3) URL=sys.argv[1] @@ -15,17 +15,17 @@ ecode=0 try: ret = urllib.urlopen(URL).read().split() date = ret[0] - speeds = [float(i) for i in ret[1:]] - if len(speeds) != len(thresholds): - raise Exception("Number of speeds != number of given thresholds") - for i,speed in enumerate(speeds): - if speed > thresholds[i]: - print ("Warning: %f°C > %f°C (field %d)!" %(speed,thresholds[i],i)) + temps = [float(i) for i in ret[1:]] + 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)) ecode=2 except Exception,e: - print("!! Something aweful happened: "+str(e)) + print("!! Something awful happened: "+str(e)) exit (1) if not ecode: - print ("Success: Everything is fine!") -print ("Info: %s Current speeds: %s" % (date,' '.join([str(i) for i in speeds]))) + print ("** Everything is fine!") exit(ecode) -- cgit v1.2.3 From 60ca5a04cfb52632d35eb313448de34bf4dab36a Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 11 Jul 2011 17:32:41 +0000 Subject: Monitoring: deleted dupe config --- Monitoring/conf/hostgroups_nagios2.cfg | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 Monitoring/conf/hostgroups_nagios2.cfg (limited to 'Monitoring') 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 - } - - -- cgit v1.2.3 From 2534de34483a72e8aa73437e3497ae6900e328d0 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 11 Jul 2011 17:46:24 +0000 Subject: Monitoring: fixed buggy config,Makefile --- Monitoring/Makefile | 2 +- Monitoring/conf/shack_guests.cfg | 4 ++-- Monitoring/plugins/check_temper | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'Monitoring') 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/shack_guests.cfg b/Monitoring/conf/shack_guests.cfg index 7a8cc088..711eb79c 100644 --- a/Monitoring/conf/shack_guests.cfg +++ b/Monitoring/conf/shack_guests.cfg @@ -35,7 +35,7 @@ define host{ address 10.42.0.96 _TINC_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 } @@ -52,7 +52,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)) -- cgit v1.2.3 From 2a3f45e9fb50d62d1538abccf66b427bdaec8598 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 14 Jul 2011 00:52:52 +0200 Subject: renewed chinaman --- Monitoring/conf/shack_guests.cfg | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Monitoring') diff --git a/Monitoring/conf/shack_guests.cfg b/Monitoring/conf/shack_guests.cfg index 7a8cc088..5b46a297 100644 --- a/Monitoring/conf/shack_guests.cfg +++ b/Monitoring/conf/shack_guests.cfg @@ -30,10 +30,11 @@ define host{ define host{ use generic-host host_name chinaman - parents shack-serverswitch2 + parents shack-router alias Chinaman Bitcoin Mining Rig - address 10.42.0.96 - _TINC_ADDRESS 10.7.7.6 + #address 10.42.0.96 + #_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 hostgroups bitcoin-miner,tinc-nodes,ssh-servers -- cgit v1.2.3 From 6f683003c47c43c8842c071f81898c36ff348ce0 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 6 Aug 2011 00:25:26 +0200 Subject: Added Kachelmann for weathermonitoring --- Monitoring/htpasswd.users | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Monitoring/htpasswd.users (limited to 'Monitoring') diff --git a/Monitoring/htpasswd.users b/Monitoring/htpasswd.users new file mode 100644 index 00000000..7d4bbd6c --- /dev/null +++ b/Monitoring/htpasswd.users @@ -0,0 +1,2 @@ +nagiosadmin:wriRAagrgh5mk +shack:i8ZRZOQKu3mgw -- cgit v1.2.3 From b3db2c1df713fe570c1b1ccf303cdf9da0af0371 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 10 Aug 2011 21:58:38 +0200 Subject: Monitoring krebs.png: use CI --- Monitoring/htdocs/images/logos/krebs/krebs.png | Bin 323 -> 238 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'Monitoring') diff --git a/Monitoring/htdocs/images/logos/krebs/krebs.png b/Monitoring/htdocs/images/logos/krebs/krebs.png index 3d8a8ab8..3c40512c 100644 Binary files a/Monitoring/htdocs/images/logos/krebs/krebs.png and b/Monitoring/htdocs/images/logos/krebs/krebs.png differ -- cgit v1.2.3