1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-25 10:28:36 +00:00

Added Comet Backup plugin

This commit is contained in:
jackson 2022-09-15 09:11:51 +12:00 committed by Kenyon Ralph
parent eb9d7fa2a1
commit 836ec47f1f
10 changed files with 448 additions and 0 deletions

View file

@ -0,0 +1,35 @@
#!/usr/bin/env python3
import os
import sys
from comet_server import CometServer
def config():
print('graph_title Comet Job Classification 24h')
print('graph_args --base 1000 -l 0 ')
print('graph_category Comet')
print('other.label Other')
print('other.draw AREASTACK')
print('other.min 0')
print('other.colour dcdcdc')
print('restore.label Restore')
print('restore.draw AREASTACK')
print('restore.min 0')
print('restore.colour a561d3')
print('backup.label Backup')
print('backup.draw AREASTACK')
print('backup.min 0')
print('backup.colour 4d98d7')
def main():
cs = CometServer()
classificationCount = cs.getJobsClassification()
print("backup.value " + str(classificationCount["Backup"]))
print("restore.value " + str(classificationCount["Restore"]))
print("other.value " + str(classificationCount["Other"]))
if __name__ == '__main__':
if len(sys.argv) > 1 and sys.argv[1] == 'config':
config()
else:
main()