Skip to content
Snippets Groups Projects
Commit 76702b1f authored by Jan Philipp Timme's avatar Jan Philipp Timme
Browse files

Add support for cordoned status in checkbbb.py plugin

parent 7a85c992
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/python3
#
# This plugin is based on:
# checkbbb.py
# Frank Schiebel frank@linuxmuster.net
# GPL v3
#
# Adapted by the folks at Hochschule Hannover :-)
import os
import sys
......@@ -46,7 +47,7 @@ def generateCheckLine(bbb):
checkstate = 0
statusline = ""
if bbb["state"] == "enabled":
if bbb["state"] == "enabled" and bbb["status"] == "online":
statusline = str(checkstate) + " " + "BBB_" + bbb["hostname"] + " "
statusline += "numMeetings=" + bbb["meetings"] + "|"
statusline += "numAttendees=" + bbb["users"] + "|"
......@@ -55,6 +56,15 @@ def generateCheckLine(bbb):
statusline += "Att:" + bbb["users"] + " "
statusline += "Vid:" + bbb["videos"] + "]"
if bbb["state"] == "cordoned" and bbb["status"] == "online":
statusline = str(checkstate) + " " + "BBB_" + bbb["hostname"] + " "
statusline += "numMeetings=" + bbb["meetings"] + "|"
statusline += "numAttendees=" + bbb["users"] + "|"
statusline += "numWithVideo=" + bbb["videos"] + " "
statusline += "****CORDONED IN SCALELITE**** [" + bbb["hostname"] + " M:" + bbb["meetings"] + " "
statusline += "Att:" + bbb["users"] + " "
statusline += "Vid:" + bbb["videos"] + "]"
if bbb["state"] == "disabled" and bbb["status"] == "online":
statusline = str(checkstate) + " " + "BBB_" + bbb["hostname"] + " "
statusline += "numMeetings=" + bbb["meetings"] + "|"
......@@ -72,6 +82,14 @@ def generateCheckLine(bbb):
statusline += "numWithVideo=0 "
statusline += "****ENABLED BUT OFFLINE****"
if bbb["state"] == "cordoned" and bbb["status"] == "offline":
checkstate = 2
statusline = str(checkstate) + " " + "BBB_" + bbb["hostname"] + " "
statusline += "numMeetings=0|"
statusline += "numAttendees=0|"
statusline += "numWithVideo=0 "
statusline += "****CORDONED IN SCALELITE AND OFFLINE****"
if bbb["state"] == "disabled" and bbb["status"] == "offline":
checkstate = 1
statusline = str(checkstate) + " " + "BBB_" + bbb["hostname"] + " "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment