Module: check_mk
Branch: master
Commit: 709c67b1c39570bc673eb9164b5f7f377c936f83
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=709c67b1c39570…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Feb 25 11:47:40 2015 +0100
#2017 FIX Solaris-Agent: Prevent hanging agent in uptime section
It happened running on a Solaris 8 zone, on a Solaris 10 LDOM, on Sun/Oracle T5
that the agent hung while processing the <tt>uptime</tt> section of the agent.
Many hanging truss and nawk processes were found, which can lead to a unresponsive
and/or crashed system.
The uptime section generating code has been changed and replaced by another mechanism.
Thanks to Clint Squires for analyzing the problem and providing a fix!
---
.werks/2017 | 17 +++++++++++++++++
ChangeLog | 1 +
agents/check_mk_agent.solaris | 7 +++----
3 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/.werks/2017 b/.werks/2017
new file mode 100644
index 0000000..4301764
--- /dev/null
+++ b/.werks/2017
@@ -0,0 +1,17 @@
+Title: Solaris-Agent: Prevent hanging agent in uptime section
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1424861065
+
+It happened running on a Solaris 8 zone, on a Solaris 10 LDOM, on Sun/Oracle T5
+that the agent hung while processing the <tt>uptime</tt> section of the agent.
+Many hanging truss and nawk processes were found, which can lead to a unresponsive
+and/or crashed system.
+
+The uptime section generating code has been changed and replaced by another mechanism.
+
+Thanks to Clint Squires for analyzing the problem and providing a fix!
diff --git a/ChangeLog b/ChangeLog
index ead8bf0..53b1d87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -190,6 +190,7 @@
* 2033 FIX: check_mk-zfs_arc_cache: add Perf-O-Meter
* 2034 FIX: netapp_api_volumes: added Perf-O-Meter
* 2035 FIX: check_mk-netapp_api_if, check_mk-if_brocade: added missing Perf-O-Meters
+ * 2017 FIX: Solaris-Agent: Prevent hanging agent in uptime section...
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
diff --git a/agents/check_mk_agent.solaris b/agents/check_mk_agent.solaris
index 1bc04d5..7cf46a6 100755
--- a/agents/check_mk_agent.solaris
+++ b/agents/check_mk_agent.solaris
@@ -221,10 +221,9 @@ fi
# /proc/uptime
# Simulated output of Linux /proc/uptime
echo '<<<uptime>>>'
-proc0=$(ls -td /proc/* | tail -1)
-ctime=$(nawk 'BEGIN{print srand()}')
-btime=$(truss -v lstat -t lstat ls -d $proc0 2>&1 | nawk '/ct = /{printf "%d\n", $9}')
-echo $(($ctime - $btime))
+ctime=`nawk 'BEGIN{print srand()}'`;
+btime=`kstat '-p' 'unix:::boot_time' 2>&1|grep 'boot_time'|awk '{print $2}'`;
+echo $(($ctime - $btime));
# NTP
monitoring on hosts which have only piggyback data (e.g. ESX VMs)
Message-ID: <54ed9787.9r/FyiTFgBRZz5eh%lm(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: bc2048f04de76710b77e7f60da0c8809f1509e0c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bc2048f04de767…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Feb 25 10:36:02 2015 +0100
#2016 FIX Fixed service discovery / monitoring on hosts which have only piggyback data (e.g. ESX VMs)
When having hosts configured which have no agent on their own ("No agent" configured via WATO),
but get piggyback data from another host, could not be inventorized. This has been fixed now.
So if you have, for example, an ESX server with several VMs, you configured each VM as host
in WATO and set <i>Agent type</i> to <i>No Agent</i>, you can now discover the services
based on the piggyback data again.
---
.werks/2016 | 15 +++++++++++++++
ChangeLog | 1 +
modules/check_mk_base.py | 22 ++++++++++++++++------
modules/discovery.py | 2 +-
4 files changed, 33 insertions(+), 7 deletions(-)
diff --git a/.werks/2016 b/.werks/2016
new file mode 100644
index 0000000..43c3cbd
--- /dev/null
+++ b/.werks/2016
@@ -0,0 +1,15 @@
+Title: Fixed service discovery / monitoring on hosts which have only piggyback data (e.g. ESX VMs)
+Level: 1
+Component: core
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1424856806
+
+When having hosts configured which have no agent on their own ("No agent" configured via WATO),
+but get piggyback data from another host, could not be inventorized. This has been fixed now.
+
+So if you have, for example, an ESX server with several VMs, you configured each VM as host
+in WATO and set <i>Agent type</i> to <i>No Agent</i>, you can now discover the services
+based on the piggyback data again.
diff --git a/ChangeLog b/ChangeLog
index 33f3b95..ead8bf0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,7 @@
* 2012 FIX: Piggyback hostname translation can now deal correctly with umlauts
* 2014 FIX: Fixed different issues running Check_MK on CentOS 5.x
* 2037 FIX: Inventorize piggy back data even if access to normal agent fails
+ * 2016 FIX: Fixed service discovery / monitoring on hosts which have only piggyback data (e.g. ESX VMs)...
Checks & Agents:
* 1665 agent_netapp: New special agent for NetApp monitoring via Web-API...
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 50d471f..71cf50f 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -528,10 +528,8 @@ def add_persisted_info(hostname, info):
store_persisted_info(hostname, persisted)
-def get_piggyback_info(hostname):
- output = ""
- if not hostname:
- return output
+def get_piggyback_files(hostname):
+ files = []
dir = tmp_dir + "/piggyback/" + hostname
if os.path.exists(dir):
for sourcehost in os.listdir(dir):
@@ -545,9 +543,21 @@ def get_piggyback_info(hostname):
os.remove(file_path)
continue
- verbose("Using piggyback information from host %s.\n" % sourcehost)
+ files.append((sourcehost, file_path))
+ return files
+
+
+def has_piggyback_info(hostname):
+ return get_piggyback_files(hostname) != []
- output += file(file_path).read()
+
+def get_piggyback_info(hostname):
+ output = ""
+ if not hostname:
+ return output
+ for sourcehost, file_path in get_piggyback_files(hostname):
+ verbose("Using piggyback information from host %s.\n" % sourcehost)
+ output += file(file_path).read()
return output
diff --git a/modules/discovery.py b/modules/discovery.py
index 2b1f6dd..78fe93f 100644
--- a/modules/discovery.py
+++ b/modules/discovery.py
@@ -290,7 +290,7 @@ def discover_services(hostname, check_types, use_caches, do_snmp_scan, ipaddress
if check_type not in check_types and check_uses_snmp(check_type):
check_types.append(check_type)
- if is_tcp_host(hostname):
+ if is_tcp_host(hostname) or has_piggyback_info(hostname):
check_types += discoverable_check_types('tcp')
# Make hostname available as global variable in discovery functions
Module: check_mk
Branch: master
Commit: 4178d35c90cf3060e1221fab1cfc9e5c7d77e9c5
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4178d35c90cf30…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Feb 25 10:23:58 2015 +0100
Fixed some English texts
---
mkeventd/web/plugins/visuals/mkeventd.py | 2 +-
web/plugins/wato/active_checks.py | 16 ++++++++--------
web/plugins/wato/check_mk_configuration.py | 2 +-
web/plugins/wato/check_parameters.py | 2 +-
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/mkeventd/web/plugins/visuals/mkeventd.py b/mkeventd/web/plugins/visuals/mkeventd.py
index dd71d4e..bd22cd1 100644
--- a/mkeventd/web/plugins/visuals/mkeventd.py
+++ b/mkeventd/web/plugins/visuals/mkeventd.py
@@ -62,7 +62,7 @@ if mkeventd_enabled:
title = _('Event ID'),
)),
('history_line', Integer(
- title = _('History Line'),
+ title = _('History Line Number'),
)),
]
}
diff --git a/web/plugins/wato/active_checks.py b/web/plugins/wato/active_checks.py
index 507dee3..97683b5 100644
--- a/web/plugins/wato/active_checks.py
+++ b/web/plugins/wato/active_checks.py
@@ -670,7 +670,7 @@ register_rule(group,
TextUnicode(
title = _("Name"),
help = _("Will be used in the service description. If the name starts with "
- "a caret (^), the service description will not be prefixed with HTTP." ),
+ "a caret (<tt>^</tt>), the service description will not be prefixed with <tt>HTTP</tt>." ),
allow_empty = False),
Alternative(
title = _("Mode of the Check"),
@@ -1274,7 +1274,7 @@ def PluginCommandLine(addhelp = ""):
return TextAscii(
title = _("Command line"),
help = _("Please enter the complete shell command including "
- "path name and arguments to execute. You can use Nagios "
+ "path name and arguments to execute. You can use monitoring "
"macros here. The most important are:<ul>"
"<li><tt>$HOSTADDRESS$</tt>: The IP address of the host</li>"
"<li><tt>$HOSTNAME$</tt>: The name of the host</li>"
@@ -1292,12 +1292,12 @@ def PluginCommandLine(addhelp = ""):
register_rule(group,
"custom_checks",
Dictionary(
- title = _("Classical active and passive Nagios checks"),
- help = _("With this ruleset you can configure "classical Nagios checks" "
+ title = _("Classical active and passive Monitoring checks"),
+ help = _("With this ruleset you can configure "classical Monitoring checks" "
"to be executed directly on your monitoring server. These checks "
"will not use Check_MK. It is also possible to configure passive "
- "checks that are fed with data from external sources via the Nagios "
- "command pipe."),
+ "checks that are fed with data from external sources via the "
+ "command pipe of the monitoring core."),
elements = [
( "service_description",
TextUnicode(
@@ -1682,8 +1682,8 @@ register_rule(group,
("duration", Tuple(
title = _("Loop duration"),
elements = [
- Age(title = _("Warning if above or equal")),
- Age(title = _("Critical if above or equal")),
+ Age(title = _("Warning at")),
+ Age(title = _("Critical at")),
])
),
('delete_messages', FixedValue(True,
diff --git a/web/plugins/wato/check_mk_configuration.py b/web/plugins/wato/check_mk_configuration.py
index 282fd13..e7e11bc 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -1280,7 +1280,7 @@ register_configvar(group,
min_value = 1,
default_value = 720),
title = _("Enable regular service discovery checks"),
- help = _("If enabled, Check_MK will create one additional check per host "
+ help = _("If enabled, Check_MK will create one additional service per host "
"that does a regular check, if the service discovery would find new services "
"currently un-monitored.")),
need_restart = True)
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index e0bc39e..a8af24f 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -7646,7 +7646,7 @@ register_check_parameters(
"plug_count",
_("Number of active Plugs"),
Tuple(
- help = _("Levels for the number of active plugs in a devics."),
+ help = _("Levels for the number of active plugs in a device."),
elements = [
Integer(title = _("critical if below or equal"), default_value = 30),
Integer(title = _("warning if below or equal"), default_value = 32),
Module: check_mk
Branch: master
Commit: c0ddbc2a2b0a2c144c88173f768c5cfe184fc931
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c0ddbc2a2b0a2c…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Tue Feb 24 16:39:41 2015 +0100
Added comment
---
checks/temperature.include | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/checks/temperature.include b/checks/temperature.include
index 68177c3..a56c8f2 100644
--- a/checks/temperature.include
+++ b/checks/temperature.include
@@ -262,6 +262,12 @@ def check_temperature(reading, params, dev_unit = "c",
return status, infotext, perfdata
+# Wraps around check_temperature to check a list of sensors.
+# sensorlist is a list of tuples:
+# (subitem, temp, kwargs) or (subitem, temp)
+# where subitem is a string (sensor-id)
+# temp is a string, float or int temperature value
+# and kwargs a dict of keyword arguments for check_temperature
def check_temperature_list(sensorlist, params):