Module: check_mk
Branch: master
Commit: 0be1a3233404bf9856f0e053e8b6dbdfde92c503
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0be1a3233404bf…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Tue May 5 09:06:27 2015 +0200
#1245 FIX printer_output: Now correctly detect a bin with unknown as name
---
.werks/1245 | 10 ++++++++++
ChangeLog | 1 +
checks/printer_io.include | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/1245 b/.werks/1245
new file mode 100644
index 0000000..f37c7a1
--- /dev/null
+++ b/.werks/1245
@@ -0,0 +1,10 @@
+Title: printer_output: Now correctly detect a bin with unknown as name
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1430809514
+
+
diff --git a/ChangeLog b/ChangeLog
index 854b854..21913de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -353,6 +353,7 @@
* 2075 FIX: check_mk_agent: fixed formatting error for windows eventlog entries > 2048 characters...
* 2077 FIX: Windows MSI Installer: fixed automatical install of agent plugins...
* 1244 FIX: windows_tasks: Fixed handling of tasks manually stopped by admin...
+ * 1245 FIX: printer_output: Now correctly detect a bin with unknown as name
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
diff --git a/checks/printer_io.include b/checks/printer_io.include
index 79599f1..af349a6 100644
--- a/checks/printer_io.include
+++ b/checks/printer_io.include
@@ -84,7 +84,7 @@ def inventory_printer_io(info):
# When no name is set
# a) try to use the description
# b) try to use the type otherwise use the index
- if not name:
+ if name == "unknown" or not name:
name = descr and descr or index.split('.')[-1]
yield (name, {})
Module: check_mk
Branch: master
Commit: 5d525d729975ba93aeb07202ad5d844da685a98d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5d525d729975ba…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon May 4 18:09:03 2015 +0200
#2225 Restructured Event Console rules into packs
The Event Console now groups event rules into <i>Packs</i>. If you update
to the new version you will find all your existing rules to be contained in
the pack <i>Default rule pack</i>. The execution of the rules within a pack
is just as it was in the global list of rules before. But now you can have
several packs. The execution of the rules is done in the order of the packs
and within each pack in the order there. This helps you to keep on overview -
especially if you have a lot of rules.
But there are a couple of more advantages from the packs:
<ul>
<li>You can easily reorder packs as a whole</li>
<li>Packs can be disabled as a whole</li>
<li>Event simulation can show matching rules on the level of the packs</li>
<li>Rules can be moved from one pack to another</li>
<li>A new rule option in <i>Actions and Outcome</i> can be used to
have a rule skip all other rules in the same pack and continue with the
next one. That way
you can for example create a pack <i>Oracle</i>. As a first rule
you match for <tt>(?!ORA-)</tt> and set the rule type to
<i>Skip this rule pack</i>. That way if a message arrives that does
<i>not</i> contain <tt>ORA-</tt> all of the following rules in that
pack will <i>not</i> by tried out. This can make your configuration
easier and also will speed up the Event Console since the number
of rule tries is being reduced.</li>
</ul>
---
.werks/2225 | 34 ++
ChangeLog | 1 +
mkeventd/bin/mkeventd | 175 +++---
.../web/htdocs/images/button_mkeventd_rules_hi.png | Bin 0 -> 1685 bytes
.../web/htdocs/images/button_mkeventd_rules_lo.png | Bin 0 -> 2203 bytes
mkeventd/web/htdocs/images/icon_mkeventd_rules.png | Bin 0 -> 2203 bytes
mkeventd/web/htdocs/mkeventd.py | 1 +
mkeventd/web/plugins/wato/mkeventd.py | 596 +++++++++++++++-----
8 files changed, 607 insertions(+), 200 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=5d525d7299…
Module: check_mk
Branch: master
Commit: 529a09479d4a39ca3f5063685ff1674445e201fb
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=529a09479d4a39…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon May 4 11:10:13 2015 +0200
#2076 fortigate_cpu_base, fortigate_sessions_base: supports wider range of models
These two new checks aquire their data through the MIB FORTINET-FORTIGATE-MIB.
---
.werks/2076 | 9 ++++++
ChangeLog | 1 +
checks/fortigate_cpu_base | 60 ++++++++++++++++++++++++++++++++++++++++
checks/fortigate_sessions_base | 57 ++++++++++++++++++++++++++++++++++++++
4 files changed, 127 insertions(+)
diff --git a/.werks/2076 b/.werks/2076
new file mode 100644
index 0000000..a49895f
--- /dev/null
+++ b/.werks/2076
@@ -0,0 +1,9 @@
+Title: fortigate_cpu_base, fortigate_sessions_base: supports wider range of models
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1430730391
+Class: feature
+
+These two new checks aquire their data through the MIB FORTINET-FORTIGATE-MIB.
diff --git a/ChangeLog b/ChangeLog
index 3845898..bc69311 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -171,6 +171,7 @@
* 1242 enterasys_powersupply: It's now possible to choice which redundancy state treated as OK...
* 2214 icom_repeater: New set of checks for Icom repeaters...
* 2245 AIX-Agent: Added support for the uptime check
+ * 2076 fortigate_cpu_base, fortigate_sessions_base: supports wider range of models...
* 1457 FIX: logins: new check renamed from "users" check...
NOTE: Please refer to the migration notes!
* 1762 FIX: lnx_thermal: Now ignoring trip points with level 0...
diff --git a/checks/fortigate_cpu_base b/checks/fortigate_cpu_base
new file mode 100644
index 0000000..13301f3
--- /dev/null
+++ b/checks/fortigate_cpu_base
@@ -0,0 +1,60 @@
+#!/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.
+
+fortigate_cpu_base_default_levels = (80.0, 90.0)
+
+def inventory_fortigate_cpu_base(info):
+ return [(None, "fortigate_cpu_base_default_levels")]
+
+def check_fortigate_cpu_base(item, params, info):
+ num_cpus = 0
+ util = 0
+ for line in info:
+ util += int(line[0])
+ num_cpus += 1
+ if num_cpus == 0:
+ return
+
+ util = float(util) / num_cpus
+
+ state, infotext, perfdata = check_cpu_util(util, params)
+ infotext += " at %d CPUs" % num_cpus
+
+ return state, infotext, perfdata
+
+check_info["fortigate_cpu_base"] = {
+ "inventory_function" : inventory_fortigate_cpu_base,
+ "check_function" : check_fortigate_cpu_base,
+ "service_description" : "CPU utilization",
+ "has_perfdata" : True,
+ "group" : "cpu_utilization",
+ # uses mib FORTINET-FORTIGATE-MIB
+ "snmp_scan_function" : lambda oid: ".1.3.6.1.4.1.12356.101.1" in oid(".1.3.6.1.2.1.1.2.0") and\
+ oid(".1.3.6.1.4.1.12356.101.4.1.3.0"),
+ "snmp_info" : ( ".1.3.6.1.4.1.12356.101.4.1", [ 3 ]),
+ "include" : [ "cpu_util.include" ],
+}
+
diff --git a/checks/fortigate_sessions_base b/checks/fortigate_sessions_base
new file mode 100644
index 0000000..3786a5f
--- /dev/null
+++ b/checks/fortigate_sessions_base
@@ -0,0 +1,57 @@
+#!/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.
+
+fortigate_sessions_base_default_levels = (100000, 150000)
+
+def inventory_fortigate_sessions_base(info):
+ return [(None, "fortigate_sessions_base_default_levels")]
+
+def check_fortigate_sessions_base(item, params, info):
+ warn, crit = params
+ current = saveint(info[0][0])
+ state = 0
+ icon = ''
+ if current >= warn:
+ state = 1
+ icon = "(!)"
+ if current >= crit:
+ state = 2
+ icon = "(!!)"
+
+ perf = [("session", current, warn, crit)]
+ return state, "%d Session%s (levels at %d/%d)" % (current, icon, warn, crit), perf
+
+check_info["fortigate_sessions_base"] = {
+ "inventory_function" : inventory_fortigate_sessions_base,
+ "check_function" : check_fortigate_sessions_base,
+ "service_description" : "Sessions",
+ "has_perfdata" : True,
+ # uses mib FORTINET-FORTIGATE-MIB
+ "snmp_scan_function" : lambda oid: ".1.3.6.1.4.1.12356.101.1" in oid(".1.3.6.1.2.1.1.2.0") and\
+ oid(".1.3.6.1.4.1.12356.101.4.1.8.0"),
+ "snmp_info" : ( ".1.3.6.1.4.1.12356.101.4.1", [ 8 ]),
+}
+