Module: check_mk
Branch: master
Commit: 8a9c5c0d976f374e1da279e267e73a6d44076258
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8a9c5c0d976f37…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Feb 19 11:19:11 2015 +0100
Conflicts:
ChangeLog
checks/checkpoint_connections
checks/checkpoint_packets
---
.werks/1997 | 10 ++++++++++
ChangeLog | 1 +
checks/checkpoint.include | 36 ++++++++++++++++++++++++++++++++++++
checks/checkpoint_connections | 7 ++-----
checks/checkpoint_packets | 7 ++-----
5 files changed, 51 insertions(+), 10 deletions(-)
diff --git a/.werks/1997 b/.werks/1997
new file mode 100644
index 0000000..4f5560b
--- /dev/null
+++ b/.werks/1997
@@ -0,0 +1,10 @@
+Title: checkpoint_connections, checkpoint_packets: Detect more recent devices
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1424341014
+
+
diff --git a/ChangeLog b/ChangeLog
index e9ec13e..1b0ab01 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -162,6 +162,7 @@
* 1993 FIX: solaris_multipath: Fix detection of expected number of paths
* 1944 FIX: hr_mem: no longer reports incorrect memory values when cached memory
values are broken...
* 1994 FIX: lparstat: Support new AIX version with two new columns nsp and utctc
+ * 1997 FIX: checkpoint_connections, checkpoint_packets: Detect more recent devices
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request,
added mailto link for error report...
diff --git a/checks/checkpoint.include b/checks/checkpoint.include
new file mode 100644
index 0000000..6fd1e6e
--- /dev/null
+++ b/checks/checkpoint.include
@@ -0,0 +1,36 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2014 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at
http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# 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.
+
+
+def scan_checkpoint(oid):
+ return (
+ # Entry in sysDescr, varies a bit
+ oid(".1.3.6.1.2.1.1.1.0").split("
")[2].endswith("cp") or
+ oid(".1.3.6.1.2.1.1.1.0").startswith("IPSO ") or
+ (oid(".1.3.6.1.2.1.1.1.0").startswith("Linux") and
"cpx" in
+ oid(".1.3.6.1.2.1.1.1.0"))) \
+ and \
+
oid(".1.3.6.1.4.1.2620.1.1.21.0").lower().startswith('firewall')
diff --git a/checks/checkpoint_connections b/checks/checkpoint_connections
index 3aa8ae1..a010013 100644
--- a/checks/checkpoint_connections
+++ b/checks/checkpoint_connections
@@ -54,11 +54,8 @@ check_info["checkpoint_connections"] = {
"service_description" : "Connections",
"has_perfdata" : True,
"group" : "checkpoint_connections",
- # detect a checkpoint kernel
- "snmp_scan_function" : lambda oid:
(oid(".1.3.6.1.2.1.1.1.0").split(" ")[2].endswith("cp") or
\
- "IPSO" in
oid(".1.3.6.1.2.1.1.1.0")) \
- and
oid(".1.3.6.1.4.1.2620.1.1.21.0").lower().startswith('firewall'),
- # checkpoint.products.fw.fwPolicyStat.fwNumConn
+ "snmp_scan_function" : scan_checkpoint,
"snmp_info" : ( ".1.3.6.1.4.1.2620.1.1.25", [ 3 ]),
+ "includes" : [ "checkpoint.include" ],
}
diff --git a/checks/checkpoint_packets b/checks/checkpoint_packets
index 1578ed6..73e9dad 100644
--- a/checks/checkpoint_packets
+++ b/checks/checkpoint_packets
@@ -70,17 +70,14 @@ check_info["checkpoint_packets"] = {
"service_description" : "Packet Statistics",
"has_perfdata" : True,
"group" : "checkpoint_packets",
+ "snmp_scan_function" : scan_checkpoint,
"default_levels_variable" : "checkpoint_packets_default_levels",
- # detect a checkpoint kernel
- "snmp_scan_function" : lambda oid:
(oid(".1.3.6.1.2.1.1.1.0").split(" ")[2].endswith("cp") or\
- "IPSO" in
oid(".1.3.6.1.2.1.1.1.0")) \
- and
oid(".1.3.6.1.4.1.2620.1.1.21.0").lower().startswith('firewall'),
- # checkpoint.products.fw.fwPolicyStat.fwNumConn
"snmp_info" : ( ".1.3.6.1.4.1.2620.1.1",
[ 4, # fwAccepted
5, # fwRejected
6, # fwDropped
7, # fwLogged
]),
+ "includes" : [ "checkpoint.include" ],
}