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,29 @@
#!/usr/bin/env python3
import os
import sys
from comet_server import CometServer
def config():
cs = CometServer()
onlineCheck = cs.checkOnline()
print('graph_title Comet Uptime')
print('graph_args --base 1000 -l 0 ')
print('graph_category Comet')
print('online.label Online')
print('online.draw AREA')
print('online.min 0')
if onlineCheck == 1:
print('online.colour 58b154')
else:
print('online.colour cf4848')
def main():
cs = CometServer()
print("online.value " + str(cs.checkOnline()))
if __name__ == '__main__':
if len(sys.argv) > 1 and sys.argv[1] == 'config':
config()
else:
main()