Module: check_mk
Branch: master
Commit: 5732ae04f10fa2dbaeee0b0f95cec49f42249f2a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5732ae04f10fa2…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Dec 28 17:03:50 2011 +0100
cmk -R/O: use omd re{start,load} core
---
.bugs/89 | 7 +++++--
.bugs/97 | 7 +++++--
ChangeLog | 1 +
modules/check_mk.py | 8 ++++++--
4 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/.bugs/89 b/.bugs/89
index 624b6d4..20580d0 100644
--- a/.bugs/89
+++ b/.bugs/89
@@ -1,12 +1,15 @@
Title: Re-Enable StatsGroupBy deprecated warning (1.2i1)
Component: livestatus
+State: done
+Class: cleanup
Benefit: 1
-State: open
Cost: 1
Date: 2011-01-05 10:33:21
-Class: cleanup
Targetversion: 1.2.0
StatsGroupBy ist deprecated. Die Warnung dazu erst ab 1.2i1 aktivieren:
src/Query.cc:442
+
+2011-12-28 16:57:33: changed state open -> done
+Is already enabled sind a couple of versions.
diff --git a/.bugs/97 b/.bugs/97
index 1fab09d..7182df8 100644
--- a/.bugs/97
+++ b/.bugs/97
@@ -1,10 +1,10 @@
Title: Restart nagios on OMD - use OMD method
Component: core
+State: done
+Class: cleanup
Benefit: 1
-State: open
Cost: 2
Date: 2011-01-22 13:53:40
-Class: cleanup
Targetversion: 1.2.0
When doing a restart of Nagios or a config check while running
@@ -19,3 +19,6 @@ makes 'omd restart core' work in the first place.
--> better wait a time until all Check_MK users surely use
OMD versions that have that fix.
+
+2011-12-28 17:03:08: changed state open -> done
+Check_MK now uses omd re{start,load} core if OMD is used.
diff --git a/ChangeLog b/ChangeLog
index 42f327c..a54e183 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
1.1.13i3:
Core, Setup, etc.:
* cmk -d does now honor --cache and --no-tcp
+ * cmk -O/-R now uses omd re{start,load} core if using OMD
Checks & Agents:
* Windows agent: output eventlog texts in UTF-8 encoding. This
diff --git a/modules/check_mk.py b/modules/check_mk.py
index e90115a..d90ea9e 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -3635,12 +3635,16 @@ def do_restart_nagios(only_reload):
action = only_reload and "load" or "start"
sys.stdout.write("Re%sing Nagios..." % action)
sys.stdout.flush()
- command = nagios_startscript + " re%s 2>&1" % action
+ if omd_root:
+ command = "omd re%s core 2>&1" % action
+ else:
+ command = nagios_startscript + " re%s 2>&1" % action
+
process = os.popen(command, "r")
output = process.read()
if process.close():
sys.stdout.write("ERROR: %s\n" % output)
- raise MKGeneralException("Cannot re%s Nagios: %s" % (action, output))
+ raise MKGeneralException("Cannot re%s the monitoring core: %s" %
(action, output))
else:
sys.stdout.write(tty_ok + "\n")