1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-24 09:57:09 +00:00

Category Tree: Reduce number of categories

zope -> appserver
This commit is contained in:
dipohl 2017-02-22 20:13:18 +01:00
parent f523f095f9
commit 68bb709de6
6 changed files with 3 additions and 3 deletions

41
plugins/zope/zope_db_activity Executable file
View file

@ -0,0 +1,41 @@
#!/usr/bin/python
from sys import argv
import httplib
conns = []
# this should really go in plugins.conf
conns.append(httplib.HTTPConnection("localhost",8080))
conns.append(httplib.HTTPConnection("localhost",8070))
url = "/munin_db_activity.py"
if len(argv) > 1 and argv[1] == 'config':
print """graph_title Zope Database Activity
graph_vlabel Count / 5 min.
graph_category appserver
graph_info The number of Reads, Stores, and Connections that happens in the ZODB backend. The data comes from the same source as that in the "Recent Database Activity" tab in the zope control panel.""".replace("\n ","\n")
for i in range(0,len(conns)):
print """load_count%(i)s.label Z%(i)s Loads
store_count%(i)s.label Z%(i)s Stores
connections%(i)s.label Z%(i)s Connections""".replace("\n ","\n") % dict(i=i)
else:
for i in range(0,len(conns)):
conns[i].request("GET", url)
r1 = conns[i].getresponse()
#print r1.status, r1.reason
#200 OK
data = r1.read().strip()
conns[i].close()
(total_load_count, total_store_count, total_connections) = data.split()
id = dict(i=i)
print 'load_count%(i)s.value' % id, total_load_count
print 'store_count%(i)s.value'% id, total_store_count
print 'connections%(i)s.value'% id, total_connections