Module: check_mk
Branch: master
Commit: 0feaa4ade065c6493a694e1e96ba736a81e2163f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0feaa4ade065c6…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Sep 21 13:53:12 2011 +0200
FIX: mk_oracle: fix cache file handling
---
ChangeLog | 5 ++++-
agents/plugins/mk_oracle | 8 +++++---
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f58ccab..0e4a5eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,11 +3,14 @@
* FIX: fix cmk -D on cluster hosts
Checks & Agents:
- * FIX: j4p_performance: fix inventory functions
+ * FIX: j4p_performance: fix inventory functions
+ * FIX: mk_oracle: fix race condition in cache file handling (agent data
+ was missing sections in certain situations)
* mrpe: make check cluster-aware and work as clustered_service
* cups_queues: Run agent part only on directly on CUPS servers,
not on clients
+
Multisite:
* FIX: fix rescheduling of host check
* FIX: fix exception when using status_host while local site is offline
diff --git a/agents/plugins/mk_oracle b/agents/plugins/mk_oracle
index ad0f114..98890fb 100755
--- a/agents/plugins/mk_oracle
+++ b/agents/plugins/mk_oracle
@@ -80,7 +80,11 @@ for SID in $SIDS; do
fi
fi
- # Outputs the contents of the cache file when it exists and is recent enough.
+ # If the cache file exists, output it, regardless of its age. If it's outdated
+ # then it will be recreated *asynchronously*, we the new contents will not
+ # be available here anyway.
+ if [ -s "$CACHE_FILE" ] ; then cat "$CACHE_FILE" ; fi
+
# When not it checks if there is another task to update the cache is running
# at the moment (*.new) file present.
# When the cache is old and there is no *new file present, then start a query
@@ -117,7 +121,5 @@ EOF
fi
} > $CACHE_FILE.new && mv $CACHE_FILE.new $CACHE_FILE || rm -f $CACHE_FILE*
"
- else
- cat "$CACHE_FILE"
fi
done
Module: check_mk
Branch: master
Commit: 37b60e0ddb4fa7549e47bc9941a3957dd1a2aa98
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=37b60e0ddb4fa7…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Sep 16 09:36:28 2011 +0200
Updated bug entries
---
.bugs/375 | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/.bugs/375 b/.bugs/375
new file mode 100644
index 0000000..e689505
--- /dev/null
+++ b/.bugs/375
@@ -0,0 +1,29 @@
+Title: Clusterchecks: make host name available to check
+Component: core
+Benefit: 2
+State: open
+Cost: 2
+Date: 2011-09-16 09:31:24
+Class: feature
+
+Problem: When using cluster checks, the check itself has no
+information, on which node of the cluster a certain check item
+has been found. If we would have that information, we could
+output something like "OK - running on node zbghora10".
+
+We could extend the API for checks in a way, that the check
+can *declare* that it always wants the name of the host as
+an additional (first) column in the info table. This can
+be done with the new dictionary. Checks that are cluster
+aware (ps, df, services) can then use that information and
+display the node (maybe on a configurable basis). Maybe
+we can use None as host name in case the check is not a cluster
+check. That way we omit useless data on non-clustered checks.
+
+Check_MK need then internally to conserve that information
+in case of cluster checks. The logic for the non-cluster-checks
+must not be changed or be degraded in performance.
+
+==> That way the API for the checks keeps compatible and
+we have the "running on" information, which is also usefull
+for BI.
Module: check_mk
Branch: master
Commit: c57a8b1ee6ced657ba334ce35f2620a683d31ede
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c57a8b1ee6ced6…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Sep 16 09:55:56 2011 +0200
mrpe: make check cluster-aware and work as clustered_service
---
ChangeLog | 1 +
checkman/mrpe | 8 ++++++++
checks/mrpe | 18 ++++++++++++++++--
3 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ba572e7..d3c66bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
1.1.12b1:
Checks & Agents:
* FIX: j4p_performance: fix inventory functions
+ * mrpe: make check cluster-aware and work as clustered_service
Multisite:
* FIX: fix rescheduling of host check
diff --git a/checkman/mrpe b/checkman/mrpe
index bfbcf6b..640bb11 100644
--- a/checkman/mrpe
+++ b/checkman/mrpe
@@ -16,6 +16,14 @@ description:
no parameters are needed here. Please refer to the online
documentation on how to configure the agent.
+ The current version of the {mrpe} check is now cluster-aware
+ and works well as a {clustered_service} (see article about
+ Check_MK cluster monitoring). If an MRPE check is found on
+ more than one node, then the best status of the checks is
+ being used. So if the check is critical on one of the nodes
+ and OK on another then the status, output and performance
+ data of the OK check is being used as the gross result of the check.
+
item:
The service description of the check as configured in {mrpe.cfg}
on the target host.
diff --git a/checks/mrpe b/checks/mrpe
index ce6a618..a79eff5 100644
--- a/checks/mrpe
+++ b/checks/mrpe
@@ -38,6 +38,12 @@ def inventory_mrpe(info):
def check_mrpe(item, params, info):
+ # This check is cluster-aware. An item might be found
+ # more than once. In that case we use the best of the
+ # multiple statuses.
+
+ best_state = None
+
for line in info:
if line[0].startswith("("):
check_name = line[0][1:-1]
@@ -65,8 +71,16 @@ def check_mrpe(item, params, info):
# name of check command needed for PNP to choose the correct template
if check_name:
perfdata.append(check_name)
- return (state, output, perfdata)
- return (3, "Check output not found in local checks")
+
+ if best_state in [ None, 2 ] \
+ or (state < best_state and state != 2):
+ best_result = state, output, perfdata
+ best_state = state
+
+ if best_state == None:
+ return (3, "Check output not found in local checks")
+ else:
+ return best_result
check_info['mrpe'] = (
Module: check_mk
Branch: master
Commit: 936206789c6a82c37b20e576497005eb68d6be9f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=936206789c6a82…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Sep 15 17:08:30 2011 +0200
Updated bug entries
---
.bugs/374 | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/.bugs/374 b/.bugs/374
index 67d53cd..72cc862 100644
--- a/.bugs/374
+++ b/.bugs/374
@@ -9,3 +9,6 @@ Class: cleanup
The documentation article about SNMP does not explain how
to setup SNMPv2C (bulkwalk_hosts). This is important!
Refer also to if64 and netapp(without 32).
+
+Also the configvars page say that bulkwalk is the default.
+That is wrong!