Module: check_mk
Branch: master
Commit: 1ebd0270923d06e923d59398d94e57c7fc3b51cf
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1ebd0270923d06…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Mon Feb 15 15:29:05 2016 +0100
#3075 FIX windows agent: fixed data encryption of realtime updates were incompatible
The windows agent used sha-1 hashes to derive the key/iv-pair from the pass phrase while check_mk
and the linux agent use md5
---
.werks/3075 | 11 +++++++++++
ChangeLog | 1 +
agents/windows/Crypto.h | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/3075 b/.werks/3075
new file mode 100644
index 0000000..fcc0db9
--- /dev/null
+++ b/.werks/3075
@@ -0,0 +1,11 @@
+Title: windows agent: fixed data encryption of realtime updates were incompatible
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1455546420
+
+The windows agent used sha-1 hashes to derive the key/iv-pair from the pass phrase while check_mk
+and the linux agent use md5
diff --git a/ChangeLog b/ChangeLog
index b3243d5..39197c4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
* 3073 FIX: windows agent: relative paths to mrpe scripts are now treated as relative to the agent installation directory...
* 3061 FIX: mk_jolokia: Fixed debugging of the agent plugin
* 3074 FIX: windows agent: fixed incorrect values for 32-bit performance counters
+ * 3075 FIX: windows agent: fixed data encryption of realtime updates were incompatible...
Multisite:
* 3059 FIX: Fixed highlighting of availability timeline time slices
diff --git a/agents/windows/Crypto.h b/agents/windows/Crypto.h
index c202b74..6400fd8 100644
--- a/agents/windows/Crypto.h
+++ b/agents/windows/Crypto.h
@@ -14,7 +14,7 @@ private:
// algorithm can't currently be changed
static const ALG_ID DEFAULT_ALGORITHM = CALG_AES_256;
- static const ALG_ID HASH_ALGORITHM = CALG_SHA1;
+ static const ALG_ID HASH_ALGORITHM = CALG_MD5;
enum KeyLength {
KEY_LEN_DEFAULT = 0,
Module: check_mk
Branch: master
Commit: 0da2a6f721da8496a2132ec45f9f154f1479f89e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0da2a6f721da84…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Feb 15 13:28:09 2016 +0100
#3062 FIX Git integration: Fixed not adding files in WATO folders to git control
---
.werks/3062 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/watolib.py | 38 ++++++++++++++++++++++++--------------
3 files changed, 35 insertions(+), 14 deletions(-)
diff --git a/.werks/3062 b/.werks/3062
new file mode 100644
index 0000000..faf5e02
--- /dev/null
+++ b/.werks/3062
@@ -0,0 +1,10 @@
+Title: Git integration: Fixed not adding files in WATO folders to git control
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1455539260
+
+
diff --git a/ChangeLog b/ChangeLog
index 567caee..9330266 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,7 @@
WATO:
* 3060 FIX: Folder properties: Fixed exception when a user has no alias set...
+ * 3062 FIX: Git integration: Fixed not adding files in WATO folders to git control
Event Console:
* 3058 FIX: Event Console is now allowing non loadable MIB modules on startup...
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index 7753c29..da601a7 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -4247,25 +4247,13 @@ def do_git_commit():
git_command(["config", "user.email", "check_mk"])
git_command(["config", "user.name", "check_mk"])
- # Make sure that .gitignore-files are present and uptodate
- file(defaults.default_config_dir + "/.gitignore", "w").write(
- "*\n"
- "!*.d\n"
- "!.gitignore\n"
- "*swp\n"
- "*.mk.new\n")
- for subdir in os.listdir(defaults.default_config_dir):
- if subdir.endswith(".d"):
- file(defaults.default_config_dir + "/" + subdir + "/.gitignore", "w").write(
- "*\n"
- "!wato\n"
- "!wato/*\n")
+ write_gitignore_files()
git_command(["add", ".gitignore", "*.d/wato"])
git_command(["commit", "--untracked-files=no", "--author", author, "-m", shell_quote(_("Initialized GIT for Check_MK"))])
# Only commit, if something is changed
- if os.popen("cd '%s' && git status --untracked-files=no --porcelain" % defaults.default_config_dir).read().strip():
+ if os.popen("cd '%s' && git status --porcelain" % defaults.default_config_dir).read().strip():
git_command(["add", "*.d/wato"])
message = ", ".join(g_git_messages)
if not message:
@@ -4273,6 +4261,28 @@ def do_git_commit():
git_command(["commit", "--author", author, "-m", shell_quote(message)])
+# Make sure that .gitignore-files are present and uptodate. Only files below the "wato" directories
+# should be under git control. The files in etc/check_mk/*.mk should not be put under control.
+#
+# FIXME TODO: Should also be written on regular commits to make it possible to update the files
+def write_gitignore_files():
+ file(defaults.default_config_dir + "/.gitignore", "w").write(
+ "*\n"
+ "!*.d\n"
+ "!.gitignore\n"
+ "*swp\n"
+ "*.mk.new\n")
+
+ for subdir in os.listdir(defaults.default_config_dir):
+ if subdir.endswith(".d"):
+ file(defaults.default_config_dir + "/" + subdir + "/.gitignore", "w").write(
+ "*\n"
+ "!wato\n")
+
+ if os.path.exists(defaults.default_config_dir + "/" + subdir + "/wato"):
+ file(defaults.default_config_dir + "/" + subdir + "/wato/.gitignore", "w").write("!*\n")
+
+
# Make sure that the user is in all of cgs contact groups.
# This is needed when the user assigns contact groups to
# objects. He may only assign such groups he is member himself.
Module: check_mk
Branch: master
Commit: 74af26f478997fcfbab887e1aa8ca4424b2b6dd7
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=74af26f478997f…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Mon Feb 15 11:42:13 2016 +0100
Updated bug entries #2360
---
.bugs/2360 | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/.bugs/2360 b/.bugs/2360
index 7ab250a..bf19902 100644
--- a/.bugs/2360
+++ b/.bugs/2360
@@ -1,11 +1,14 @@
Title: "Fake check results" on hosts doesn't work
Component: multisite
-Class: bug
-State: works4me
+State: done
Date: 2015-08-31 16:26:06
Targetversion: 1.2.7
+Class: bug
The "Fake check results" feature on hosts allows to set the status of the host to "up", "down" or "unreachable" but this has no effect, the host status stays as it was.
2016-01-19 12:39:14: changed state open -> works4me
Works for me. Could be be cause of Smart PING that updates the
state *really* fast.
+
+2016-02-15 11:41:24: changed state works4me -> done
+The core handled check results in a slightly inconsisten way, this has been fixed. Furthermore, the "Fake check results" on hosts GUI has been adapted to reflect the fact that you can't force a host to the "down" state.
Module: check_mk
Branch: master
Commit: fc31b7b8f157cd86e6bae87cf6f1b3fca2679f0a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fc31b7b8f157cd…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Feb 15 11:38:59 2016 +0100
Claned up duplicated code with events.py
---
modules/notify.py | 91 -----------------------------------------------------
1 file changed, 91 deletions(-)
diff --git a/modules/notify.py b/modules/notify.py
index 03b4456..995423c 100644
--- a/modules/notify.py
+++ b/modules/notify.py
@@ -1501,97 +1501,6 @@ def call_bulk_notification_script(plugin, context_text):
# | Functions dealing with loading, storing and converting contexts. |
# '----------------------------------------------------------------------'
-# Add a few further helper variables that are usefull in notification plugins
-def complete_raw_context(raw_context):
- raw_context["WHAT"] = raw_context.get("SERVICEDESC") and "SERVICE" or "HOST"
- raw_context["MONITORING_HOST"] = socket.gethostname()
- raw_context["LOGDIR"] = notification_logdir
- if omd_root:
- raw_context["OMD_ROOT"] = omd_root
- raw_context["OMD_SITE"] = os.getenv("OMD_SITE", "")
- raw_context["MAIL_COMMAND"] = notification_mail_command
-
- # The Check_MK Micro Core sends the MICROTIME and no other time stamps. We add
- # a few Nagios-like variants in order to be compatible
- if "MICROTIME" in raw_context:
- microtime = int(raw_context["MICROTIME"])
- timestamp = float(microtime) / 1000000.0
- broken = time.localtime(timestamp)
- raw_context["DATE"] = time.strftime("%Y-%m-%d", broken)
- raw_context["SHORTDATETIME"] = time.strftime("%Y-%m-%d %H:%M:%S", broken)
- raw_context["LONGDATETIME"] = time.strftime("%a %b %d %H:%M:%S %Z %Y", broken)
-
- raw_context['HOSTURL'] = '/check_mk/index.py?start_url=%s' % \
- urlencode('view.py?view_name=hoststatus&host=%s' % raw_context['HOSTNAME'])
- if raw_context['WHAT'] == 'SERVICE':
- raw_context['SERVICEURL'] = '/check_mk/index.py?start_url=%s' % \
- urlencode('view.py?view_name=service&host=%s&service=%s' %
- (raw_context['HOSTNAME'], raw_context['SERVICEDESC']))
-
- # Relative Timestamps for several macros
- for macro in [ 'LASTHOSTSTATECHANGE', 'LASTSERVICESTATECHANGE', 'LASTHOSTUP', 'LASTSERVICEOK' ]:
- if macro in raw_context:
- raw_context[macro + '_REL'] = get_readable_rel_date(raw_context[macro])
-
-
- # Rule based notifications enabled? We might need to complete a few macros
- contact = raw_context.get("CONTACTNAME")
- if not contact or contact == "check-mk-notify":
- add_rulebased_macros(raw_context)
-
- # For custom notifications the number is set to 0 by the core (Nagios and CMC). We force at least
- # number 1 here, so that rules with conditions on numbers do not fail (the minimum is 1 here)
- for what in [ "HOST", "SERVICE" ]:
- key = what + "NOTIFICATIONNUMBER"
- if key in raw_context and raw_context[key] == "0":
- raw_context[key] = "1"
-
- # Add the previous hard state. This is neccessary for notification rules that depend on certain transitions,
- # like OK -> WARN (but not CRIT -> WARN). The CMC sends PREVIOUSHOSTHARDSTATE and PREVIOUSSERVICEHARDSTATE.
- # Nagios does not have this information and we try to deduct this.
- if "PREVIOUSHOSTHARDSTATE" not in raw_context and "LASTHOSTSTATE" in raw_context:
- prev_state = raw_context["LASTHOSTSTATE"]
- # When the attempts are > 1 then the last state could be identical with
- # the current one, e.g. both critical. In that case we assume the
- # previous hard state to be OK.
- if prev_state == raw_context["HOSTSTATE"]:
- prev_state = "UP"
- elif "HOSTATTEMPT" not in raw_context or \
- ("HOSTATTEMPT" in raw_context and raw_context["HOSTATTEMPT"] != "1"):
- # Here We do not know. The transition might be OK -> WARN -> CRIT and
- # the initial OK is completely lost. We use the artificial state "?"
- # here, which matches all states and makes sure that when in doubt a
- # notification is being sent out. But when the new state is UP, then
- # we know that the previous state was a hard state (otherwise there
- # would not have been any notification)
- if raw_context["HOSTSTATE"] != "UP":
- prev_state = "?"
- notify_log("Previous host hard state not known. Allowing all states.")
- raw_context["PREVIOUSHOSTHARDSTATE"] = prev_state
-
- # Same for services
- if raw_context["WHAT"] == "SERVICE" and "PREVIOUSSERVICEHARDSTATE" not in raw_context:
- prev_state = raw_context["LASTSERVICESTATE"]
- if prev_state == raw_context["SERVICESTATE"]:
- prev_state = "OK"
- elif "SERVICEATTEMPT" not in raw_context or \
- ("SERVICEATTEMPT" in raw_context and raw_context["SERVICEATTEMPT"] != "1"):
- if raw_context["SERVICESTATE"] != "OK":
- prev_state = "?"
- notify_log("Previous service hard state not known. Allowing all states.")
- raw_context["PREVIOUSSERVICEHARDSTATE"] = prev_state
-
- # Add short variants for state names (at most 4 characters)
- for key, value in raw_context.items():
- if key.endswith("STATE"):
- raw_context[key[:-5] + "SHORTSTATE"] = value[:4]
-
- if raw_context["WHAT"] == "SERVICE":
- raw_context['SERVICEFORURL'] = urllib.quote(raw_context['SERVICEDESC'])
- raw_context['HOSTFORURL'] = urllib.quote(raw_context['HOSTNAME'])
-
- convert_context_to_unicode(raw_context)
-
# Be aware: The backlog.mk contains the raw context which has not been decoded
# to unicode yet. It contains raw encoded strings e.g. the plugin output provided
# by third party plugins which might be UTF-8 encoded but can also be encoded in