Module: check_mk
Branch: master
Commit: 0a1d390b48951208c5e813b3724bd953efec35a3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0a1d390b489512…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri Sep 11 12:15:49 2015 +0200
changed item description in juniper_{fru/temp}
---
checks/juniper_cpu | 2 +-
checks/juniper_fru | 11 +++++++----
checks/juniper_temp | 6 +++---
3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/checks/juniper_cpu b/checks/juniper_cpu
index 23649bb..9d237dc 100644
--- a/checks/juniper_cpu
+++ b/checks/juniper_cpu
@@ -60,7 +60,7 @@ def check_juniper_cpu(item, params, info):
( "util15", util15, warn, crit )]
- message = "%d%% 1min%s, %d%% 5min%s, %d%% 15min%s" % \
+ message = "%d%% 1 min%s, %d%% 5 min%s, %d%% 15 min%s" % \
( util1, label1, util5, label5, util15, label15 )
return state, message, perf
return 3, "Information not found in output"
diff --git a/checks/juniper_fru b/checks/juniper_fru
index 22abc03..1087862 100644
--- a/checks/juniper_fru
+++ b/checks/juniper_fru
@@ -89,8 +89,11 @@ def parse_juniper_fru(info):
for fru_name, fru_type, fru_state in info:
# jnxFruName is read-only, thus we can replace here
# some auto-generated declarations
- name = fru_name.replace("Power Supply: Power Supply ", "")
- name = name.replace("FAN: Fan ", "")
+ name = fru_name.replace("Power Supply: Power Supply ", "") \
+ .replace("FAN: Fan ", "") \
+ .replace("@ ", "") \
+ .replace("/*", "") \
+ .strip()
parsed[name] = {
"fru_type" : fru_type,
"fru_state" : fru_state,
@@ -125,7 +128,7 @@ check_info['juniper_fru'] = {
'parse_function' : parse_juniper_fru,
'inventory_function' : lambda info: inventory_juniper_fru(info,
"7"),
'check_function' : check_juniper_fru,
- 'service_description' : 'FRU PSU %s',
+ 'service_description' : 'Power Supply FRU %s',
'snmp_scan_function' : lambda oid:
oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.2636.1.1.1.2"),
'snmp_info' : (".1.3.6.1.4.1.2636.3.1.15.1", [
"5", # jnxFruName
@@ -147,6 +150,6 @@ check_info['juniper_fru'] = {
check_info['juniper_fru.fan'] = {
'inventory_function' : lambda info: inventory_juniper_fru(info,
"13"),
'check_function' : check_juniper_fru,
- 'service_description' : 'FRU Fan %s',
+ 'service_description' : 'Fan FRU %s',
}
diff --git a/checks/juniper_temp b/checks/juniper_temp
index 128d337..1ce8351 100644
--- a/checks/juniper_temp
+++ b/checks/juniper_temp
@@ -40,9 +40,9 @@ def parse_juniper_temp(info):
temperature = float(reading_str)
if temperature > 0:
description = description.replace(":", "") \
- .split("/")[0] \
- .replace("@ ", "") \
- .strip()
+ .replace("/*", "") \
+ .replace("@ ", "") \
+ .strip()
parsed[description] = temperature
return parsed