Module: check_mk
Branch: master
Commit: 25fb5bf35a8ccb62039eea129f828c6279502587
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=25fb5bf35a8ccb…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 17 17:27:05 2013 +0100
FIX Trying to prevent problem when restarting mkeventd
In some situation, when restarting the mkeventd, the old process has
been stopped, but when the new process comes up, the builtin syslog
server can not open the port, because it is somehow still opened.
The error message is:
Cannot bind TCP socket for syslog-tcp to port: Address already in use
This change tries to prevent the problem.
---
.werks/384 | 17 +++++++++++++++++
ChangeLog | 1 +
mkeventd/bin/mkeventd | 8 +++++++-
3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/.werks/384 b/.werks/384
new file mode 100644
index 0000000..1827a4a
--- /dev/null
+++ b/.werks/384
@@ -0,0 +1,17 @@
+Title: Trying to prevent problem when restarting mkeventd
+Level: 1
+Component: ec
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387297403
+Targetversion: future
+
+In some situation, when restarting the mkeventd, the old process has
+been stopped, but when the new process comes up, the builtin syslog
+server can not open the port, because it is somehow still opened.
+The error message is:
+
+Cannot bind TCP socket for syslog-tcp to port: Address already in use
+
+This change tries to prevent the problem.
diff --git a/ChangeLog b/ChangeLog
index a50f947..3ab8733 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -103,6 +103,7 @@
* 0304 FIX: Escaping several unwanted chars from incoming log messages...
* 0089 FIX: CSV export of event console was broken...
* 0359 FIX: Fixed exception in event simulator when one match group did not match
+ * 0384 FIX: Trying to prevent problem when restarting mkeventd...
Livestatus:
* 0337 New header for limiting the execution time of a query...
diff --git a/mkeventd/bin/mkeventd b/mkeventd/bin/mkeventd
index 940f2b6..1f11de9 100755
--- a/mkeventd/bin/mkeventd
+++ b/mkeventd/bin/mkeventd
@@ -2366,7 +2366,6 @@ def run_eventd():
time.sleep(1)
-
#.
# .--EventStatus---------------------------------------------------------.
# | _____ _ ____ _ _ |
@@ -3266,6 +3265,13 @@ try:
g_event_server.output_hash_stats()
+ # Closing fds which might be still open
+ for fd in [ opt_syslog_fd, opt_syslog_tcp_fd, opt_snmptrap_fd ]:
+ try:
+ os.close(fd)
+ except:
+ pass
+
log("Successfully shut down.")
os.remove(g_pid_file)
sys.exit(0)
Module: check_mk
Branch: master
Commit: 44250960c0db8dd171bc18d30e312d20a4c6bb67
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=44250960c0db8d…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Tue Dec 17 16:53:45 2013 +0100
fixed typo in werk 245
---
.werks/245 | 2 +-
ChangeLog | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.werks/245 b/.werks/245
index beabc34..d8a5c33 100644
--- a/.werks/245
+++ b/.werks/245
@@ -1,4 +1,4 @@
-Title: Inline SNMP now longer throws an exception when using SNMPv3 credentials
+Title: Inline SNMP no longer throws an exception when using SNMPv3 credentials
Level: 1
Component: checks
Class: fix
diff --git a/ChangeLog b/ChangeLog
index 13ba59a..9ab4e73 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -48,14 +48,14 @@
* 0372 FIX: megaraid_ldisks: Ignoring adapters without configured logical disks...
* 0345 FIX: Linux agent: fix detaching of background plugins...
* 0378 FIX: agent_vsphere.pysphere: Trying to deal with permissions only on some guests/hosts
- * 0245 FIX: Inline SNMP now longer throws an exception when using SNMPv3 credentials...
+ * 0245 FIX: Inline SNMP no longer throws an exception when using SNMPv3 credentials...
* 0380 FIX: jolokia_metrics.mem: PNP-Template now handles non existant max values...
* 0381 FIX: win_printers: Fixed creation of duplicate services...
* 0347 FIX: smart.stats: Remove duplicate disks...
- * 0109 FIX: cisco_fantray: Prevent inventory for not available fans
- * 0110 FIX: cisco_fru_power: Prevent inventory for not available FRUs
* 0349 FIX: winperf.cpuusage: update man page: this check is deprecated
* 0383 FIX: solaris_mem: Is now compatible to more systems...
+ * 0109 FIX: cisco_fantray: Prevent inventory for not available fans
+ * 0110 FIX: cisco_fru_power: Prevent inventory for not available FRUs
Multisite:
* 0371 Added log class filter to hostsvcevents view
Module: check_mk
Branch: master
Commit: 752396a0e7b5285818a3299788fb7fe7d490233e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=752396a0e7b528…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Dec 17 16:23:55 2013 +0100
FIX nfsmounts: correctly handle mount points with spaces
If you have a space in the name of your <b>moint point</b> (not in the name
of the export) then the Linux agent would show this mount point always as
<tt>hanging</tt>. The reason is that in <tt>/proc/mounts</tt> spaces are
displayed as <tt>\040</tt>. This has now been fixed in the agent, which
outputs spaces correctly. Also the according check has been modified so that
it can deal with spaces in the names of the mount points.
---
.werks/350 | 15 +++++++++++++++
ChangeLog | 1 +
agents/check_mk_agent.linux | 1 +
checks/nfsmounts | 16 ++++++++++------
4 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/.werks/350 b/.werks/350
new file mode 100644
index 0000000..f3d4647
--- /dev/null
+++ b/.werks/350
@@ -0,0 +1,15 @@
+Title: nfsmounts: correctly handle mount points with spaces
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387293636
+Targetversion: future
+
+If you have a space in the name of your <b>moint point</b> (not in the name
+of the export) then the Linux agent would show this mount point always as
+<tt>hanging</tt>. The reason is that in <tt>/proc/mounts</tt> spaces are
+displayed as <tt>\040</tt>. This has now been fixed in the agent, which
+outputs spaces correctly. Also the according check has been modified so that
+it can deal with spaces in the names of the mount points.
diff --git a/ChangeLog b/ChangeLog
index c67a9ac..d0b1e3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -56,6 +56,7 @@
* 0383 FIX: solaris_mem: Is now compatible to more systems...
* 0109 FIX: cisco_fantray: Prevent inventory for not available fans
* 0110 FIX: cisco_fru_power: Prevent inventory for not available FRUs
+ * 0350 FIX: nfsmounts: correctly handle mount points with spaces...
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 2f67328..7c24e92 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -138,6 +138,7 @@ then
echo '<<<nfsmounts>>>'
sed -n '/ nfs4\? /s/[^ ]* \([^ ]*\) .*/\1/p' < /proc/mounts |
+ sed 's/\\040/ /g' |
while read MP
do
if [ $STAT_VERSION != $STAT_BROKE ]; then
diff --git a/checks/nfsmounts b/checks/nfsmounts
index 60df36b..e86cfa7 100644
--- a/checks/nfsmounts
+++ b/checks/nfsmounts
@@ -24,22 +24,26 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
+# Example out from agent:
+# <<<nfsmounts>>>
+# /foobar hanging 0 0 0 0
+# /with spaces ok 217492 123563 112515 524288
def inventory_nfsmounts(info):
- return [ (line[0], None) for line in info ]
+ return [ (" ".join(line[:-5]), None) for line in info ]
def check_nfsmounts(item, _no_params, info):
for line in info:
- mountpoint = line[0]
+ mountpoint = " ".join(line[:-5])
if mountpoint == item:
- size_blocks = int(line[2])
- free_blocks = int(line[4]) # for non-root user
- blocksize = int(line[5])
+ size_blocks = int(line[-4])
+ free_blocks = int(line[-2]) # for non-root user
+ blocksize = int(line[-1])
if size_blocks < 0 or free_blocks < 0 or blocksize > 1024*1024:
return (2, "Stale NFS handle")
- if line[1] == 'ok':
+ if line[-5] == 'ok':
gb = 1024 * 1024 * 1024.0
size_gb = (size_blocks * blocksize) / gb
if size_gb == 0:
Module: check_mk
Branch: master
Commit: 7e86b399dce8819bed1235eb16741120d5217c6e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7e86b399dce881…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Dec 17 16:10:42 2013 +0100
cisco_fantray: fixed new syntax error
---
ChangeLog | 4 ++--
checks/cisco_fantray | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 13ba59a..c67a9ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -52,10 +52,10 @@
* 0380 FIX: jolokia_metrics.mem: PNP-Template now handles non existant max values...
* 0381 FIX: win_printers: Fixed creation of duplicate services...
* 0347 FIX: smart.stats: Remove duplicate disks...
- * 0109 FIX: cisco_fantray: Prevent inventory for not available fans
- * 0110 FIX: cisco_fru_power: Prevent inventory for not available FRUs
* 0349 FIX: winperf.cpuusage: update man page: this check is deprecated
* 0383 FIX: solaris_mem: Is now compatible to more systems...
+ * 0109 FIX: cisco_fantray: Prevent inventory for not available fans
+ * 0110 FIX: cisco_fru_power: Prevent inventory for not available FRUs
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/checks/cisco_fantray b/checks/cisco_fantray
index 3ea17e1..6c3fc18 100644
--- a/checks/cisco_fantray
+++ b/checks/cisco_fantray
@@ -30,7 +30,7 @@ def inventory_cisco_fantray(info):
if info and info[0]:
#Some Cisco switches reporting not available fans as down,
#so we cant invenorize fans reported as down
- return [ (line[0], None) for line in info if line[1] != '3'
+ return [ (line[0], None) for line in info if line[1] != '3' ]
def check_cisco_fantray(item, params, info):
for line in info: