Module: check_mk
Branch: master
Commit: 89a8c819663276d73a6f40047fdfe140419c13df
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=89a8c819663276…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Feb 16 14:00:30 2016 +0100
#3216 FIX Fixed exception when trying to edit an already deleted user
---
.werks/3216 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 5 +++++
3 files changed, 16 insertions(+)
diff --git a/.werks/3216 b/.werks/3216
new file mode 100644
index 0000000..9a28a60
--- /dev/null
+++ b/.werks/3216
@@ -0,0 +1,10 @@
+Title: Fixed exception when trying to edit an already deleted user
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1455627596
+
+
diff --git a/ChangeLog b/ChangeLog
index dbd56fc..8f03b1f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -32,6 +32,7 @@
* 3062 FIX: Git integration: Fixed not adding files in WATO folders to git control
* 3203 FIX: Distributed WATO: Fixed exception in remote host service discovery...
* 3215 FIX: WATO git ignore files are now updated on each commit
+ * 3216 FIX: Fixed exception when trying to edit an already deleted user
Event Console:
* 3058 FIX: Event Console is now allowing non loadable MIB modules on startup...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 8c05a28..cb51ddb 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8038,6 +8038,9 @@ def mode_notification_rule(phase, profilemode):
if userid:
users = userdb.load_users(lock = phase == 'action')
+ if userid not in users:
+ raise MKUserError(None, _("The user you are trying to edit "
+ "notification rules for does not exist."))
user = users[userid]
rules = user.setdefault("notification_rules", [])
else:
@@ -10101,6 +10104,8 @@ def mode_edit_user(phase):
users[id] = new_user
else:
id = html.get_unicode_input("edit").strip()
+ if id not in users:
+ raise MKUserError(None, _("The user you are trying to edit does not exist."))
new_user = users[id]
# Full name
Module: check_mk
Branch: master
Commit: 8498ddb2ba7a4ddcbe5696185cfc7b133ea22814
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8498ddb2ba7a4d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Feb 16 13:43:43 2016 +0100
Updated bug entries #2330
---
.bugs/2330 | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/.bugs/2330 b/.bugs/2330
new file mode 100644
index 0000000..35c21a1
--- /dev/null
+++ b/.bugs/2330
@@ -0,0 +1,27 @@
+Title: Cluster should always have only it's nodes as parents
+Component: core
+State: open
+Date: 2016-02-16 13:42:50
+Targetversion: 1.2.9
+Class: bug
+
+bin mir nicht 100% sicher ob es als Bug definiert werden sollte, evtl. übersehe ich einen Use-Case.
+
+Umgebung: CRE 1.2.6p10 auf Centos 7
+
+Ausgangslage:
+Ein WATO Ordner hat einen Host Parent X definiert
+Ein Cluster wird mit den nodes Y und Z in diesem Ordner erstellt.
+
+Ergebnis:
+Das Cluster hat Host X als Parent
+
+Erwartetes Ergebnis:
+Das Cluster hat seine Nodes Y und Z als Parents
+
+Anmerkung:
+Das erwartete Ergebnis kann aktuell erreicht werden, in dem für das Cluster Parents manuell auf einen leeren String gesetzt wird - das sieht eher komisch aus.
+
+----------------------------
+
+Is this really correct for all kind of clusters (with, without IP, ...)?
Module: check_mk
Branch: master
Commit: b07b75035c0ce0e241cf7e5242cb22058fee6680
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b07b75035c0ce0…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Feb 16 13:38:23 2016 +0100
Updated bug entries #2419
---
.bugs/2419 | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/.bugs/2419 b/.bugs/2419
index 4ef7ea2..ae753fd 100644
--- a/.bugs/2419
+++ b/.bugs/2419
@@ -1,9 +1,9 @@
Title: Missing contact group check-mk-notify when never been in WATO
Component: core
-State: open
+Class: bug
+State: works4me
Date: 2016-02-08 15:55:13
Targetversion: 1.2.8
-Class: bug
1. Create a new site in the CEE
2. omd config set CORE nagios
@@ -11,3 +11,6 @@ Class: bug
When you now go in WATO (no need for changing something), it works
out. Seems that the default WATO configuration fixes that.
+
+2016-02-16 13:38:21: changed state open -> works4me
+I can not reproduce this issue with current 1.2.8/master.
Module: check_mk
Branch: master
Commit: 0a2423f18c8570bed5216de05c838de3f2ee2835
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0a2423f18c8570…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Feb 16 13:06:38 2016 +0100
Updated bug entries #2328
---
.bugs/2328 | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/.bugs/2328 b/.bugs/2328
index 4419080..7c9155e 100644
--- a/.bugs/2328
+++ b/.bugs/2328
@@ -1,9 +1,9 @@
Title: Disable SNMP checks for SNMP disabled hosts
Component: core
-State: open
+Class: bug
+State: done
Date: 2016-02-11 09:07:20
Targetversion: 1.2.8
-Class: bug
aktuell ist es so, dass - wenn SNMP checks mal da sind (autochecks, explizit),
der Host auch SNMP machen wird, selbst wenn das per Tag ausgeschaltet ist.
@@ -14,3 +14,5 @@ Beispiel:
Man könnte das in get_check_table() geradeziehen. Dann werden auch die
"no agent" hosts so behandelt, dass dann alle Check_MK-Checks wegfallen.
+
+2016-02-16 13:06:34: changed state open -> done
Module: check_mk
Branch: master
Commit: a369804f3dacae7cb10ae41c2492e20f76f7aed8
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a369804f3dacae…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Feb 16 12:00:33 2016 +0100
#3214 FIX Removing SNMP checks for non SNMP hosts and agent based checks for non agent hosts
When changing the agent type of a host, for example from Agent to SNMP, vice versa or
from Agent+SNMP to only SNMP it could happen that former discovered services of now
disabled protocols were left assigned to a host leading to still contacting the host
with the disabled protocol. This could only be solved by rediscovering the services
of this host.
This has now been changed to disable the services right after next restart/reload of
the core after changing the agent type.
---
.werks/3214 | 17 +++++++++++++++++
ChangeLog | 1 +
modules/check_mk.py | 17 +++++++++++++++++
3 files changed, 35 insertions(+)
diff --git a/.werks/3214 b/.werks/3214
new file mode 100644
index 0000000..3598863
--- /dev/null
+++ b/.werks/3214
@@ -0,0 +1,17 @@
+Title: Removing SNMP checks for non SNMP hosts and agent based checks for non agent hosts
+Level: 2
+Component: core
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1455620283
+
+When changing the agent type of a host, for example from Agent to SNMP, vice versa or
+from Agent+SNMP to only SNMP it could happen that former discovered services of now
+disabled protocols were left assigned to a host leading to still contacting the host
+with the disabled protocol. This could only be solved by rediscovering the services
+of this host.
+
+This has now been changed to disable the services right after next restart/reload of
+the core after changing the agent type.
diff --git a/ChangeLog b/ChangeLog
index 891c6d3..674b421 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
1.2.9i1:
Core & Setup:
* 3193 FIX: Fixed fake check results for hosts...
+ * 3214 FIX: Removing SNMP checks for non SNMP hosts and agent based checks for non agent hosts...
Checks & Agents:
* 3183 aruba_wlc_aps: new check which monitors the provisioned accesspoints of an Aruba Network WLAN Controller
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 447e697..92b5434 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -506,6 +506,16 @@ def output_check_info():
def active_check_service_description(act_info, params):
return sanitize_service_description(act_info["service_description"](params).replace('$HOSTNAME$', g_hostname))
+
+def is_snmp_check(check_name):
+ return check_name in snmp_info
+
+
+def is_tcp_check(check_name):
+ return check_name in check_info \
+ and check_name not in snmp_info
+
+
#.
# .--Hosts---------------------------------------------------------------.
# | _ _ _ |
@@ -1814,6 +1824,13 @@ def get_check_table(hostname, remove_duplicates=False, use_cache=True, world='co
elif hostlist != []:
raise MKGeneralException("Invalid entry '%r' in check table. Must be single hostname or list of hostnames" % hostlist)
+ # Skip SNMP checks for non SNMP hosts (might have been discovered before with other
+ # agent setting. Remove them without rediscovery). Same for agent based checks.
+ if not is_snmp_host(hostname) and is_snmp_check(checkname):
+ return
+ if not is_tcp_host(hostname) and is_tcp_check(checkname):
+ return
+
if hosttags_match_taglist(hosttags, tags) and \
in_extraconf_hostlist(hostlist, hostname):
descr = service_description(hostname, checkname, item)