Module: check_mk
Branch: master
Commit: 8563c7db6744dff37dc2a42c1cb3b3dc6c3ea726
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8563c7db6744df…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Oct 15 04:42:23 2013 +0200
Added perfdata information to SAP check man pages
---
.bugs/1038 | 10 ++++++++--
.bugs/1062 | 7 +++++--
checkman/sap.dialog | 5 +++++
checkman/sap.value | 4 ++++
4 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/.bugs/1038 b/.bugs/1038
index 599d053..30590f2 100644
--- a/.bugs/1038
+++ b/.bugs/1038
@@ -1,9 +1,9 @@
Title: problem with mrpe if lable has white space characters
Component: checks
-State: open
+Class: bug
+State: wontfix
Date: 2013-08-27 12:12:33
Targetversion: future
-Class: bug
habe heute eine seltsame Sache mit einigen MRPE Checks gehabt. Falls die
Checks Performance Daten liefern und das Label der Performance Daten
@@ -64,3 +64,9 @@ mrpe.diff
+ perfdata.append(parts[1].strip())
else:
perfdata = []
+
+2013-10-15 04:17:00: changed state open -> wontfix
+Check_MK unterstützt keine Leerzeichen in Variablennamen von
+Perfdaten. Hat es noch nie. Auch der Microcore kann's nicht.
+Widerspricht dem Nagios-Standard. Die Spaces machen sowieso
+auch an vielen anderen Stellen Probleme.
diff --git a/.bugs/1062 b/.bugs/1062
index 34250a4..2095e9d 100644
--- a/.bugs/1062
+++ b/.bugs/1062
@@ -1,11 +1,14 @@
Title: mismatch between check and check manpages for plugin sap
Component: checks
-State: open
+Class: bug
+State: done
Date: 2013-10-04 12:34:09
Targetversion: 1.2.3i3
-Class: bug
the sap checks provide perfdata
but the manpages sap.dialog and sap.value tell, it does not
perfdata need to be documented in the both manpages
+
+2013-10-15 04:42:11: changed state open -> done
+Done.
diff --git a/checkman/sap.dialog b/checkman/sap.dialog
index c95f587..79432c4 100644
--- a/checkman/sap.dialog
+++ b/checkman/sap.dialog
@@ -20,3 +20,8 @@ item:
inventory:
The check creates a check for each SAP system ID which at least provides
the {SAP CCMS Monitor Templates/Dialog Overview/Dialog Response Time/ResponseTime}.
+
+perfdata:
+ As long as your R/3 has not been configured in an unusual way, four
+ values are output: (1) the number of users logged in, (2) the standard transaction's response time,
+ (3) The front end net time and (4) the response time - all in milliseconds
diff --git a/checkman/sap.value b/checkman/sap.value
index 12e8f00..cab0507 100644
--- a/checkman/sap.value
+++ b/checkman/sap.value
@@ -31,6 +31,10 @@ inventory:
node found on the target host. If an entry matches, a new check will
be created according to the entry (if it's not already existing).
+perfdata:
+ For status variables, no performance data is being output. Numeric
+ values are output as performance data.
+
examples:
# Examples for automatic inventorization of processes
inventory_sap_values = [
Module: check_mk
Branch: master
Commit: 013f31cebb5f0f75423c37f000becc010cbcf260
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=013f31cebb5f0f…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Oct 15 04:04:02 2013 +0200
Updated bug entries #0951
---
.bugs/951 | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/.bugs/951 b/.bugs/951
index 38ba855..0b2a944 100644
--- a/.bugs/951
+++ b/.bugs/951
@@ -1,12 +1,15 @@
Title: Folder-Tree Snapin shows foreign folders, but filter does not work
Component: multisite
-State: open
+Class: bug
+State: done
Date: 2013-09-12 17:27:28
Targetversion: 1.2.3i2
-Class: bug
If you create a disributed monitoring then the folder tree snapin
can show folders from remote sites (without alias), which is OK.
But when you click on a folder then the filter does not work
because (i think) it does not know the folder and hence ignored
it.
+
+2013-10-15 04:03:31: changed state open -> done
+Was already fixed in September.
Module: check_mk
Branch: master
Commit: fe968afbff3a50939c5882cefc2a4979ad9da3fb
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fe968afbff3a50…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Oct 15 02:56:24 2013 +0200
Automatically remove duplicate checks on SNMP+TCP
This was very annoying. Now if a host as a TCP based and SNMP based variant
of the same check then the SNMP based one is silently dropped. It is still
handled during inventory and visible in WATO. But when the actual monitoring
configuration is being created, it is omitted.
In the rare case where the user wants to prefer the SNMP based check, he
can still use disabled_checks and disable the TCP based one for the host
in question.
---
.bugs/955 | 7 +++++--
ChangeLog | 4 +++-
modules/check_mk.py | 49 ++++++++++++++++++++++++++++++++++++++--------
modules/check_mk_base.py | 2 +-
4 files changed, 50 insertions(+), 12 deletions(-)
diff --git a/.bugs/955 b/.bugs/955
index 0595fb7..f5e5992 100644
--- a/.bugs/955
+++ b/.bugs/955
@@ -1,9 +1,9 @@
Title: Automatically remove duplicate checks
Component: core
-State: open
+Class: nastiness
+State: done
Date: 2013-09-26 09:23:02
Targetversion: 1.2.3i3
-Class: nastiness
When you check a host with TCP and SNMP, you most times have
duplicate checks. This is nasty because you manually have
@@ -11,3 +11,6 @@ to ignore the duplicate.
We simply could silently disable the SNMP based variants
if a TCP based variant already exist.
+
+2013-10-15 02:53:21: changed state open -> done
+Done.
diff --git a/ChangeLog b/ChangeLog
index 36d1b3c..c7572bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,7 +6,9 @@
* FIX: fix configuration of explicit SNMP community, allow unicode
* FIX: avoid invalid cache of 2nd and up hosts in bulk inventory
* FIX: fixed error handling in SNMP scan, inventory check fails now
- if SNMP agent is not responding
+ if SNMP agent is not responding
+ * Automatically remove duplicate checks when monitoring with Agent+SNMP
+ at the same time. TCP based ones have precedence.
* inventory check of SNMP devices now does scan per default (configurable)
Multisite:
diff --git a/modules/check_mk.py b/modules/check_mk.py
index d29e890..5b59f92 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -593,6 +593,9 @@ def is_tcp_host(hostname):
def is_ping_host(hostname):
return not is_snmp_host(hostname) and not is_tcp_host(hostname)
+def is_dual_host(hostname):
+ return is_tcp_host(hostname) and is_snmp_host(hostname)
+
def check_period_of(hostname, service):
periods = service_extra_conf(hostname, service, check_periods)
if periods:
@@ -951,13 +954,16 @@ g_check_table_cache = {}
# are used in the autochecks and assumed be make up the vast majority.
g_singlehost_checks = None
g_multihost_checks = None
-def get_check_table(hostname):
+def get_check_table(hostname, remove_duplicates=False):
global g_singlehost_checks
global g_multihost_checks
# speed up multiple lookup of same host
if hostname in g_check_table_cache:
- return g_check_table_cache[hostname]
+ if remove_duplicates and is_dual_host(hostname):
+ return remove_duplicate_checks(g_check_table_cache[hostname])
+ else:
+ return g_check_table_cache[hostname]
check_table = {}
@@ -1039,15 +1045,42 @@ def get_check_table(hostname):
deps.append(d)
g_check_table_cache[hostname] = check_table
- return check_table
+ if remove_duplicates and is_dual_host(hostname):
+ return remove_duplicate_checks(check_table)
+ else:
+ return check_table
+
+def remove_duplicate_checks(check_table):
+ have_with_tcp = {}
+ have_with_snmp = {}
+ without_duplicates = {}
+ for key, value in check_table.iteritems():
+ checkname = key[0]
+ descr = value[1]
+ if check_uses_snmp(checkname):
+ if descr in have_with_tcp:
+ continue
+ have_with_snmp[descr] = key
+ else:
+ if descr in have_with_snmp:
+ snmp_key = have_with_snmp[descr]
+ del without_duplicates[snmp_key]
+ del have_with_snmp[descr]
+ have_with_tcp[descr] = key
+ without_duplicates[key] = value
+ return without_duplicates
+
-def get_sorted_check_table(hostname):
+# remove_duplicates: Automatically remove SNMP based checks
+# if there already is a TCP based one with the same
+# description. E.g: df vs hr_fs.
+def get_sorted_check_table(hostname, remove_duplicates=False):
# Convert from dictionary into simple tuple list. Then sort
# it according to the service dependencies.
unsorted = [ (checkname, item, params, descr, deps)
for ((checkname, item), (params, descr, deps))
- in get_check_table(hostname).items() ]
+ in get_check_table(hostname, remove_duplicates=remove_duplicates).items() ]
def cmp(a, b):
if a[3] < b[3]:
return -1
@@ -1920,7 +1953,7 @@ define servicedependency {
return result
- host_checks = get_check_table(hostname).items()
+ host_checks = get_check_table(hostname, remove_duplicates=True).items()
host_checks.sort() # Create deterministic order
aggregated_services_conf = set([])
do_aggregation = host_is_aggregated(hostname)
@@ -2900,7 +2933,7 @@ def find_check_plugins(checktype):
return paths
def get_precompiled_check_table(hostname):
- host_checks = get_sorted_check_table(hostname)
+ host_checks = get_sorted_check_table(hostname, remove_duplicates=True)
precomp_table = []
for checktype, item, params, description, deps in host_checks:
aggr_name = aggregated_service_name(hostname, description)
@@ -3006,7 +3039,7 @@ no_inventory_possible = None
output.write("%s = %r\n" % (var, globals()[var]))
output.write("\n# Checks for %s\n\n" % hostname)
- output.write("def get_sorted_check_table(hostname):\n return %r\n\n" % check_table)
+ output.write("def get_sorted_check_table(hostname, remove_duplicates=False):\n return %r\n\n" % check_table)
# Do we need to load the SNMP module? This is the case, if the host
# has at least one SNMP based check. Also collect the needed check
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 1b37a71..a47207e 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -1032,7 +1032,7 @@ def do_all_checks_on_host(hostname, ipaddress, only_check_types = None):
g_hostname = hostname
num_success = 0
error_sections = set([])
- check_table = get_sorted_check_table(hostname)
+ check_table = get_sorted_check_table(hostname, remove_duplicates=True)
problems = []
for checkname, item, params, description, info in check_table:
Module: check_mk
Branch: master
Commit: b24f36f22d46fa37286ae25110f0d9c8776fb8db
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b24f36f22d46fa…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Oct 15 01:49:13 2013 +0200
Updated bug entries #1020
---
.bugs/1020 | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/.bugs/1020 b/.bugs/1020
index 1729a53..9bed6aa 100644
--- a/.bugs/1020
+++ b/.bugs/1020
@@ -2,11 +2,22 @@ Title: cmk --snmpwalk does not always get all oids
Component: core
State: open
Date: 2013-09-04 11:27:53
-Targetversion: 1.2.3
-Class: bug
+Targetversion: future
+Class: nastiness
In some cases, on somehow broken devices, the cmk --snmpwalk feature does not
get complete results. At the moment it walks the standard OIDs 1.2.6.1.2 and
1.2.6.1.4.
An option to try to fix this problem is to add the oid returned by .1.3.6.1.2.1.1.2.0 .
+
+Mathias: I think I remember that there are some devices that do *not*
+have a MIB at that OID. And also some devices that have multiple entries
+in .1.3.6.1.2.1.1.2.0.
+
+Because we need the whole thing only for development we could simple give
+the possibility to manually add further OIDs to fetch via the command line,
+e.g.
+
+cmk --snmpwalk --extra-oid 1.3.5.1.4.3.5.3.5 HOST
+
Module: check_mk
Branch: master
Commit: 67d2949e38ab05d6184c067ff872f2aad8b87d88
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=67d2949e38ab05…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Oct 15 01:39:39 2013 +0200
Updated bug entries #0985, #0986
---
.bugs/985 | 17 +++++++++++++++++
.bugs/986 | 17 +++++++++++++++++
2 files changed, 34 insertions(+)
diff --git a/.bugs/985 b/.bugs/985
new file mode 100644
index 0000000..f302b8f
--- /dev/null
+++ b/.bugs/985
@@ -0,0 +1,17 @@
+Title: Reloading sidebar after config change erases Quicksearch
+Component: multisite
+State: open
+Date: 2013-10-15 01:34:28
+Targetversion: 1.2.3i3
+Class: nastiness
+
+If you active changes via WATO then the sidebar reloads.
+That way Quicksearch is emptied. This is nasty.
+
+1. You add a new host to the monitoring
+2. You activate the changes
+3. You type in the new hostname in Quicksearch
+4. The host name is erased right now because of the reload
+
+Does the Quicksearch need to be reloaded at the first place?
+It's now AJAX-enabled, isn't it?
diff --git a/.bugs/986 b/.bugs/986
new file mode 100644
index 0000000..98b6544
--- /dev/null
+++ b/.bugs/986
@@ -0,0 +1,17 @@
+Title: Delay sidebar reload after changes to site config
+Component: wato
+State: open
+Date: 2013-10-15 01:37:53
+Targetversion: 1.4.0
+Class: nastiness
+
+If you change the site configuration via WATO then the
+sidear is reloaded. But: at exactly the same time the
+liveproxyd is being restarted and all sites are down
+for 1-2 seconds. The sidebar is reloaded in exactly that
+point of time. Consequnce:
+
+- Tactical overview does not show remote hosts
+- Site status is [dead] for all remote sites.
+
+Can't we delay the reload for a small time?