Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
checkmk-formula
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
salt
checkmk-formula
Commits
7f5f53f1
Commit
7f5f53f1
authored
3 years ago
by
Jan Philipp Timme
Browse files
Options
Downloads
Patches
Plain Diff
Update checkbbb.py for scalelite 1.3
parent
52ccac37
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
checkmk/custom-files/plugins/checkbbb.py
+12
-5
12 additions, 5 deletions
checkmk/custom-files/plugins/checkbbb.py
with
12 additions
and
5 deletions
checkmk/custom-files/plugins/checkbbb.py
+
12
−
5
View file @
7f5f53f1
...
...
@@ -25,7 +25,7 @@ def getStatus():
fields
=
list
(
filter
(
None
,
fields
))
numfields
=
len
(
fields
)
if
numfields
==
7
:
if
numfields
==
8
:
hrfields
=
{}
fields
[
0
]
=
re
.
split
(
r
'
\.
'
,
fields
[
0
])[
0
]
hrfields
[
"
hostname
"
]
=
fields
[
0
]
...
...
@@ -35,6 +35,7 @@ def getStatus():
hrfields
[
"
users
"
]
=
fields
[
4
]
hrfields
[
"
largestmeeting
"
]
=
fields
[
5
]
hrfields
[
"
videos
"
]
=
fields
[
6
]
hrfields
[
"
load
"
]
=
fields
[
7
]
allservers
.
append
(
hrfields
)
return
allservers
...
...
@@ -43,6 +44,7 @@ def generateCheckLine(bbb):
global
totalMeetings
global
totalAttendees
global
totalVideousers
global
totalLoad
global
avgVideoPerMeeting
checkstate
=
0
statusline
=
""
...
...
@@ -54,7 +56,8 @@ def generateCheckLine(bbb):
statusline
+=
"
numWithVideo=
"
+
bbb
[
"
videos
"
]
+
"
"
statusline
+=
"
[
"
+
bbb
[
"
hostname
"
]
+
"
M:
"
+
bbb
[
"
meetings
"
]
+
"
"
statusline
+=
"
Att:
"
+
bbb
[
"
users
"
]
+
"
"
statusline
+=
"
Vid:
"
+
bbb
[
"
videos
"
]
+
"
]
"
statusline
+=
"
Vid:
"
+
bbb
[
"
videos
"
]
+
"
"
statusline
+=
"
Load:
"
+
bbb
[
"
load
"
]
+
"
]
"
if
bbb
[
"
state
"
]
==
"
cordoned
"
and
bbb
[
"
status
"
]
==
"
online
"
:
statusline
=
str
(
checkstate
)
+
"
"
+
"
BBB_
"
+
bbb
[
"
hostname
"
]
+
"
"
...
...
@@ -63,7 +66,8 @@ def generateCheckLine(bbb):
statusline
+=
"
numWithVideo=
"
+
bbb
[
"
videos
"
]
+
"
"
statusline
+=
"
****CORDONED IN SCALELITE**** [
"
+
bbb
[
"
hostname
"
]
+
"
M:
"
+
bbb
[
"
meetings
"
]
+
"
"
statusline
+=
"
Att:
"
+
bbb
[
"
users
"
]
+
"
"
statusline
+=
"
Vid:
"
+
bbb
[
"
videos
"
]
+
"
]
"
statusline
+=
"
Vid:
"
+
bbb
[
"
videos
"
]
+
"
"
statusline
+=
"
Load:
"
+
bbb
[
"
load
"
]
+
"
]
"
if
bbb
[
"
state
"
]
==
"
disabled
"
and
bbb
[
"
status
"
]
==
"
online
"
:
checkstate
=
1
...
...
@@ -73,7 +77,8 @@ def generateCheckLine(bbb):
statusline
+=
"
numWithVideo=
"
+
bbb
[
"
videos
"
]
+
"
"
statusline
+=
"
****DISABLED IN SCALELITE**** [
"
+
bbb
[
"
hostname
"
]
+
"
M:
"
+
bbb
[
"
meetings
"
]
+
"
"
statusline
+=
"
Att:
"
+
bbb
[
"
users
"
]
+
"
"
statusline
+=
"
Vid:
"
+
bbb
[
"
videos
"
]
+
"
]
"
statusline
+=
"
Vid:
"
+
bbb
[
"
videos
"
]
+
"
"
statusline
+=
"
Load:
"
+
bbb
[
"
load
"
]
+
"
]
"
if
bbb
[
"
state
"
]
==
"
enabled
"
and
bbb
[
"
status
"
]
==
"
offline
"
:
checkstate
=
2
...
...
@@ -102,6 +107,7 @@ def generateCheckLine(bbb):
totalMeetings
+=
int
(
bbb
[
"
meetings
"
])
totalAttendees
+=
int
(
bbb
[
"
users
"
])
totalVideousers
+=
int
(
bbb
[
"
videos
"
])
totalLoad
+=
float
(
bbb
[
"
load
"
])
return
statusline
...
...
@@ -111,7 +117,7 @@ def generateCheckLine(bbb):
totalMeetings
=
0
totalAttendees
=
0
totalVideousers
=
0
totalLoad
=
0.0
allservers
=
getStatus
()
for
bbb
in
allservers
:
...
...
@@ -126,6 +132,7 @@ statusline += "[scale001 totals "
statusline
+=
"
M:
"
+
str
(
totalMeetings
)
+
"
"
statusline
+=
"
Att:
"
+
str
(
totalAttendees
)
+
"
"
statusline
+=
"
Vid:
"
+
str
(
totalVideousers
)
+
"
]
"
statusline
+=
"
Load:
"
+
str
(
totalLoad
)
+
"
]
"
print
(
statusline
)
overalltext
=
"
0 BBB_Overall_Attendees count=
"
+
str
(
totalAttendees
)
+
"
;200;500
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment