Module: check_mk
Branch: master
Commit: c10d00f064aedcc0c2195d9ec680d2e7abf8c55a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c10d00f064aedc…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Dec 10 10:09:34 2015 +0100
#2809 netscaler_vserver: now reports health_perc as performance data
---
.werks/2809 | 9 +++++++++
ChangeLog | 1 +
checks/netscaler_vserver | 3 ++-
web/plugins/metrics/check_mk.py | 12 ++++++++++++
4 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/.werks/2809 b/.werks/2809
new file mode 100644
index 0000000..a38e8da
--- /dev/null
+++ b/.werks/2809
@@ -0,0 +1,9 @@
+Title: netscaler_vserver: now reports health_perc as performance data
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1449738535
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index d52e000..9c34e85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -61,6 +61,7 @@
* 1315 check_mk_agent.linux: The ps section of the agent now supports long
usernames...
* 2869 ibm_storage_ts, ibm_storage_ts.drive, ibm_storage_ts_library,
ibm_storage_ts.status: new checks for IBM TS3100 Tape Library
* 1316 mysql_slave: Levels can now be configured with WATO
+ * 2809 netscaler_vserver: now reports health_perc as performance data
* 2660 FIX: fixed windows agent using the wrong working directory...
* 2664 FIX: ps: Speedup in situation with many matching processes...
* 2661 FIX: windows agent: fixed incomplete process list...
diff --git a/checks/netscaler_vserver b/checks/netscaler_vserver
index b2f55ff..1f8ea7c 100644
--- a/checks/netscaler_vserver
+++ b/checks/netscaler_vserver
@@ -99,7 +99,7 @@ def check_netscaler_vserver(item, _no_params, info):
health_state = 2
elif health_perc < 100:
health_state = 1
- yield health_state, "Health at: %s%%" % health_perc
+ yield health_state, "Health at: %s%%" % health_perc,
[("health_perc", health_perc, None, None, 0, 100)]
yield 0, "Type: %s" %
netscaler_vserver_entitytypes.get(svr_entitytype , "unknown")
yield 0, "Protocol: %s" % netscaler_vserver_types.get(svr_type,
"serviceUnknown")
@@ -118,5 +118,6 @@ check_info["netscaler_vserver"] = {
62, # vsvrHealth
64, # vsvrEntityType
]),
+ "has_perfdata" : True,
"snmp_scan_function" : lambda oid:
oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.5951.1"),
}
diff --git a/web/plugins/metrics/check_mk.py b/web/plugins/metrics/check_mk.py
index fd82a25..ac366b3 100644
--- a/web/plugins/metrics/check_mk.py
+++ b/web/plugins/metrics/check_mk.py
@@ -932,6 +932,12 @@ metric_info["deviation_airflow"] = {
"color" : "#60f020",
}
+metric_info["health_perc"] = {
+ "title" : _("Health"),
+ "unit" : "%",
+ "color" : "#ff6234",
+}
+
# TODO: user -> cpu_util_user
metric_info["user"] = {
"title" : _("User"),
@@ -4224,6 +4230,12 @@ perfometer_info.append({
perfometer_info.append({
"type" : "linear",
+ "segments" : [ "health_perc" ],
+ "total" : 100,
+})
+
+perfometer_info.append({
+ "type" : "linear",
"segments" : [ "deviation_calibration_point" ],
"total" : 10,
})