Module: check_mk
Branch: master
Commit: 41e70abde06ebc06bf71dd596dc595fcd9a0bf73
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=41e70abde06ebc…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jul 21 09:51:42 2015 +0200
A few minor fixes in bvip checks
---
checks/bvip_link | 4 ++++
checks/bvip_poe | 5 ++++-
checks/bvip_temp | 2 +-
checks/bvip_util | 6 +++++-
checks/bvip_video_alerts | 3 ++-
5 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/checks/bvip_link b/checks/bvip_link
index 3f11aaa..7a491e1 100644
--- a/checks/bvip_link
+++ b/checks/bvip_link
@@ -23,15 +23,19 @@
# License along with GNU Make; see the file COPYING. If not, write
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
+
+
factory_settings["bvip_link_default_levels"] = {
'ok_states' : [ 0, 4, 5],
'warn_states' : [7],
'crit_states' : [1, 2, 3],
}
+
def inventory_bvip_link(info):
return [(None, {})]
+
def check_bvip_link(_no_item, params, info):
count = 0
states = {
diff --git a/checks/bvip_poe b/checks/bvip_poe
index 31e803d..f798340 100644
--- a/checks/bvip_poe
+++ b/checks/bvip_poe
@@ -26,10 +26,12 @@
bvip_poe_default_levels = (50, 60)
+
def inventory_bvip_poe(info):
if info[0][0] != '0':
return [(None, 'bvip_poe_default_levels')]
+
def check_bvip_poe(_no_item, params, info):
warn, crit = params
watt = float(info[0][0]) / 10
@@ -39,7 +41,8 @@ def check_bvip_poe(_no_item, params, info):
state = 1
else:
state = 0
- return state, "Currently: %s watt" % watt, [ ('watt', watt )]
+ return state, "%.3f W" % watt, [ ('power', watt )]
+
check_info["bvip_poe"] = {
"check_function" : check_bvip_poe,
diff --git a/checks/bvip_temp b/checks/bvip_temp
index 31dd83c..53116ca 100644
--- a/checks/bvip_temp
+++ b/checks/bvip_temp
@@ -33,7 +33,7 @@ def inventory_bvip_temp(info):
def check_bvip_temp(item, params, info):
for nr, value in info:
if nr == item:
- degree_celsius = float(value)/10
+ degree_celsius = float(value) / 10
return check_temperature(degree_celsius, params)
check_info["bvip_temp"] = {
diff --git a/checks/bvip_util b/checks/bvip_util
index b198de9..57d8cdb 100644
--- a/checks/bvip_util
+++ b/checks/bvip_util
@@ -24,12 +24,15 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
+
bvip_util_default_levels = (90, 95)
+
def inventory_bvip_util(info):
for name in ["Total", "Coder", "VCA"]:
yield name, 'bvip_util_default_levels'
+
def check_bvip_util(item, params, info):
items = {
"Total" : 0,
@@ -41,10 +44,11 @@ def check_bvip_util(item, params, info):
usage = 100 - usage
return check_cpu_util(usage, params)
+
check_info["bvip_util"] = {
"check_function" : check_bvip_util,
"inventory_function" : inventory_bvip_util,
- "service_description" : "CPU util %s",
+ "service_description" : "CPU utilization %s",
"snmp_scan_function" : bvip_scan_function,
"snmp_info" : (".1.3.6.1.4.1.3967.1.1.9.1", [ 1,2,3
]),
"includes" : [ 'bvip.include',
'cpu_util.include' ],
diff --git a/checks/bvip_video_alerts b/checks/bvip_video_alerts
index 5b2ee12..2df8a12 100644
--- a/checks/bvip_video_alerts
+++ b/checks/bvip_video_alerts
@@ -27,7 +27,8 @@
def inventory_bvip_video_alerts(info):
for cam, alerts in info:
- yield cam.replace('\x00',""), None
+ yield cam.replace('\x00', ""), None
+
def check_bvip_video_alerts(item, _no_params, info):
for cam, alerts in info: