Module: check_mk
Branch: master
Commit: dc11ebaecce53bd32b88d2c27c095e321a8909c1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dc11ebaecce53b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Dec 9 11:32:39 2014 +0100
#1725 The get_average() function from now on only returns one argument: the average
Note to all developers of checks that use <tt>get_average()</tt>: In order to simplify
the check API the function <tt>get_average()</tt> from now on does not return
the additional <tt>timedif</tt> value anymore - just the rate. Please check your checks
for the usage of this function.
---
.werks/1725 | 12 ++++++++++++
ChangeLog | 2 ++
checks/adva_fsp_temp | 2 +-
checks/brocade_fcport | 8 ++++----
checks/cisco_qos | 2 +-
checks/cpu_util.include | 2 +-
checks/df.include | 2 +-
checks/diskstat.include | 2 +-
checks/fc_port | 8 ++++----
checks/if.include | 2 +-
checks/innovaphone_priports_l1 | 2 +-
checks/mem | 2 +-
checks/mem.include | 2 +-
checks/netapp_fcpio | 4 ++--
checks/ps.include | 2 +-
checks/statgrab_disk | 3 ++-
checks/win_dhcp_pools | 5 +----
modules/check_mk_base.py | 9 ++-------
18 files changed, 39 insertions(+), 32 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=dc11ebaecc…
Module: check_mk
Branch: master
Commit: e4cfb35830dd7051ee67ea203ac54ce34144ade5
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e4cfb35830dd70…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 9 11:12:52 2014 +0100
#1731 FIX ipmi_sensors: Fixed agent part when ipmi-sensors call on first agent run
The agent code always failed when ipmi-sensors is executed with --sdr-cache-directory /var/cache
for the first time using the agent. This happens because the code tries to create
a locked file within the directory /var/cache/.freeipmi/sdr-cache while this directory
does not exists. The agent now ensures the existance of this directory.
---
.werks/1731 | 12 ++++++++++++
ChangeLog | 1 +
agents/check_mk_agent.linux | 3 +++
3 files changed, 16 insertions(+)
diff --git a/.werks/1731 b/.werks/1731
new file mode 100644
index 0000000..14de233
--- /dev/null
+++ b/.werks/1731
@@ -0,0 +1,12 @@
+Title: ipmi_sensors: Fixed agent part when ipmi-sensors call on first agent run
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1418119634
+Class: fix
+
+The agent code always failed when ipmi-sensors is executed with --sdr-cache-directory /var/cache
+for the first time using the agent. This happens because the code tries to create
+a locked file within the directory /var/cache/.freeipmi/sdr-cache while this directory
+does not exists. The agent now ensures the existance of this directory.
diff --git a/ChangeLog b/ChangeLog
index 611d2c2..554758a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -141,6 +141,7 @@
* 1728 FIX: cisco_temp_perf: Not inventorized anymore for hosts supporting cisco_temp_sensor
* 1729 FIX: apc_symmetra_test: Cleaned up check, fixed exception when self test date is zero
* 1730 FIX: apc_symmetra: Fixed exception when last diagnose date was not known
+ * 1731 FIX: ipmi_sensors: Fixed agent part when ipmi-sensors call on first agent run...
Multisite:
* 1508 Allow input of plugin output and perfdata when faking check results...
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 0a6eca1..a3c63f1 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -306,6 +306,9 @@ then
else
IPMI_FORMAT=""
fi
+ # On first run, before ipmi-sensors was first executed, the base directory is not
+ # available. Make sure it exists, otherwise the following subshell creation will fail
+ mkdir -p "$sdcache"
# Aquire lock with flock in order to avoid multiple runs of ipmi-sensors
# in case of parallel or overlapping calls of the agent.
(