Module: check_mk
Branch: master
Commit: 8c22024f5b97057bcaba0603cc349d7fa7c2ad8d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8c22024f5b9705…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jul 22 12:49:49 2015 +0200
WATO links/actions now preserve the debug html var to make debugging easier
---
web/htdocs/wato.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 78f1185..9c31183 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -4833,7 +4833,7 @@ def mode_changelog(phase):
restart_site(site)
response = True
except Exception, e:
- response = str(e)
+ response = "%s" % e
if response == True:
return
@@ -19307,6 +19307,8 @@ def host_extra_conf(hostname, conflist):
# Create link keeping the context to the current folder / file
def make_link(vars):
vars = vars + [ ("folder", g_folder[".path"]) ]
+ if html.var("debug") == "1":
+ vars.append(("debug", "1"))
return html.makeuri_contextless(vars)
# Small helper for creating a link with a context to a given folder
Module: check_mk
Branch: master
Commit: 4eed93e53c42b70d1c841725d46992bd332f7232
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4eed93e53c42b7…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jul 22 12:43:03 2015 +0200
Fixed exception on ldap credential sync when only the password changed for a user
---
web/plugins/userdb/ldap.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index 82bd495..ae541c8 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -862,7 +862,7 @@ class LDAPUserConnector(UserConnector):
# Synchronize new user profile to remote sites if needed
if pw_changed and not changed and wato.is_distributed():
- synchronize_profile_to_sites(user_id, user)
+ synchronize_profile_to_sites(self, user_id, user)
if changed:
details.append(('Changed: %s') % ', '.join(changed))
@@ -1421,13 +1421,13 @@ ldap_attribute_plugins['groups_to_roles'] = {
# Hopefully we have no large bulks of users changing their passwords at the same
# time. In this case the implementation does not scale well. We would need to
# change this to some kind of profile bulk sync per site.
-def synchronize_profile_to_sites(user_id, profile):
+def synchronize_profile_to_sites(connection, user_id, profile):
import wato # FIXME: Cleanup!
sites = [(site_id, config.site(site_id))
for site_id in config.sitenames()
if not wato.site_is_local(site_id) ]
- self.log('Credentials changed: %s. Trying to sync to %d sites' % (user_id, len(sites)))
+ connection.log('Credentials changed: %s. Trying to sync to %d sites' % (user_id, len(sites)))
num_disabled = 0
num_succeeded = 0
@@ -1454,12 +1454,12 @@ def synchronize_profile_to_sites(user_id, profile):
num_succeeded += 1
else:
num_failed += 1
- self.log(' FAILED [%s]: %s' % (site_id, result))
+ connection.log(' FAILED [%s]: %s' % (site_id, result))
# Add pending entry to make sync possible later for admins
wato.update_replication_status(site_id, {"need_sync": True})
wato.log_pending(wato.AFFECTED, None, "edit-users",
_('Password changed (sync failed: %s)') % result, user_id = '')
- self.log(' Disabled: %d, Succeeded: %d, Failed: %d' %
+ connection.log(' Disabled: %d, Succeeded: %d, Failed: %d' %
(num_disabled, num_succeeded, num_failed))
Module: check_mk
Branch: master
Commit: b8511df506b5d40c47c34c125b558951f073ff26
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b8511df506b5d4…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Jul 22 12:04:15 2015 +0200
#2409 AIX DB2 monitoring: the agent plugin now processes all db2 instances in parallel
The mk_db2.aix plugin now uses a separate cache file for each db2 instance.
This allows parallel processing of all instances at the same time.
The performance of the system should not suffer. It was tested on a system with 50+ db2 instances.
Furthermore the db2 checks will no longer all report UNKNOWN when an instance is stopped.
The instance checks will now go stale (no data was reported) and the db2_version check will
go to CRIT.
The db2_logsizes check now finally works.. There was a typo in the previous checkname.
---
.werks/2409 | 17 +++
ChangeLog | 1 +
agents/plugins/mk_db2.aix | 277 ++++++++++++++++++----------------
checkman/db2_logsize | 22 ---
checks/db2.include | 14 +-
checks/db2_backup | 6 +-
checks/db2_bp_hitratios | 6 +-
checks/db2_connections | 7 +-
checks/db2_counters | 19 ++-
checks/{db2_logsize => db2_logsizes} | 29 ++--
checks/db2_mem | 3 +
checks/db2_sort_overflow | 6 +-
checks/db2_tablespaces | 7 +-
checks/db2_version | 6 +-
14 files changed, 233 insertions(+), 187 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=b8511df506…
Module: check_mk
Branch: master
Commit: 5c8704dd30eb84c74e1b4240c14f59577c34d56e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5c8704dd30eb84…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jul 22 10:20:03 2015 +0200
#2473 FIX cisco_asa_failover: Reworked check to reflect expected primary/secondary states of devices
The check was keeping the current cluster/node states which the devices had during service
discovery as reference state and checks whether or not this state remains and raises an
error when the state changed.
This has been changed now. The state during discovery is not relevant anymore. The check
now looks at the primary/secondary devices and checks whether or not the primary device
is the active one or the secondary has been promoted to be the active one. This should
be clearer for users.
---
.werks/2473 | 16 +++++++++++++
ChangeLog | 1 +
checks/cisco_asa_failover | 58 ++++++++++++++++++++++-----------------------
3 files changed, 46 insertions(+), 29 deletions(-)
diff --git a/.werks/2473 b/.werks/2473
new file mode 100644
index 0000000..9399f4d
--- /dev/null
+++ b/.werks/2473
@@ -0,0 +1,16 @@
+Title: cisco_asa_failover: Reworked check to reflect expected primary/secondary states of devices
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i3
+Date: 1437553052
+Class: fix
+
+The check was keeping the current cluster/node states which the devices had during service
+discovery as reference state and checks whether or not this state remains and raises an
+error when the state changed.
+
+This has been changed now. The state during discovery is not relevant anymore. The check
+now looks at the primary/secondary devices and checks whether or not the primary device
+is the active one or the secondary has been promoted to be the active one. This should
+be clearer for users.
diff --git a/ChangeLog b/ChangeLog
index 98b6d9f..df22540 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -67,6 +67,7 @@
* 2480 FIX: Fixed exception when configuring predictive levels for network interfaces
* 2376 FIX: Fix parsing of performance data from MRPE based checks
* 2377 FIX: cpu.loads: Fix output of reference for predition (was scaled wrongly by number of cores)
+ * 2473 FIX: cisco_asa_failover: Reworked check to reflect expected primary/secondary states of devices...
Multisite:
* 2385 SEC: Fixed possible reflected XSS on all GUI pages where users can produce unhandled exceptions...
diff --git a/checks/cisco_asa_failover b/checks/cisco_asa_failover
index 9a4222e..8c16433 100644
--- a/checks/cisco_asa_failover
+++ b/checks/cisco_asa_failover
@@ -24,10 +24,6 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-
-
-
-
# .1.3.6.1.4.1.9.9.147.1.2.1.1.1.2.4 "Failover LAN Interface"
# .1.3.6.1.4.1.9.9.147.1.2.1.1.1.2.6 "Primary unit (this device)"
# .1.3.6.1.4.1.9.9.147.1.2.1.1.1.2.7 "Secondary unit"
@@ -41,15 +37,12 @@
# [['Failover LAN Interface', '2', 'LAN_FO GigabitEthernet0/0.777'], ['Primary unit', '9', 'Active unit'], ['Secondary unit (this device)', '10', 'Standby unit']]
def inventory_cisco_asa_failover(info):
-
for deviceentry in info[-2:]:
if "this device" in deviceentry[0]:
- # Return the Cluster role ID of the device.
- return [ (None, int(info[1][1])) ]
-
+ return [ (None, None) ]
-def check_cisco_asa_failover(item, params, info):
+def check_cisco_asa_failover(_no_item, _no_params, info):
asa_state_names = {
1 : "other",
2 : "up",
@@ -63,28 +56,35 @@ def check_cisco_asa_failover(item, params, info):
10 : "standby",
}
+ for unit_type, (descr, device_state, state_txt), \
+ (other_descr, other_device_state, other_state_txt) in [ ("primary", info[-2], info[-1]),
+ ("secondary", info[-1], info[-2]) ]:
- for deviceentry in info[-2:]:
- if "this device" in deviceentry[0]:
-
- msgtxt = ""
- errtxt = ""
- state = 3
+ if "this device" in descr:
+ state, details = 0, None
+ device_state, other_device_state = int(device_state), int(other_device_state)
- def_role = params
- cur_role = saveint(info[1][1])
-
- if def_role == cur_role:
+ if (unit_type == "primary" and device_state == 9) \
+ or (unit_type == "secondary" and device_state == 10):
state = 0
- elif cur_role not in asa_state_names.keys():
- state = 3
- errtxt = ", Unknown cluster status received"
+ elif device_state in [ 9, 10 ] and other_device_state in [ 9, 10 ]:
+ state = 1
+ details = "The cluster is in failover state"
+ elif device_state == 4:
+ state = 2
+ details = "The device reports an error state"
+ elif device_state == 9 and other_device_state == 4:
+ state = 1
+ details = "The other device reports an error state"
else:
- state = 1
- errtxt = " expecting to be %s" % asa_state_names[def_role]
+ state = 1
+ details = "Unhandled state \"%s\" reported" % asa_state_names.get(device_state, device_state)
+
+ output = "Device is the %s" % state_txt
+ if details:
+ output += " (%s)" % details
- msgtxt = "Device is the %s" % deviceentry[2] + errtxt + state * "!"
- return (state, msgtxt)
+ return state, output
check_info["cisco_asa_failover"] = {
@@ -94,8 +94,8 @@ check_info["cisco_asa_failover"] = {
"has_perfdata" : False,
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.1.0").lower().startswith("cisco adaptive security"),
"snmp_info" : (".1.3.6.1.4.1.9.9.147.1.2.1.1.1", [
- "2", # The failover nic status
- "3", # The primary unit info
- "4", # The secondary unit info
+ "2", # CISCO-FIREWALL-MIB::cfwHardwareInformation
+ "3", # CISCO-FIREWALL-MIB::cfwHardwareStatusValue
+ "4", # CISCO-FIREWALL-MIB::cfwHardwareStatusDetail
]),
}
Module: check_mk
Branch: master
Commit: 9f82958d688c024b226393f7a60bd2670e8a6ecf
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9f82958d688c02…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Jul 22 09:41:25 2015 +0200
added manpages of checks: aix_hacmp_services, aix_hacmp_resources, aix_hacmp_nodes
---
checkman/aix_hacmp_nodes | 16 ++++++++++++++++
checkman/aix_hacmp_resources | 18 ++++++++++++++++++
checkman/aix_hacmp_services | 18 ++++++++++++++++++
3 files changed, 52 insertions(+)
diff --git a/checkman/aix_hacmp_nodes b/checkman/aix_hacmp_nodes
new file mode 100644
index 0000000..ef4949b
--- /dev/null
+++ b/checkman/aix_hacmp_nodes
@@ -0,0 +1,16 @@
+title: AIX HACMP Cluster Manager: Nodes
+agents: aix
+catalog: os/services
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the active nodes of AIX HACMP cluster manager.
+ The status will always be OK.
+
+ This check needs the check_mk_agent.aix agent.
+
+item:
+ The active node name.
+
+inventory:
+ One service for one active node.
diff --git a/checkman/aix_hacmp_resources b/checkman/aix_hacmp_resources
new file mode 100644
index 0000000..bb9baab
--- /dev/null
+++ b/checkman/aix_hacmp_resources
@@ -0,0 +1,18 @@
+title: AIX HACMP Cluster Manager: Resource Groups
+agents: aix
+catalog: os/services
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the resource group states on different nodes
+ of AIX HACMP cluster manager.
+ The status will be OK, if at least one status is 'online'. The status changes to CRIT if
+ one status reports 'error'. Otherwise it will be WARN.
+
+ This check needs the check_mk_agent.aix agent.
+
+item:
+ The resource group name.
+
+inventory:
+ One service per resource group.
diff --git a/checkman/aix_hacmp_services b/checkman/aix_hacmp_services
new file mode 100644
index 0000000..2372d0b
--- /dev/null
+++ b/checkman/aix_hacmp_services
@@ -0,0 +1,18 @@
+title: AIX HACMP Cluster Manager: Cluster Services
+agents: aix
+catalog: os/services
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the status of the daemons on a cluster node
+ of the AIX HACMP.
+ The status will be OK if all daemons are active. Otherwise it
+ will change to CRIT.
+
+ This check needs the check_mk_agent.aix agent.
+
+item:
+ The name of the cluster node.
+
+inventory:
+ One service per cluster node.