Module: check_mk
Branch: master
Commit: df4e0a680d98640336166c43416a58c8e5a99a50
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=df4e0a680d9864…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Sep 9 14:09:49 2014 +0200
#1105 wmic_if.ps1: Powershell version of the wmic_if.bat script
The new script wmic_if.ps1 should deliver the same information like the
wmic_if.bat script, but more reliable. In Win2012 the wmic_if.bat script
is unable to determine the correct interface speed for teaming interfaces.
This script is able to do so.<br>
Note: Do not use both plugins at the same time
---
.werks/1105 | 13 +++++++++++++
ChangeLog | 1 +
agents/windows/plugins/wmic_if.ps1 | Bin 0 -> 3634 bytes
3 files changed, 14 insertions(+)
diff --git a/.werks/1105 b/.werks/1105
new file mode 100644
index 0000000..d9079d4
--- /dev/null
+++ b/.werks/1105
@@ -0,0 +1,13 @@
+Title: wmic_if.ps1: Powershell version of the wmic_if.bat script
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i6
+Date: 1410264432
+Class: feature
+
+The new script wmic_if.ps1 should deliver the same information like the
+wmic_if.bat script, but more reliable. In Win2012 the wmic_if.bat script
+is unable to determine the correct interface speed for teaming interfaces.
+This script is able to do so.<br>
+Note: Do not use both plugins at the same time
diff --git a/ChangeLog b/ChangeLog
index 4269915..5acbb4a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -49,6 +49,7 @@
* 1179 bluecat_dhcp: New Check for DHCP Service on bluecat adonis devices.
* 1180 bluecat_dns, bluecat_dns_queries: New DNS Checks for Bluecat Adonis.
* 1181 bluecat_ntp: New Check for NTP on bluecat adonis or proteus devices
+ * 1105 wmic_if.ps1: Powershell version of the wmic_if.bat script...
* 1051 FIX: tcp_conn_stats: fix missing performance data...
* 1142 FIX: winperf_ts_sessions: fix computation, check has never really worked
* 1090 FIX: zfsget: fixed exception which happened on incomplete zfs entries
diff --git a/agents/windows/plugins/wmic_if.ps1 b/agents/windows/plugins/wmic_if.ps1
new file mode 100644
index 0000000..9748b5a
Binary files /dev/null and b/agents/windows/plugins/wmic_if.ps1 differ
Module: check_mk
Branch: master
Commit: b330459a38cc27db21a926cb939bd2a9c060b2a1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b330459a38cc27…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Sep 9 13:59:53 2014 +0200
winperf_if: Improved matching of data from wmic_if.bat / wmic_if.ps1 scripts
---
.werks/1104 | 15 ++++++++++++++
ChangeLog | 1 +
checks/winperf_if | 60 ++++++++++++++++++++++++++++++++++++++++++-----------
3 files changed, 64 insertions(+), 12 deletions(-)
diff --git a/.werks/1104 b/.werks/1104
new file mode 100644
index 0000000..cb7dcea
--- /dev/null
+++ b/.werks/1104
@@ -0,0 +1,15 @@
+Title: winperf_if: Improved matching of data from wmic_if.bat / wmic_if.ps1 scripts
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i6
+Date: 1410263307
+Class: fix
+
+Interfaces reported by the wmic_if.bat, wmic_if.ps1 script were not
+entirely identical with the interface names reported by the windows
+performance counters.
+The matching algorhytm has been improved. Due to the better matching
+the interface checks will provide more output, like the mac address.
+
+Note: The new matching algorhythm should have no negative side effects for existing winperf_if checks
diff --git a/ChangeLog b/ChangeLog
index ca3a162..4269915 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -79,6 +79,7 @@
* 0651 FIX: f5_bigip_interfaces: Fix invalid throughput values, detect newer F5 devices...
* 1393 FIX: casa_cpu_temp, casa_cpu_util: Change service description to standard...
NOTE: Please refer to the migration notes!
+ * 1104 FIX: winperf_if: Improved matching of data from wmic_if.bat / wmic_if.ps1 scripts...
Multisite:
* 1066 Implemented Dashboard Designer...
diff --git a/checks/winperf_if b/checks/winperf_if
index b16ca5a..03438c8 100644
--- a/checks/winperf_if
+++ b/checks/winperf_if
@@ -77,7 +77,6 @@ def convert_winperf_if(info):
if counter:
for nr, value in enumerate(line[1:len(nic_names)+1]):
nics[nic_names[nr]][counter] = int(value)
-
# Not and integer: then this must be the line with the additional
# information from wmic (which is optional!)
else:
@@ -91,20 +90,58 @@ def convert_winperf_if(info):
nic_name += " " + str(conn_id)
except:
pass
+
+
+ def transform_name(name):
+ # Intel[R] PRO 1000 MT-Desktopadapter__3 (perf counter)
+ # Intel(R) PRO/1000 MT-Desktopadapter 3 (wmic name)
+ # Intel(R) PRO/1000 MT-Desktopadapter #3 (wmic InterfaceDescription)
+ mod_nic_name = name
+ for from_token, to_token in [ ("/", " "), ("(", "["), (")", "]"), ("#", " ") ]:
+ for n in nic_names:
+ if from_token in n:
+ # we do not modify it if this character is in any of the counter names
+ break
+ else:
+ mod_nic_name = mod_nic_name.replace(from_token, to_token).replace(" ", " ")
+ return mod_nic_name
+
+ found_match = False
+
+ # Exact match
+ if nic_name in nic_names:
+ found_match = True
+
# In the perf counters the nics have strange suffixes, e.g.
# Ethernetadapter der AMD-PCNET-Familie 2 - Paketplaner-Miniport, while
# in wmic it's only named "Ethernetadapter der AMD-PCNET-Familie 2".
- longest_match = 0
- if nic_name not in nic_names:
- for n in nic_names:
- if n.startswith(nic_name + " "):
- l = len(nic_name)
- if not (n[l:].strip()[0]).isdigit():
- nic_name = n
- break
+ if not found_match:
+ mod_nic_name = transform_name(nic_name)
+
+ if mod_nic_name not in nic_names:
+ for n in nic_names:
+ if n.startswith(mod_nic_name + " "):
+ l = len(mod_nic_name)
+ if not (n[l:].strip()[0]).isdigit():
+ nic_name = n
+ found_match = True
+ break
else:
- # Ignore interfaces that do not have counters
- continue
+ nic_name = mod_nic_name
+
+ # The last straw. Try to find this the name as exact match in other fields
+ if not found_match:
+ for entry in [ "NetConnectionID", "InterfaceDescription" ]:
+ if as_dict.get(entry):
+ mod_nic_name = transform_name(as_dict.get(entry))
+ if mod_nic_name in nic_names:
+ nic_name = mod_nic_name
+ found_match = True
+ break
+
+ if not found_match:
+ # Ignore interfaces that do not have counters
+ continue
nics[nic_name].update(as_dict)
except StopIteration:
@@ -113,7 +150,6 @@ def convert_winperf_if(info):
# Now convert the dicts into the format that is needed by if.include
converted = []
-
# Sort NIC names are create artifical index
nic_names = nics.keys()
nic_names.sort()
Module: check_mk
Branch: master
Commit: ba9b582fe3a82f23959b2f299be3edb8b259d45e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ba9b582fe3a82f…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Tue Sep 9 11:18:26 2014 +0200
#1180 bluecat_dns, bluecat_dns_queries: New DNS Checks for Bluecat Adonis.
---
.werks/1180 | 9 +++++++
ChangeLog | 1 +
checkman/bluecat_dns | 12 +++++++++
checkman/bluecat_dns_queries | 11 ++++++++
checks/bluecat_dhcp | 2 +-
checks/bluecat_dns | 60 ++++++++++++++++++++++++++++++++++++++++++
checks/bluecat_dns_queries | 54 +++++++++++++++++++++++++++++++++++++
7 files changed, 148 insertions(+), 1 deletion(-)
diff --git a/.werks/1180 b/.werks/1180
new file mode 100644
index 0000000..1860ced
--- /dev/null
+++ b/.werks/1180
@@ -0,0 +1,9 @@
+Title: bluecat_dns, bluecat_dns_queries: New DNS Checks for Bluecat Adonis.
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i6
+Date: 1410254263
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 39768ac..02cac0e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -47,6 +47,7 @@
NOTE: Please refer to the migration notes!
* 1178 arris_cmts_mem: New check for Memory usage on arris cmts modules.
* 1179 bluecat_dhcp: New Check for DHCP Service on bluecat adonis devices.
+ * 1180 bluecat_dns, bluecat_dns_queries: New DNS Checks for Bluecat Adonis.
* 1051 FIX: tcp_conn_stats: fix missing performance data...
* 1142 FIX: winperf_ts_sessions: fix computation, check has never really worked
* 1090 FIX: zfsget: fixed exception which happened on incomplete zfs entries
diff --git a/checkman/bluecat_dns b/checkman/bluecat_dns
new file mode 100644
index 0000000..020826d
--- /dev/null
+++ b/checkman/bluecat_dns
@@ -0,0 +1,12 @@
+title: Bluecat Adonis DNS State
+agents: snmp
+catalog: hw/network/bluecat
+license: GPL
+distribution: check_mk
+description:
+ This Check monitors the OperState of the DNS Service on bluecat adonis devices.
+ The Check will return {OK} if the Service is running, {CRITICAL} if the state is fault, {WARNING} in each other case.
+
+inventory:
+ One service will be created
+
diff --git a/checkman/bluecat_dns_queries b/checkman/bluecat_dns_queries
new file mode 100644
index 0000000..2d597a8
--- /dev/null
+++ b/checkman/bluecat_dns_queries
@@ -0,0 +1,11 @@
+title: Bluecat Adonis DNS Queries
+agents: snmp
+catalog: hw/network/bluecat
+license: GPL
+distribution: check_mk
+description:
+ This check currently only returns variables for information. The check will be extended in the future.
+
+inventory:
+ One service will be created
+
diff --git a/checks/bluecat_dhcp b/checks/bluecat_dhcp
index aeae782..d303219 100644
--- a/checks/bluecat_dhcp
+++ b/checks/bluecat_dhcp
@@ -53,7 +53,7 @@ check_info["bluecat_dhcp"] = {
"check_function" : check_bluecat_dhcp,
"inventory_function" : inventory_bluecat_dhcp,
"service_description" : "DHCP",
- "has_perfdata" : False,
+ "has_perfdata" : True,
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.13315.2.1",
"snmp_info" : (".1.3.6.1.4.1.13315.3.1.1.2.1", [
1, # dhcpOperState
diff --git a/checks/bluecat_dns b/checks/bluecat_dns
new file mode 100644
index 0000000..47c5479
--- /dev/null
+++ b/checks/bluecat_dns
@@ -0,0 +1,60 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 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.
+
+# Example output from agent:
+# Put here the example output from your TCP-Based agent. If the
+# check is SNMP-Based, then remove this section
+
+def inventory_bluecat_dns(info):
+ return [(None, None)]
+
+def check_bluecat_dns(item, _no_params, info):
+ oper_state = int(info[0][0])
+ oper_states = {
+ 1 : "running normally",
+ 2 : "not running",
+ 3 : "currently starting",
+ 4 : "currently stopping",
+ 5 : "fault"
+
+ }
+ state = 0
+ if oper_state in [ 2, 3, 4 ]:
+ state = 1
+ elif oper_state == 5:
+ state = 2
+ yield state, "DNS is %s" % oper_states[oper_state]
+
+check_info["bluecat_dns"] = {
+ "check_function" : check_bluecat_dns,
+ "inventory_function" : inventory_bluecat_dns,
+ "service_description" : "DNS",
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.13315.2.1",
+ "snmp_info" : (".1.3.6.1.4.1.13315.3.1.2.2.1", [
+ 1, # DnsSerOperState
+ ])
+}
+
diff --git a/checks/bluecat_dns_queries b/checks/bluecat_dns_queries
new file mode 100644
index 0000000..242b319
--- /dev/null
+++ b/checks/bluecat_dns_queries
@@ -0,0 +1,54 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 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.
+
+# Example output from agent:
+# Put here the example output from your TCP-Based agent. If the
+# check is SNMP-Based, then remove this section
+
+def inventory_bluecat_dns_queries(info):
+ return [(None, None)]
+
+def check_bluecat_dns_queries(item, _no_params, info):
+ value_names = [ 'Success', 'Referral', 'NXRSet',
+ 'NXDomain', 'Recursion', 'Failure' ]
+ for value, name in zip(info[0], value_names):
+ yield 0, "%s: %s" % (name, value), [ ( name, value )]
+
+check_info["bluecat_dns_queries"] = {
+ "check_function" : check_bluecat_dns_queries,
+ "inventory_function" : inventory_bluecat_dns_queries,
+ "service_description" : "DNS Queries",
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.13315.2.1",
+ "snmp_info" : (".1.3.6.1.4.1.13315.3.1.2.2.2.1", [
+ 1, # bcnDnsStatSrvQrySuccess
+ 2, # bcnDnsStatSrvQryReferral
+ 3, # bcnDnsStatSrvQryNXRRSet
+ 4, # bcnDnsStatSrvQryNXDomain
+ 5, # bcnDnsStatSrvQryRecursion
+ 6, # bcnDnsStatSrvQryFailure
+ ])
+}
+
Module: check_mk
Branch: master
Commit: 7cd44638e960bd15e1fdfabfb949881623f05507
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7cd44638e960bd…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Mon Sep 8 17:12:33 2014 +0200
#1179 bluecat_dhcp: New Check for DHCP Service on bluecat adonis devices.
---
.werks/1179 | 9 +++++++
ChangeLog | 5 ++--
checkman/bluecat_dhcp | 15 ++++++++++++
checks/bluecat_dhcp | 63 +++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 90 insertions(+), 2 deletions(-)
diff --git a/.werks/1179 b/.werks/1179
new file mode 100644
index 0000000..416cb39
--- /dev/null
+++ b/.werks/1179
@@ -0,0 +1,9 @@
+Title: bluecat_dhcp: New Check for DHCP Service on bluecat adonis devices.
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i6
+Date: 1410189124
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 71d9669..39768ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -43,9 +43,10 @@
* 1176 winperf_msx_queues: The list of counters for inventory can now be configured host based using wato
* 0656 brocade_fcport: inventory rule can now choose upon physical und operations states as well, state choices were also updated
* 1177 Hivemanger: New agent to check hivemanager devices
- * 1178 arris_cmts_mem: New check for Memory usage on arris cmts modules.
- * 1383 oracle_asm_diskgroup: Account for offline disks and required mirror free space
+ * 1383 oracle_asm_diskgroup: Account for offline disks and required mirror free space...
NOTE: Please refer to the migration notes!
+ * 1178 arris_cmts_mem: New check for Memory usage on arris cmts modules.
+ * 1179 bluecat_dhcp: New Check for DHCP Service on bluecat adonis devices.
* 1051 FIX: tcp_conn_stats: fix missing performance data...
* 1142 FIX: winperf_ts_sessions: fix computation, check has never really worked
* 1090 FIX: zfsget: fixed exception which happened on incomplete zfs entries
diff --git a/checkman/bluecat_dhcp b/checkman/bluecat_dhcp
new file mode 100644
index 0000000..13b5c52
--- /dev/null
+++ b/checkman/bluecat_dhcp
@@ -0,0 +1,15 @@
+title: Bluecat Adonis DHCP State
+agents: snmp
+catalog: hw/network/bluecat
+license: GPL
+distribution: check_mk
+description:
+ This Check monitors the OperState of the DHCP Service on bluecat adonis devices.
+ The Check will return {OK} if the Service is running, {CRITICAL} if the state is fault, {WARNING} in each other case.
+ The number of successful DHCP leases issued per second is return as information.
+
+inventory:
+ One service will be created
+
+perfdata:
+ One value is returned: The number of DHCP leases per second
diff --git a/checks/bluecat_dhcp b/checks/bluecat_dhcp
new file mode 100644
index 0000000..aeae782
--- /dev/null
+++ b/checks/bluecat_dhcp
@@ -0,0 +1,63 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 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.
+
+# Example output from agent:
+# Put here the example output from your TCP-Based agent. If the
+# check is SNMP-Based, then remove this section
+
+def inventory_bluecat_dhcp(info):
+ return [(None, None)]
+
+def check_bluecat_dhcp(item, _no_params, info):
+ oper_state, leases_sec = map(int, info[0])
+ oper_states = {
+ 1 : "running normally",
+ 2 : "not running",
+ 3 : "currently starting",
+ 4 : "currently stopping",
+ 5 : "fault"
+
+ }
+ state = 0
+ if oper_state in [ 2, 3, 4 ]:
+ state = 1
+ elif oper_state == 5:
+ state = 2
+ yield state, "DHCP is %s" % oper_states[oper_state]
+ yield 0, '%s Leases per second' % leases_sec, [ ('leases', leases_sec ) ]
+
+check_info["bluecat_dhcp"] = {
+ "check_function" : check_bluecat_dhcp,
+ "inventory_function" : inventory_bluecat_dhcp,
+ "service_description" : "DHCP",
+ "has_perfdata" : False,
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.13315.2.1",
+ "snmp_info" : (".1.3.6.1.4.1.13315.3.1.1.2.1", [
+ 1, # dhcpOperState
+ 3, # dhcpLeaseStatsSuccess
+ ])
+}
+
Module: check_mk
Branch: master
Commit: e55febf2b3f69af1c6975c04ebdf1c190f88f63c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e55febf2b3f69a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Sep 8 16:41:58 2014 +0200
Updated formatting of Werk 1103
---
.werks/1103 | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/.werks/1103 b/.werks/1103
index 032252a..0d45a7c 100644
--- a/.werks/1103
+++ b/.werks/1103
@@ -15,11 +15,12 @@ A new option <tt>nocontext</tt> has been introduced for the logfiles section in
F+:check_mk.ini
[logfiles]
-# The following textfile will not report any context info (nocontext option)
-textfile = nocontext C:\tmp\memo.udf
-# Set patterns for defined textfile
-warn = *overdue*
-ok = *mail sent*
+ # The following textfile will not report any context info (nocontext option)
+ textfile = nocontext C:\tmp\memo.udf
+
+ # Set patterns for defined textfile
+ warn = *overdue*
+ ok = *mail sent*
F-:
If you simply prepend the parameter <tt>nocontext</tt> to the actual path (or path pattern),