Module: check_mk
Branch: master
Commit: f28c05e79187bfb4739b307801c31c3961629171
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f28c05e79187bf…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Apr 10 17:12:13 2013 +0200
Beautification of code in brightmail check
---
checks/sym_brightmail_queues | 75 ++++++++++++++++++++++--------------------
1 files changed, 39 insertions(+), 36 deletions(-)
diff --git a/checks/sym_brightmail_queues b/checks/sym_brightmail_queues
index b3ffe5f..ed11970 100644
--- a/checks/sym_brightmail_queues
+++ b/checks/sym_brightmail_queues
@@ -25,32 +25,33 @@
# Boston, MA 02110-1301 USA.
-#.1.3.6.1.4.1.393.200.130.2.1.2.1 = INTEGER: 1
-#.1.3.6.1.4.1.393.200.130.2.1.2.2 = INTEGER: 1
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.1.1 = INTEGER: 1
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.1.2 = INTEGER: 2
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.1.3 = INTEGER: 3
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.2.1 = STRING: "delivery"
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.2.2 = STRING: "inbound"
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.2.3 = STRING: "outbound"
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.3.1 = Gauge32: 0
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.3.2 = Gauge32: 1
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.3.3 = Gauge32: 0
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.4.1 = Gauge32: 0
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.4.2 = Gauge32: 0
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.4.3 = Gauge32: 0
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.5.1 = Gauge32: 4
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.5.2 = Gauge32: 0
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.5.3 = Gauge32: 0
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.6.1 = Gauge32: 0
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.6.2 = Gauge32: 0
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.6.3 = Gauge32: 0
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.7.1 = Gauge32: 0
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.7.2 = Gauge32: 0
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.7.3 = Gauge32: 0
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.8.1 = Gauge32: 5
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.8.2 = Gauge32: 0
-#.1.3.6.1.4.1.393.200.130.2.2.1.1.8.3 = Gauge32: 0
+# Example part from SNMP walk:
+# .1.3.6.1.4.1.393.200.130.2.1.2.1 = INTEGER: 1
+# .1.3.6.1.4.1.393.200.130.2.1.2.2 = INTEGER: 1
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.1.1 = INTEGER: 1
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.1.2 = INTEGER: 2
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.1.3 = INTEGER: 3
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.2.1 = STRING: "delivery"
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.2.2 = STRING: "inbound"
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.2.3 = STRING: "outbound"
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.3.1 = Gauge32: 0
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.3.2 = Gauge32: 1
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.3.3 = Gauge32: 0
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.4.1 = Gauge32: 0
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.4.2 = Gauge32: 0
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.4.3 = Gauge32: 0
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.5.1 = Gauge32: 4
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.5.2 = Gauge32: 0
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.5.3 = Gauge32: 0
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.6.1 = Gauge32: 0
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.6.2 = Gauge32: 0
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.6.3 = Gauge32: 0
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.7.1 = Gauge32: 0
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.7.2 = Gauge32: 0
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.7.3 = Gauge32: 0
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.8.1 = Gauge32: 5
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.8.2 = Gauge32: 0
+# .1.3.6.1.4.1.393.200.130.2.2.1.1.8.3 = Gauge32: 0
# Legacy default
#brightmail_message_levels = {}
@@ -104,14 +105,16 @@ check_info["sym_brightmail_queues"] = {
"inventory_function" : inventory_sym_brightmail_queues,
"service_description" : "Queue %s",
"has_perfdata" : False,
- "snmp_scan_function" : lambda oid: "el5_sms" in
oid(".1.3.6.1.2.1.1.1.0").lower() and
oid(".1.3.6.1.4.1.393.200.130.2.1.2.1"),
- "snmp_info" : (".1.3.6.1.4.1.393.200.130.2", [
- "2.1.1.2", # InstanceDescr
- "2.1.1.3", # Connections
- "2.1.1.4", # dataRate
- "2.1.1.5", # deferedMessages
- "2.1.1.6", # messageRate
- "2.1.1.7", # queueSize
- "2.1.1.8", # queuedMessages
- ])
+ "snmp_scan_function" : lambda oid: "el5_sms" in
oid(".1.3.6.1.2.1.1.1.0").lower() and \
+
oid(".1.3.6.1.4.1.393.200.130.2.1.2.1"),
+ "snmp_info" : (
+ ".1.3.6.1.4.1.393.200.130.2", [
+ "2.1.1.2", # InstanceDescr
+ "2.1.1.3", # Connections
+ "2.1.1.4", # dataRate
+ "2.1.1.5", # deferedMessages
+ "2.1.1.6", # messageRate
+ "2.1.1.7", # queueSize
+ "2.1.1.8", # queuedMessages
+ ]),
}