Module: check_mk
Branch: master
Commit: a39a07103cf8c99ea25b60d437a66fa07fa00c2a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a39a07103cf8c9…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Wed Jun 10 17:37:53 2015 +0200
#2220 pfsense_counter: New check to monitor several global packet rates on pfSense
firewalls
---
.werks/2220 | 9 +++++++++
ChangeLog | 1 +
checkman/pfsense_counter | 16 ++++++++++++++++
checks/pfsense_counter | 9 ++++++++-
4 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/.werks/2220 b/.werks/2220
new file mode 100644
index 0000000..0221874
--- /dev/null
+++ b/.werks/2220
@@ -0,0 +1,9 @@
+Title: pfsense_counter: New check to monitor several global packet rates on pfSense
firewalls
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i2
+Date: 1433950616
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 013c790..4eed7ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,7 @@
* 1255 AIX Agent now supports fileinfo. Thanks to Falk Grunert (IBM)
* 2308 agent_vsphere, esx_vsphere_sensors: now reports additional sensor information
(cpu, storage controller, memory)...
* 2327 mbg_lantime_ng_state, mbg_lantime_state: change default parameters to 2/3 for
stratum, 10/20us for offset
+ * 2220 pfsense_counter: New check to monitor several global packet rates on pfSense
firewalls
* 2323 FIX: df: Fix new graphs for all filesystem checks in case of existing inode
information
* 2305 FIX: agent_vsphere, esx_vsphere_sensors: now able to handle sensor names with
semicolon...
* 2118 FIX: aix_sap_processlist: agent plugin now is more general to deal with
various AIX versions...
diff --git a/checkman/pfsense_counter b/checkman/pfsense_counter
new file mode 100644
index 0000000..406effd
--- /dev/null
+++ b/checkman/pfsense_counter
@@ -0,0 +1,16 @@
+title: pfSense Counter
+agents: snmp
+catalog: app/pfsense
+license: GPL
+distribution: check_mk
+description:
+ This check monitors various global packet rates of pfSense firewalls.
+ Currently supported: Packets that matched a rule, packets with bad offset,
+ fragmented packets, short packets, normalized packets and
+ packets dropped due to memory limitations.
+
+inventory:
+ One service per pfSense device will be created.
+
+perfdata:
+ The packet rates and, if enabled, their moving average.
diff --git a/checks/pfsense_counter b/checks/pfsense_counter
index 6928ee0..39307a4 100644
--- a/checks/pfsense_counter
+++ b/checks/pfsense_counter
@@ -24,6 +24,12 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
+factory_settings["pfsense_counter_default_levels"] = {
+ "badoffset" : (0.1, 10.0),
+ "short" : (0.1, 10.0),
+ "memdrop" : (0.001, 10.0),
+}
+
def parse_pfsense_counter(info):
names = {
"1.0" : "matched",
@@ -99,10 +105,11 @@ def check_pfsense_counter(_no_item, params, parsed):
check_info["pfsense_counter"] = {
+ "default_levels_variable" : "pfsense_counter_default_levels",
"parse_function" : parse_pfsense_counter,
"inventory_function" : inventory_pfsense_counter,
"check_function" : check_pfsense_counter,
- "service_description" : "Packets",
+ "service_description" : "pfSense Firewall Packet Rates",
"has_perfdata" : True,
"snmp_info" : (".1.3.6.1.4.1.12325.1.200.1", [
OID_END, 2 ] ),
"snmp_scan_function" : lambda oid: "pfsense" in
oid(".1.3.6.1.2.1.1.1.0").lower(),