Module: check_mk
Branch: master
Commit: 0eb634360333fb53df7a5d13ceffc62e886851d0
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0eb634360333fb…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Feb 17 12:25:41 2013 +0100
new special agent agent_random for creating random monitoring data
---
ChangeLog | 16 ++++++---
.../ds_random => agents/special/agent_random | 0
checks/agent_random | 37 ++++++++++++++++++++
checks/agent_vsphere | 2 +-
modules/check_mk.py | 2 +-
web/plugins/wato/datasource_programs.py | 12 ++++++
6 files changed, 62 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 78c2152..30e30e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,14 +1,20 @@
1.2.3i1:
Core:
- * New feature: agents can send data for other hosts
- "piggyback".
+ * Agents can send data for other hosts "piggyback". This is being
+ used by the vSphere and SAP plugins
Event Console:
- * New rule feature: automatically delete after action
+ * New rule feature: automatically delete event after actions
Checks & Agents:
- * Add: Memory and Swap for Solaris Agent
- * Add: Monitoring of ESX (VMware) Hosts
+ * solaris_mem: New check for memory and swap for Solaris agent
+ * New special agent agent_vsphere for monitoring ESX (VMware) Hosts
+ via vSphere interface
+ * new special agent agent_random for creating random monitoring data
+
+ WATO:
+ * Configuration of datasource programs via dedicated rules
+
1.2.2b3
Checks & Agents:
diff --git a/doc/treasures/ds_random b/agents/special/agent_random
similarity index 100%
rename from doc/treasures/ds_random
rename to agents/special/agent_random
diff --git a/checks/agent_random b/checks/agent_random
new file mode 100644
index 0000000..6f4d0a2
--- /dev/null
+++ b/checks/agent_random
@@ -0,0 +1,37 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 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-
+# ails. 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.
+
+# {
+# 'tcp_port': 4711,
+# 'secret': 'wef',
+# 'infos': ['hostsystem', 'virtualmachine'],
+# 'user': 'wefwef'
+# }
+
+def agent_random_arguments(params, hostname, ipaddress):
+ return hostname
+
+special_agent_info['random'] = agent_random_arguments
diff --git a/checks/agent_vsphere b/checks/agent_vsphere
index 5c29668..ac403cc 100644
--- a/checks/agent_vsphere
+++ b/checks/agent_vsphere
@@ -31,7 +31,7 @@
# 'user': 'wefwef'
# }
-def agent_vsphere_arguments(params, ipaddress):
+def agent_vsphere_arguments(params, hostname, ipaddress):
args = ''
if "tcp_port" in params:
args += " -p %d" % params["tcp_port"]
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 7a1ff6c..9c95f10 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -1002,7 +1002,7 @@ def get_datasource_program(hostname, ipaddress):
params = host_extra_conf(hostname, ruleset)
if params: # rule match!
# Create command line using the special_agent_info
- cmd_arguments = special_agent_info[agentname](params[0], ipaddress)
+ cmd_arguments = special_agent_info[agentname](params[0], hostname, ipaddress)
return '%s/agent_%s %s' % ( special_agent_dir, agentname, cmd_arguments)
programs = host_extra_conf(hostname, datasource_programs)
diff --git a/web/plugins/wato/datasource_programs.py b/web/plugins/wato/datasource_programs.py
index 621d5e5..ed0b4d1 100644
--- a/web/plugins/wato/datasource_programs.py
+++ b/web/plugins/wato/datasource_programs.py
@@ -82,3 +82,15 @@ register_rule(group,
match = 'first')
+register_rule(group,
+ "special_agents:random",
+ FixedValue(
+ {},
+ title = _("Create random monitoring data"),
+ help = _("By configuring this rule for a host - instead of the normal "
+ "Check_MK agent random monitoring data will be created."),
+ totext = _("No configuration neccessary."),
+ ),
+ match = 'first')
+
+
Module: check_mk
Branch: master
Commit: e26c836337ded8c71b7b5f5da14094f829025632
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e26c836337ded8…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sat Feb 16 19:24:09 2013 +0100
FIX: list of strings (e.g. host list in rule editor) didn't work anymore
---
ChangeLog | 1 +
web/htdocs/js/checkmk.js | 7 +++----
web/htdocs/wato.py | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e2377f3..78c2152 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,7 @@
Multisite:
* FIX: Removed uuid module dependency to be compatible to python < 2.5
* FIX: remove Javascript debug popup from multi-string input fields
+ * FIX: list of strings (e.g. host list in rule editor) didn't work anymore
1.2.2b2:
Checks & Agents:
diff --git a/web/htdocs/js/checkmk.js b/web/htdocs/js/checkmk.js
index cf9fa15..510b2a0 100644
--- a/web/htdocs/js/checkmk.js
+++ b/web/htdocs/js/checkmk.js
@@ -1503,9 +1503,8 @@ function valuespec_toggle_dropdownn(oDropdown, divid) {
/* This function is called after the table with of input elements
has been rendered. It attaches the onFocus-function to the last
- of the input elements. The reason is, that ListOfString does not render
- the input fields itself. This does so other ValueSpec element
- where we have no access to */
+ of the input elements. That function will append another
+ input field as soon as the user focusses the last field. */
function list_of_strings_init(divid) {
var oContainer = document.getElementById(divid);
var numChilds = oContainer.childNodes.length;
@@ -1551,7 +1550,7 @@ function list_of_strings_extend(oInput, j) {
var oNewDiv = document.createElement("DIV");
oNewDiv.innerHTML = oDiv.innerHTML.replace('"' + oldName + '"', '"' + newName + '"');
// IE7 does not have quotes in innerHTML, trying to workaround this here.
- oNewDiv.innerHTML = oDiv.innerHTML.replace('=' + oldName + ' ', '=' + newName + ' ');
+ oNewDiv.innerHTML = oNewDiv.innerHTML.replace('=' + oldName + ' ', '=' + newName + ' ');
oContainer.appendChild(oNewDiv);
/* Move focus function from old last to new last input field */
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 6c19801..eb18733 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -10159,7 +10159,7 @@ def render_conditions(ruleset, tagspecs, host_list, item_list, varname, folder):
if host_list != ALL_HOSTS:
condition = None
if host_list == []:
- condition = _("This rule does <b>never</b> apply!")
+ condition = _("This rule does <b>never</b> apply due to an empty list of explicit hosts!")
elif host_list[-1] != ALL_HOSTS[0]:
tt_list = []
for h in host_list:
Module: check_mk
Branch: master
Commit: ce0393b3b3eb47cd3f4bbfc27c2f781388f56ba1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ce0393b3b3eb47…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Feb 15 14:37:09 2013 +0100
Updated bug entries #0900
---
.bugs/900 | 42 ++++++++++++++++++++++++++++++++----------
1 files changed, 32 insertions(+), 10 deletions(-)
diff --git a/.bugs/900 b/.bugs/900
index 5546662..3dc9cfe 100644
--- a/.bugs/900
+++ b/.bugs/900
@@ -1,12 +1,34 @@
-Title: Make multisite optional username from configured environment vars
+Title: Check_MK does not handle interval_length != 60 correctly
Component: multisite
State: open
-Date: 2013-01-22 14:49:10
-Targetversion: 1.4.0
-Class: feature
-
-For example X_FORWARDED_USER or REMOTE_USER should be usable as "user" within
-multisite. At the moment we only use req.user, which seem only to be set, when
-one really authenticated with the local webserver.
-In case of some reverse proxy setups and single sign on environments, this is
-not possible. Make it configurable, disabled by default!
+Date: 2013-02-15 14:30:58
+Targetversion: future
+Class: nastiness
+
+Reveived via feedback@:
+
+I'm normally using Nagios with the parameter "interval_length" set to
+"1". Despite the warnings in the config file I haven't expected problems
+with Nagios at all after adjusting all relevant parameters to reflect
+this change - but I'm now able to check services at a higher rate then
+only 1 minute.
+
+But IMHO check_mk does not reflect this change when displaying the
+service details. It seems that the values for " Service normal/retry
+check interval" are not correctly multiplied with the configured value
+for "interval_length" but (hardcoded?) with the default value of "60".
+So in my environment all values are too high as by factor 60:
+
+Example given:
+
+interval_length = 1
+
+check_interval = 10--> check every 10 seconds
+
+retry_interval = 3--> retry after 3 seconds
+
+results in display within check_mk GUI:
+
+Service normal/retry check interval600s/180s
+
+It seems to be a bug in the display only, checks are running correctly.