Module: check_mk
Branch: master
Commit: 650a8605f4591ff48fcefe071c4bddf9128ddbd0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=650a8605f4591f…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Tue Aug 4 13:50:01 2015 +0200
#2515 juniper_trpz_aps: check is now cluster-aware
Now this check is cluster-aware and has now performance data which show the number of
access points.
---
.werks/2515 | 9 +++++++++
ChangeLog | 1 +
checks/juniper_trpz_aps | 10 ++++++++--
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/.werks/2515 b/.werks/2515
new file mode 100644
index 0000000..8dce5b5
--- /dev/null
+++ b/.werks/2515
@@ -0,0 +1,9 @@
+Title: juniper_trpz_aps: check is now cluster-aware
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i3
+Date: 1438688827
+Class: feature
+
+Now this check is cluster-aware and has now performance data which show the number of
access points.
diff --git a/ChangeLog b/ChangeLog
index 933a479..1a98a5e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,7 @@
* 2292 kentix_amp_sensors: New check for the Kentix Alarmmanager Pro...
* 2413 esx_vsphere_counters: new check to monitor the disk throughput and latency for
ESX datastores
* 2513 new checks sentry_pdu_outlets sentry_pdu_systempower: monitor the system power
consumption and outlet states of sentry pdu devices which support the Sentry3-MIB
+ * 2515 juniper_trpz_aps: check is now cluster-aware...
* 2315 FIX: windows agent: BOM replacement, fixed incorrect byte offset...
* 2316 FIX: windows agent: fix garbled output of cached agent plugins...
* 2358 FIX: check_mk_agent.solaris: more correct computation of zfs used space...
diff --git a/checks/juniper_trpz_aps b/checks/juniper_trpz_aps
index 99cbe5c..0c07559 100644
--- a/checks/juniper_trpz_aps
+++ b/checks/juniper_trpz_aps
@@ -28,14 +28,20 @@ def inventory_juniper_trpz_aps(info):
return [ (None, None) ]
def check_juniper_trpz_aps(_no_item, _no_params, info):
- aps = info[0][0]
+ node, aps = info[0]
message = "%s access points online" % aps
- return 0, message
+
+ # Are we a cluster?
+ if node != None:
+ message = " (on %s)" % node
+
+ return 0, message, [ ('ap_devices_total', aps) ]
check_info["juniper_trpz_aps"] = {
"check_function" : check_juniper_trpz_aps,
"inventory_function" : inventory_juniper_trpz_aps,
"service_description" : "Access Points",
+ "node_info" : True,
"snmp_scan_function" : lambda oid:
oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.14525.3.1"),
"snmp_info" : (".1.3.6.1.4.1.14525.4.5.1.1",[
1, #number of Access Points