Module: check_mk
Branch: master
Commit: 650a8605f4591ff48fcefe071c4bddf9128ddbd0
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=650a8605f4591f…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Tue Aug 4 13:50:01 2015 +0200
#2515 juniper_trpz_aps: check is now cluster-aware
Now this check is cluster-aware and has now performance data which show the number of access points.
---
.werks/2515 | 9 +++++++++
ChangeLog | 1 +
checks/juniper_trpz_aps | 10 ++++++++--
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/.werks/2515 b/.werks/2515
new file mode 100644
index 0000000..8dce5b5
--- /dev/null
+++ b/.werks/2515
@@ -0,0 +1,9 @@
+Title: juniper_trpz_aps: check is now cluster-aware
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i3
+Date: 1438688827
+Class: feature
+
+Now this check is cluster-aware and has now performance data which show the number of access points.
diff --git a/ChangeLog b/ChangeLog
index 933a479..1a98a5e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,7 @@
* 2292 kentix_amp_sensors: New check for the Kentix Alarmmanager Pro...
* 2413 esx_vsphere_counters: new check to monitor the disk throughput and latency for ESX datastores
* 2513 new checks sentry_pdu_outlets sentry_pdu_systempower: monitor the system power consumption and outlet states of sentry pdu devices which support the Sentry3-MIB
+ * 2515 juniper_trpz_aps: check is now cluster-aware...
* 2315 FIX: windows agent: BOM replacement, fixed incorrect byte offset...
* 2316 FIX: windows agent: fix garbled output of cached agent plugins...
* 2358 FIX: check_mk_agent.solaris: more correct computation of zfs used space...
diff --git a/checks/juniper_trpz_aps b/checks/juniper_trpz_aps
index 99cbe5c..0c07559 100644
--- a/checks/juniper_trpz_aps
+++ b/checks/juniper_trpz_aps
@@ -28,14 +28,20 @@ def inventory_juniper_trpz_aps(info):
return [ (None, None) ]
def check_juniper_trpz_aps(_no_item, _no_params, info):
- aps = info[0][0]
+ node, aps = info[0]
message = "%s access points online" % aps
- return 0, message
+
+ # Are we a cluster?
+ if node != None:
+ message = " (on %s)" % node
+
+ return 0, message, [ ('ap_devices_total', aps) ]
check_info["juniper_trpz_aps"] = {
"check_function" : check_juniper_trpz_aps,
"inventory_function" : inventory_juniper_trpz_aps,
"service_description" : "Access Points",
+ "node_info" : True,
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.14525.3.1"),
"snmp_info" : (".1.3.6.1.4.1.14525.4.5.1.1",[
1, #number of Access Points
Module: check_mk
Branch: master
Commit: 5ada2ac11e04d37ee8ce221ecbc702c7b4b95061
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5ada2ac11e04d3…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Tue Aug 4 13:52:45 2015 +0200
edited man page of juniper_trpz_aps
---
checkman/juniper_trpz_aps | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/checkman/juniper_trpz_aps b/checkman/juniper_trpz_aps
index cc0b9e7..4bf762f 100644
--- a/checkman/juniper_trpz_aps
+++ b/checkman/juniper_trpz_aps
@@ -4,8 +4,11 @@ catalog: hw/network/juniper
license: GPL
distribution: check_mk
description:
- Show the number of online access points registered on the controller
+ Show the number of online access points registered on the controller.
+ This check is now cluster-aware.
inventory:
One service for the number of access points
+perfdata:
+ The number of access points.
Module: check_mk
Branch: master
Commit: 4c8138ce6158d52f0e430b9cd2d3cb349fcf1d93
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4c8138ce6158d5…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Aug 4 11:12:34 2015 +0200
#2502 FIX Fixed removing autochecks when a host is configured to be ping only
When a host had already discovered services assigned and was configured to be monitored
as ping only host, by e.g. setting "no agent" in the host properties, the former
discovered services were not removed.
---
.werks/2502 | 12 ++++++++++++
ChangeLog | 1 +
modules/check_mk.py | 5 ++++-
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/.werks/2502 b/.werks/2502
new file mode 100644
index 0000000..f5c1d42
--- /dev/null
+++ b/.werks/2502
@@ -0,0 +1,12 @@
+Title: Fixed removing autochecks when a host is configured to be ping only
+Level: 1
+Component: core
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1438679410
+
+When a host had already discovered services assigned and was configured to be monitored
+as ping only host, by e.g. setting "no agent" in the host properties, the former
+discovered services were not removed.
diff --git a/ChangeLog b/ChangeLog
index 933a479..ef6901a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
1.2.7i3:
Core & Setup:
* 2465 FIX: Fixed broken Check_MK Discovery checks (check reports "(null)")
+ * 2502 FIX: Fixed removing autochecks when a host is configured to be ping only...
Checks & Agents:
* 2312 New checks for EMC VPLEX: emc_vplex_cpu, emc_vplex_director_stats, emc_vplex_if, emc_vplex_volumes...
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 7394b81..57e500d 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -937,6 +937,9 @@ def get_check_table(hostname, remove_duplicates=False, use_cache=True, world='co
global g_singlehost_checks
global g_multihost_checks
+ if is_ping_host(hostname):
+ skip_autochecks = True
+
# speed up multiple lookup of same host
if not skip_autochecks and use_cache and hostname in g_check_table_cache:
if remove_duplicates and is_dual_host(hostname):
@@ -2546,7 +2549,7 @@ define service {
# Inventory checks - if user has configured them.
if inventory_check_interval \
and not service_ignored(hostname, None, service_discovery_name) \
- and not "ping" in tags_of_host(hostname):
+ and not "ping" in tags_of_host(hostname): # FIXME/TODO: Why not user is_ping_host()?
outfile.write("""
define service {
use\t\t\t\t%s
Module: check_mk
Branch: master
Commit: 40a011f48fd094f46c6bc26be81be8eea5bd48f8
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=40a011f48fd094…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Aug 4 10:31:53 2015 +0200
Fixed exception during ldap group sync
---
web/plugins/userdb/ldap.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index b7f2487..5964621 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -636,9 +636,9 @@ class LDAPUserConnector(UserConnector):
return self._group_cache[cache_key]
if not nested:
- groups = get_direct_group_memberships(filters, filt_attr)
+ groups = self.get_direct_group_memberships(filters, filt_attr)
else:
- groups = get_nested_group_memberships(filters, filt_attr)
+ groups = self.get_nested_group_memberships(filters, filt_attr)
self._group_cache[cache_key] = groups
return groups
@@ -650,7 +650,7 @@ class LDAPUserConnector(UserConnector):
# In OpenLDAP the distinguishedname is no user attribute, therefor it can not be used
# as filter expression. We have to do one ldap query per group. Maybe, in the future,
# we change the role sync plugin parameters to snapins to make this part a little easier.
- def get_direct_group_memberships(filters, filt_attr):
+ def get_direct_group_memberships(self, filters, filt_attr):
groups = {}
filt = self.ldap_filter('groups')
member_attr = self.member_attr().lower()
@@ -682,7 +682,7 @@ class LDAPUserConnector(UserConnector):
# Nested querying is more complicated. We have no option to simply do a query for group objects
# to make them resolve the memberships here. So we need to query all users with the nested
# memberof filter to get all group memberships of that group. We need one query for each group.
- def get_nested_group_memberships(filters, filt_attr):
+ def get_nested_group_memberships(self, filters, filt_attr):
groups = {}
for filter_val in filters:
if filt_attr == 'cn':
Module: check_mk
Branch: master
Commit: ba484cabce55caad5f3232e0c42b456fe292ed0f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ba484cabce55ca…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Aug 3 17:06:56 2015 +0200
#2514 check oracle_jobs: configurable service status in case of disabled jobs
If a job configured in ORACLE databases is DISABLED, the status of the service can now be set to OK, WARN, CRIT or UNKNOWN.
---
.werks/2514 | 9 +++++++++
ChangeLog | 1 +
checks/oracle_jobs | 23 +++++++++++++++++++++--
web/plugins/wato/check_parameters.py | 6 +++++-
4 files changed, 36 insertions(+), 3 deletions(-)
diff --git a/.werks/2514 b/.werks/2514
new file mode 100644
index 0000000..ec96534
--- /dev/null
+++ b/.werks/2514
@@ -0,0 +1,9 @@
+Title: check oracle_jobs: configurable service status in case of disabled jobs
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.2.7i3
+Date: 1438613862
+Class: feature
+
+If a job configured in ORACLE databases is DISABLED, the status of the service can now be set to OK, WARN, CRIT or UNKNOWN.
diff --git a/ChangeLog b/ChangeLog
index ffeaa60..933a479 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -133,6 +133,7 @@
* 2479 Allowing dots in host-, service- and contact groups now
* 2486 Remove special handling for non-distributed-setups in WATO...
* 2487 Remove dangerous <i>Factory Reset</i> button...
+ * 2514 check oracle_jobs: configurable service status in case of disabled jobs...
* 2344 FIX: Improved validation of selected rules when editing BI aggregations...
* 2346 FIX: Notifications: Fixed garbled page when switching on/off bulks/backlog/user rules
* 2372 FIX: Avoid freezing WATO during bulk discovery if hosts do not respond in a timely manner
diff --git a/checks/oracle_jobs b/checks/oracle_jobs
index d1dca28..5b8d979 100644
--- a/checks/oracle_jobs
+++ b/checks/oracle_jobs
@@ -36,6 +36,22 @@
# IODBSZ1 EXFSYS RLM$SCHDNEGACTION SCHEDULED 0 18954 TRUE 23.04.13 14:51:57,000000 +02:00 - SUCCEEDED
# IODBSZ1 EXFSYS RLM$EVTCLEANUP SCHEDULED 0 18202 TRUE 23.04.13 13:41:48,200000 +01:00 - SUCCEEDED
+# new output
+# <<<oracle_jobs:sep(124)>>>
+# QS1|SYS|SM$CLEAN_AUTO_SPLIT_MERGE|SCHEDULED|1|877|TRUE|02-AUG-15 12.00.00.500000 AM EUROPE/VIENNA|-|SUCCEEDED
+# QS1|SYS|RSE$CLEAN_RECOVERABLE_SCRIPT|SCHEDULED|0|877|TRUE|02-AUG-15 12.00.00.800000 AM EUROPE/VIENNA|-|SUCCEEDED
+# QS1|SYS|FGR$AUTOPURGE_JOB|DISABLED||0|FALSE|01-JAN-70 12.00.00.000000 AM +02:00|-|
+# QS1|SYS|BSLN_MAINTAIN_STATS_JOB|SCHEDULED|12|128|TRUE|02-AUG-15 12.00.00.600000 AM +01:00|BSLN_MAINTAIN_STATS_SCHED|SUCCEEDED
+# QS1|SYS|DRA_REEVALUATE_OPEN_FAILURES|SCHEDULED|0|156|TRUE|01-JAN-70 12.00.00.000000 AM +02:00|MAINTENANCE_WINDOW_GROUP|SUCCEEDED
+# QS1|SYS|HM_CREATE_OFFLINE_DICTIONARY|DISABLED||0|FALSE|01-JAN-70 12.00.00.000000 AM +02:00|MAINTENANCE_WINDOW_GROUP|
+# QS1|SYS|ORA$AUTOTASK_CLEAN|SCHEDULED|0|877|TRUE|02-AUG-15 03.00.00.200000 AM EUROPE/VIENNA|DAILY_PURGE_SCHEDULE|SUCCEEDED
+# QS1|SYS|FILE_WATCHER|DISABLED||0|FALSE|01-JAN-70 12.00.00.000000 AM +02:00|FILE_WATCHER_SCHEDULE|
+# QS1|SYS|PURGE_LOG|SCHEDULED|0|877|TRUE|02-AUG-15 03.00.00.700000 AM EUROPE/VIENNA|DAILY_PURGE_SCHEDULE|SUCCEEDED
+# QS1|ORACLE_OCM|MGMT_STATS_CONFIG_JOB|DISABLED|0|2|FALSE|01-MAY-15 01.01.01.100000 AM +01:00|-|
+# QS1|ORACLE_OCM|MGMT_CONFIG_JOB|DISABLED|0|40|FALSE|08-APR-15 01.01.01.200000 AM +01:00|-|
+# QS1|DBADMIN|DATENEXPORT-FUR|COMPLETED|0|3|FALSE|22-AUG-14 01.11.00.000000 AM EUROPE/BERLIN|-|
+
+
factory_settings["oracle_jobs_defaults"] = {
"disabled": True,
@@ -136,7 +152,7 @@ def check_oracle_jobs(item, params, info):
# 01.05.13 01:01:01,000000 +01:00
if job_nextrun.startswith("01.01.70 00:00:00"):
- if job_schedule == "-":
+ if job_schedule == "-" and job_state != "DISABLED":
job_nextrun = "not scheduled(!)"
state = max(state, 1)
else:
@@ -149,11 +165,14 @@ def check_oracle_jobs(item, params, info):
txt = 'Job is running forever'
else:
txt = "Last Run Status: %s" % (job_status)
- if job_status != "SUCCEEDED":
+ if job_status != "SUCCEEDED" and job_status != "":
txt += "(!!)"
state = max(state, 2)
output.append(txt)
+ if job_state == "DISABLED" and "status_disabled_jobs" in params:
+ state = params["status_disabled_jobs"]
+
return (state, ", ".join(output), perfdata)
check_info['oracle_jobs'] = {
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 559329a..7194251 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -4601,7 +4601,11 @@ register_check_parameters(
( True, _("Ignore the state of the Job")),
( False, _("Consider the state of the job")),],
help = _("The state of the job is ignored per default.")
- )),]
+ )),
+ ( "status_disabled_jobs", MonitoringState(
+ title = "Status of service in case of disabled job", default_value = 0
+ )),
+ ]
),
TextAscii(
title = _("Scheduler Job Name"),