Module: check_mk
Branch: master
Commit: 787aeee6e0ec80dff2b38af2f91782a269b1f29c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=787aeee6e0ec80…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Feb 24 15:55:59 2016 +0100
Edited a few bug reports
---
.bugs/2422 | 10 ++++++++++
.bugs/858 | 8 +++++---
.bugs/859 | 7 ++++---
.bugs/860 | 5 +++--
.bugs/861 | 13 +++++++++----
5 files changed, 31 insertions(+), 12 deletions(-)
diff --git a/.bugs/2422 b/.bugs/2422
new file mode 100644
index 0000000..e2c168f
--- /dev/null
+++ b/.bugs/2422
@@ -0,0 +1,10 @@
+Title: Discovery failed: No such file or directory: '/omd/sites/heute/var/check_mk/persisted/heute'
+Component: core
+State: open
+Date: 2016-02-24 15:51:18
+Targetversion: 1.2.8
+Class: bug
+
+Discovery failed: Exception in check plugin '3ware_disks': [Errno 2] No such file or directory: '/omd/sites/heute/var/check_mk/persisted/heute'
+Reason unknown. The site was freshly started after a reboot of the system.
+Maybe this was a race condition due to an empty tmpfs.
diff --git a/.bugs/858 b/.bugs/858
index 01ef58a..cd2a2fd 100644
--- a/.bugs/858
+++ b/.bugs/858
@@ -2,8 +2,10 @@ Title: Discovery check lifes in history
Component: checks
State: open
Date: 2016-02-09 15:25:38
-Targetversion: 1.2.7
+Targetversion: 1.2.8
Class: bug
-After Changing a rule like Diskstat Diskcovery mode and a re discovery every seams fine. But some times later the Check_MK Discovery Check
-reports unchecked services. But if you then reschedule the Discovery Service by hand, everything is fine again
+After changing a rule like diskstat Discovery mode and doing a rediscovery
+every seems fine. But some times later the Check_MK Discovery Check reports
+unchecked services. But if you then reschedule the Discovery Service manually,
+everything is fine again
diff --git a/.bugs/859 b/.bugs/859
index 24438f4..e53241e 100644
--- a/.bugs/859
+++ b/.bugs/859
@@ -1,8 +1,9 @@
-Title: Changing the output_format doesen't change the response header
+Title: Changing the output_format doesn't change the response header
Component: multisite
State: open
Date: 2016-02-09 15:28:09
-Targetversion: 1.2.7
+Targetversion: 1.2.8
Class: bug
-If you change the output_format for example to json, the response header is still html
+If you change the output_format for example to json, the mime type in the
+response header is still html.
diff --git a/.bugs/860 b/.bugs/860
index 55bea0f..d03444a 100644
--- a/.bugs/860
+++ b/.bugs/860
@@ -2,7 +2,8 @@ Title: Bug in Daily 08.02.16: Ackn doesn't work any more
Component: multisite
State: open
Date: 2016-02-09 15:29:25
-Targetversion: 1.2.7
+Targetversion: 1.2.8
Class: bug
-It is not possible to acknowldge services anymore. Downtime works. The list of services was mit OK and CRIT services.
+It is not possible to acknowldge services anymore. Downtime works. The list
+of services was mit OK and CRIT services.
diff --git a/.bugs/861 b/.bugs/861
index ee540ec..5bd6adf 100644
--- a/.bugs/861
+++ b/.bugs/861
@@ -1,9 +1,14 @@
-Title: Reshedule Checks only affects some services from the list
+Title: Reschedule Checks only affects some services from the list
Component: checks
State: open
Date: 2016-02-09 15:31:09
-Targetversion: 1.2.7
+Targetversion: 1.2.8
Class: bug
-Reshedule Active checks like HW/SW Inventory doesen't work at all. If you have for example 50 Services, only 12 where done.
-So you have to do it multiple times until all checks are triggered
+Reschedule active checks like HW/SW Inventory doesn't work at all. If you
+have for example 50 Services, only 12 where done. So you have to do it
+multiple times until all checks are triggered.
+
+mk: Maybe this could be the known problem that the CMC ignores all
+but the first command if more commands are sent via Livestatus
+in one write().
Module: check_mk
Branch: master
Commit: bbf2c52d716c5d11fa2d5a06c7df764020c0d7d0
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bbf2c52d716c5d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Feb 23 17:04:52 2016 +0100
Added comment to meaning of function
---
web/htdocs/js/checkmk.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/web/htdocs/js/checkmk.js b/web/htdocs/js/checkmk.js
index 3b82665..3fb9e67 100644
--- a/web/htdocs/js/checkmk.js
+++ b/web/htdocs/js/checkmk.js
@@ -218,6 +218,7 @@ function merge_args()
return defaults;
}
+// Tells the caller whether or not there are graphs on the current page
function has_graphing()
{
return typeof g_graphs !== 'undefined';
Module: check_mk
Branch: master
Commit: 9919f8414484e17964bde0854f8b6add38c0127d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9919f8414484e1…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Feb 23 14:09:28 2016 +0100
#3181 FIX Omit icon for downloading agent output on shadow hosts (cmcdump)
Hosts that are synced via <tt>cmcdump</tt> do not have any agent output.
---
.werks/3181 | 10 ++++++++++
ChangeLog | 1 +
web/plugins/icons/wato.py | 5 +++--
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/3181 b/.werks/3181
new file mode 100644
index 0000000..a2c7cfe
--- /dev/null
+++ b/.werks/3181
@@ -0,0 +1,10 @@
+Title: Omit icon for downloading agent output on shadow hosts (cmcdump)
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1456232935
+
+Hosts that are synced via <tt>cmcdump</tt> do not have any agent output.
diff --git a/ChangeLog b/ChangeLog
index b259725..f47a466 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -50,6 +50,7 @@
* 3175 FIX: Fix timeranges of graphs that are embedded in a dashboard...
* 3076 FIX: fixed broken views in check_mk raw edition
* 3077 FIX: CSV export is now available for host/service availability and now includes summary line
+ * 3181 FIX: Omit icon for downloading agent output on shadow hosts (cmcdump)...
WATO:
* 3060 FIX: Folder properties: Fixed exception when a user has no alias set...
diff --git a/web/plugins/icons/wato.py b/web/plugins/icons/wato.py
index 93d4cca..dae1894 100644
--- a/web/plugins/icons/wato.py
+++ b/web/plugins/icons/wato.py
@@ -82,7 +82,8 @@ multisite_icons_and_actions['wato'] = {
def paint_download_agent_output(what, row, tags, host_custom_vars, ty):
if (what == "host" or (what == "service" and row["service_description"] == "Check_MK")) \
- and config.may("wato.download_agent_output"):
+ and config.may("wato.download_agent_output") \
+ and not row["host_check_type"] == 2: # Not for shadow hosts
# Not 100% acurate to use the tags here, but this is the best we can do
# with the available information.
@@ -107,7 +108,7 @@ def paint_download_agent_output(what, row, tags, host_custom_vars, ty):
multisite_icons_and_actions['download_agent_output'] = {
- 'host_columns' : [ "filename" ],
+ 'host_columns' : [ "filename", "check_type" ],
'paint' : lambda *args: paint_download_agent_output(*args, ty="agent"),
'toplevel' : False,
'sort_index' : 50,
Module: check_mk
Branch: master
Commit: a8e7cc09de730070d4c7382b5250dff2e1c3d8ca
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a8e7cc09de7300…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Tue Feb 23 14:00:30 2016 +0100
#3191 cisco_redundancy: new check which monitors the status of the redundant unit of Cisco devices supporting the CISCO-RF-MIB
---
.werks/3191 | 9 ++++
ChangeLog | 1 +
checkman/cisco_redundancy | 18 +++++++
checks/cisco_redundancy | 118 +++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 146 insertions(+)
diff --git a/.werks/3191 b/.werks/3191
new file mode 100644
index 0000000..dc60f8d
--- /dev/null
+++ b/.werks/3191
@@ -0,0 +1,9 @@
+Title: cisco_redundancy: new check which monitors the status of the redundant unit of Cisco devices supporting the CISCO-RF-MIB
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.9i1
+Date: 1456232351
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index ecba0ab..a691518 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,7 @@
* 2996 websphere_mq_queues: now able to configure levels for used percentage of total queues
* 3190 entity_sensors, entity_sensors.fan: new checks monitoring temperature and fan sensors of devices such as Palo Alto Networks which support the ENTITY-SENSORS-MIB
* 3081 mk_jolokia: plugin now supports setting custom CAs for verifying server certificate as well as sending a client certificate...
+ * 3191 cisco_redundancy: new check which monitors the status of the redundant unit of Cisco devices supporting the CISCO-RF-MIB
* 3073 FIX: windows agent: relative paths to mrpe scripts are now treated as relative to the agent installation directory...
* 3061 FIX: mk_jolokia: Fixed debugging of the agent plugin
* 3074 FIX: windows agent: fixed incorrect values for 32-bit performance counters
diff --git a/checkman/cisco_redundancy b/checkman/cisco_redundancy
new file mode 100644
index 0000000..b4a0596
--- /dev/null
+++ b/checkman/cisco_redundancy
@@ -0,0 +1,18 @@
+title: Cisco Devices: Redundancy Framework Status
+agents: snmp
+catalog: hw/network/cisco
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the the status of the redundant unit of Cisco
+ devices which support the CISCO-RF-MIB.
+
+ At discovery the unit id, unit state, peer id, peer state and duplex mode
+ are saved as parameters. At check period if the parameters are still the same
+ the check is OK. If they have changed the service status will turn into WARN
+ if unit or peer state is 'disabled', 'standby hot' or 'active', or CRIT otherwise.
+ In these cases the reason for the last switch of activity will be reported.
+ Independently if the peer state is 'not known' the state will be CRIT.
+
+inventory:
+ One service will be created.
diff --git a/checks/cisco_redundancy b/checks/cisco_redundancy
new file mode 100644
index 0000000..d9cccac
--- /dev/null
+++ b/checks/cisco_redundancy
@@ -0,0 +1,118 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2016 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-
+# tails. 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.
+
+
+# .1.3.6.1.4.1.9.9.176.1.1.1.0 0 --> CISCO-RF-MIB::cRFStatusUnitId.0
+# .1.3.6.1.4.1.9.9.176.1.1.2.0 14 --> CISCO-RF-MIB::cRFStatusUnitState.0
+# .1.3.6.1.4.1.9.9.176.1.1.3.0 0 --> CISCO-RF-MIB::cRFStatusPeerUnitId.0
+# .1.3.6.1.4.1.9.9.176.1.1.4.0 2 --> CISCO-RF-MIB::cRFStatusPeerUnitState.0
+# .1.3.6.1.4.1.9.9.176.1.1.6.0 2 --> CISCO-RF-MIB::cRFStatusDuplexMode.0
+# .1.3.6.1.4.1.9.9.176.1.1.8.0 1 --> CISCO-RF-MIB::cRFStatusLastSwactReasonCode.0
+
+
+def inventory_cisco_redundancy(info):
+ return [(None, {"init_states" : info[0][:5]})]
+
+
+def check_cisco_redundancy(_no_item, params, info):
+ map_states = {
+ "unit_state" : {
+ "0" : "not found",
+ "1" : "not known",
+ "2" : "disabled",
+ "3" : "initialization",
+ "4" : "negotiation",
+ "5" : "standby cold",
+ "6" : "standby cold config",
+ "7" : "standby cold file sys",
+ "8" : "standby cold bulk",
+ "9" : "standby hot",
+ "10" : "active fast",
+ "11" : "active drain",
+ "12" : "active pre-config",
+ "13" : "active post-config",
+ "14" : "active",
+ "15" : "active extra load",
+ "16" : "active handback",
+ },
+ "duplex_mode" : {
+ "2" : "False (SUB-Peer not detected)",
+ "1" : "True (SUB-Peer detected)",
+ },
+ "swact_reason" : {
+ "1" : "unsupported",
+ "2" : "none",
+ "3" : "not known",
+ "4" : "user initiated",
+ "5" : "user forced",
+ "6" : "active unit failed",
+ "7" : "active unit removed",
+ },
+ }
+ infotexts = {}
+ for what, states in [("now", info[0][:5]), ("init", params["init_states"])]:
+ unit_id, unit_state, peer_id, peer_state, duplex_mode = states
+ infotexts[what] = "Unit ID: %s (%s), Peer ID: %s (%s), Duplex mode: %s" % \
+ (unit_id, map_states["unit_state"][unit_state], \
+ peer_id, map_states["unit_state"][peer_state], \
+ map_states["duplex_mode"][duplex_mode])
+
+ unit_id, unit_state, peer_id, peer_state, duplex_mode, swact_reason = info[0]
+
+ if params["init_states"] == info[0][:5]:
+ state = 0
+ infotext = "%s, Last swact reason code: %s" % \
+ (infotexts["now"], map_states["swact_reason"][info[0][5]])
+ else:
+ if unit_state in ["2", "9", "14"] or peer_state in ["2", "9", "14"]:
+ state = 1
+ else:
+ state = 2
+
+ infotext = "Switchover - Old status: %s, New status: %s" % \
+ (infotext["init"], infotext["now"])
+
+ if peer_state == "1":
+ state = 2
+
+ return state, infotext
+
+
+check_info['cisco_redundancy'] = {
+ 'inventory_function' : inventory_cisco_redundancy,
+ 'check_function' : check_cisco_redundancy,
+ 'service_description' : 'Redundancy Framework Status',
+ 'snmp_info' : ('.1.3.6.1.4.1.9.9.176.1.1', [
+ 1, # cRFStatusUnitId
+ 2, # cRFStatusUnitState
+ 3, # cRFStatusPeerUnitId
+ 4, # cRFStatusPeerUnitState
+ 6, # cRFStatusDuplexMode
+ 8, # cRFStatusLastSwactReasonCode
+ ]),
+ 'snmp_scan_function' : lambda oid: "cisco" in oid(".1.3.6.1.2.1.1.1.0").lower() \
+ and oid(".1.3.6.1.4.1.9.9.176.1.1.*"),
+}