Module: check_mk
Branch: master
Commit: eeea584fb2838e458917a04b39fe9cbbda1d3e8e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=eeea584fb2838e…
Author: Ronny Bruska <rb(a)mathias-kettner.de>
Date: Sat Apr 13 22:03:43 2019 +0200
7407 check_elasticsearch_query: New active check to query elasticsearch
You can now query the occurrence of log messages in elasticsearch for a
specified interval. It is possible to set warn/crit level on the message
count.
It is possible to use free-text search or set a defined index and/or fieldname
to search.
Change-Id: Ia098a3ff432c36572275513cb789911067aabe37
---
.werks/7407 | 15 +++
active_checks/check_elasticsearch_query | 197 ++++++++++++++++++++++++++++++++
checkman/check_elasticsearch_query | 8 ++
checks/check_elasticsearch_query | 66 +++++++++++
cmk/gui/plugins/wato/active_checks.py | 129 +++++++++++++++++++++
5 files changed, 415 insertions(+)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=eeea584fb2…
Module: check_mk
Branch: master
Commit: eefff612d75c92c2230a24aaa03dc72c82c600fe
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=eefff612d75c92…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Tue Apr 23 14:02:32 2019 +0200
7403 FIX check_http, check_mail_loop, check_smtp: Unkown state during discovery
Active checks using the host_name() API function no longer go to UNKNOWN
during discovery.
CMK-1927
Change-Id: I8f8b46a125ab790edacc9913b7af6db2eaa2c9fd
---
.werks/7403 | 11 +++++++++++
cmk_base/automations/check_mk.py | 3 +++
cmk_base/discovery.py | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/7403 b/.werks/7403
new file mode 100644
index 0000000..6dece75
--- /dev/null
+++ b/.werks/7403
@@ -0,0 +1,11 @@
+Title: check_http, check_mail_loop, check_smtp: Unkown state during discovery
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1556020748
+Class: fix
+
+Active checks using the host_name() API function no longer go to UNKNOWN
+during discovery.
diff --git a/cmk_base/automations/check_mk.py b/cmk_base/automations/check_mk.py
index 693e7fc..700622e 100644
--- a/cmk_base/automations/check_mk.py
+++ b/cmk_base/automations/check_mk.py
@@ -1318,6 +1318,9 @@ class AutomationActiveCheck(Automation):
entries = config_cache.host_extra_conf(hostname, rules)
if entries:
act_info = config.active_check_info[plugin]
+ # Set host name for host_name()-function (part of the Check API)
+ # (used e.g. by check_http)
+ check_api_utils.set_hostname(hostname)
for params in entries:
description = config.active_check_service_description(
hostname, plugin, params)
diff --git a/cmk_base/discovery.py b/cmk_base/discovery.py
index 5391e21..9fc54a3 100644
--- a/cmk_base/discovery.py
+++ b/cmk_base/discovery.py
@@ -739,7 +739,7 @@ def schedule_discovery_check(hostname):
# "warn" -> output a warning on stderr
# "raise" -> let the exception come through
def _discover_services(hostname, ipaddress, sources, multi_host_sections, on_error):
- # Make hostname available as global variable in discovery functions
+ # Set host name for host_name()-function (part of the Check API)
# (used e.g. by ps-discovery)
check_api_utils.set_hostname(hostname)