Module: check_mk
Branch: master
Commit: b7f4d7f5e0a20a7419ba1337c27399d742a6e650
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b7f4d7f5e0a20a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jun 6 12:49:24 2012 +0200
FIX: fix error message in case of duplicate custom check
---
ChangeLog | 3 +++
modules/check_mk.py | 6 +++---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index bce515b..9d3a50b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
1.2.0:
+ Core:
+ * FIX: fix error message in case of duplicate custom check
+
WATO:
* FIX: add missing icon on cluster hosts to WATO in Multisite views
* FIX: fix search field in host table if more than 10 hosts are shown
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 77ec754..539f143 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -1869,10 +1869,10 @@ define service {
raise MKGeneralException(
"ERROR: Duplicate service description (custom check)
'%s' for host '%s'!\n"
" - 1st occurrance: checktype = %s, item = %r\n"
- " - 2nd occurrance: checktype = active(%s), item =
None\n" %
- (description, hostname, cn, it, acttype))
+ " - 2nd occurrance: checktype = custom(%s), item =
%r\n" %
+ (description, hostname, cn, it, command_name, description))
else:
- used_descriptions[description] = ( "custom", description )
+ used_descriptions[description] = ( "custom(%s)" % command_name,
description )
template = has_perfdata and "check_mk_perf," or ""
extraconf = extra_service_conf_of(hostname, description)