Module: check_mk
Branch: master
Commit: 778aaf7e4b1859d329e6fe3811c96634258b8f2f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=778aaf7e4b1859…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Dec 17 19:20:55 2013 +0100
FIX local: Catch invalid state codes and map to 3 (UNKNOWN)
If the the state of a line of the <tt>local</tt> section is
not in the allowed range (from <tt>0</tt> to <tt>3</tt>) then
we now assume <tt>3</tt>. Up to now Check_MK ran into an exception.
---
.werks/351 | 12 ++++++++++++
ChangeLog | 1 +
checks/local | 3 +++
3 files changed, 16 insertions(+)
diff --git a/.werks/351 b/.werks/351
new file mode 100644
index 0000000..7f435f8
--- /dev/null
+++ b/.werks/351
@@ -0,0 +1,12 @@
+Title: local: Catch invalid state codes and map to 3 (UNKNOWN)
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387304385
+Targetversion: future
+
+If the the state of a line of the <tt>local</tt> section is
+not in the allowed range (from <tt>0</tt> to <tt>3</tt>) then
+we now assume <tt>3</tt>. Up to now Check_MK ran into an exception.
diff --git a/ChangeLog b/ChangeLog
index 56b1574..4d07915 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -59,6 +59,7 @@
* 0110 FIX: cisco_fru_power: Prevent inventory for not available FRUs
* 0350 FIX: nfsmounts: correctly handle mount points with spaces...
* 0387 FIX: df*: Negative filesystem space levels get a more clear text in check output...
+ * 0351 FIX: local: Catch invalid state codes and map to 3 (UNKNOWN)...
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/checks/local b/checks/local
index 605bd9a..0d910c5 100644
--- a/checks/local
+++ b/checks/local
@@ -116,6 +116,9 @@ def check_local(item, params, info):
output = ", ".join(texts)
else:
state = int(statechar)
+ if state not in range(0, 4):
+ output += ", local check has sent invalid state %d" % state
+ state = 3
return (state, output, perfdata)
return (3, "Check output not found in local checks")
Module: check_mk
Branch: master
Commit: 81be907ddae09c4084fc4f8bbd1bb609d5ebfe9a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=81be907ddae09c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 17 19:18:01 2013 +0100
Updated bug entries #0891
---
.bugs/891 | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/.bugs/891 b/.bugs/891
index 942daaa..f862549 100644
--- a/.bugs/891
+++ b/.bugs/891
@@ -1,10 +1,13 @@
Title: Optical representation of regex field
Component: wato
-State: open
+Class: nastiness
+State: wontfix
Date: 2013-06-03 14:23:08
Targetversion: 1.4.0
-Class: nastiness
I think we should hilite regex inputs fields optically and
maybe also validate them. This can prevent regex errors
deeply in the Check_MK code generation.
+
+2013-12-17 19:17:54: changed state open -> wontfix
+We have no idea how to highlight this in an intuitive way.
Module: check_mk
Branch: master
Commit: 0ba26e0896efeebf9f1f7da7f09a6323eb688da3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0ba26e0896efee…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 17 18:52:03 2013 +0100
Updated bug entries #0899
---
.bugs/899 | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/.bugs/899 b/.bugs/899
index 1081fd5..d7dd493 100644
--- a/.bugs/899
+++ b/.bugs/899
@@ -1,12 +1,15 @@
Title: LDAP - removing users.mk and keeping contacts.mk switches all users to htpasswd related
Component: multisite
-State: open
+Class: nastiness
+State: wontfix
Date: 2013-02-08 09:26:24
Targetversion: 1.2.2
-Class: nastiness
The fact that a user belongs to the ldap connector is stored in the
users.mk. When one deletes the users.mk and leaves the roles.mk untouched
all users are converted to "htpasswd" users. This might be ok, since the
removal of files is a inner modification, but we could easily add a
field to the contacts.mk which also marks the users as ldap users.
+
+2013-12-17 18:52:00: changed state open -> wontfix
+Is ok.
Module: check_mk
Branch: master
Commit: c461f250254c303059febda45ef4e419e5f184dc
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c461f250254c30…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 17 18:40:37 2013 +0100
Added all active checks to check_mk -L output
check_mk -L did list all tcp and snmp based check, but the
active checks were missing. They have been added now.
---
.bugs/1084 | 7 +++++--
.bugs/827 | 7 +++++--
.bugs/920 | 7 +++++--
.werks/386 | 12 ++++++++++++
ChangeLog | 1 +
modules/check_mk.py | 33 ++++++++++++++++++++++++---------
6 files changed, 52 insertions(+), 15 deletions(-)
diff --git a/.bugs/1084 b/.bugs/1084
index 8a0f62f..e2e8e69 100644
--- a/.bugs/1084
+++ b/.bugs/1084
@@ -1,9 +1,12 @@
Title: cmk -L should also list active checks
Component: checks
-State: open
+Class: nastiness
+State: done
Date: 2013-11-15 08:23:05
Targetversion: future
-Class: nastiness
cmk -L should not only list Check_MK based checks but also active
checks that can be configured via Check_MK, like check_http.
+
+2013-12-17 18:39:29: changed state open -> done
+Added active checks to -L output and improved formating of that table
diff --git a/.bugs/827 b/.bugs/827
index ea9f8d9..3ccb785 100644
--- a/.bugs/827
+++ b/.bugs/827
@@ -1,9 +1,9 @@
Title: Wato Folder creation from non admins
Component: wato
-State: open
+Class: nastiness
+State: done
Date: 2013-04-08 14:53:45
Targetversion: 1.2.3
-Class: nastiness
Ich/mein User ist nicht admin, hat aber Rechte im WATO-Ordner
Ich lege einen neuen WATO-Unterordner an, ohne dass ich spezielle
@@ -13,3 +13,6 @@ keine Rechte darauf.
Dies ist aber lediglich ein Anzeigefehler... ein Page-Reload reicht
schon... das Schloss verschwindet und die Vererbten Permissions werden
angezeigt - alles paletti!
+
+2013-12-17 18:17:46: changed state open -> done
+This should have been solved today.
diff --git a/.bugs/920 b/.bugs/920
index 59f474c..4a2b825 100644
--- a/.bugs/920
+++ b/.bugs/920
@@ -1,9 +1,9 @@
Title: Implement paged ldap search to fix problems with response size limits
Component: multisite
-State: open
+Class: nastiness
+State: done
Date: 2013-04-29 10:22:57
Targetversion: 1.2.3
-Class: nastiness
At the moment we have only implemented a simple ldap search. In some directories,
like active directory it leads into a SIZE_LIMIT_EXCEEDED exception when
@@ -11,3 +11,6 @@ a query results in more than 1000 response objects.
The solution here is to implement a paged ldap search. An example can be
seen here: http://www.novell.com/coolsolutions/tip/18274.html
+
+2013-12-17 18:15:52: changed state open -> done
+This has already been implemented a long time ago.
diff --git a/.werks/386 b/.werks/386
new file mode 100644
index 0000000..1808b98
--- /dev/null
+++ b/.werks/386
@@ -0,0 +1,12 @@
+Title: Added all active checks to check_mk -L output
+Level: 1
+Component: core
+Class: feature
+State: unknown
+Version: 1.2.5i1
+Date: 1387301984
+Targetversion: future
+
+check_mk -L did list all tcp and snmp based check, but the
+active checks were missing. They have been added now.
+
diff --git a/ChangeLog b/ChangeLog
index b3e0cb5..10f03c4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
1.2.5i1:
Core & Setup:
+ * 0386 Added all active checks to check_mk -L output...
* 0087 FIX: Fixed possible locking issue when using datasource program with long output...
* 0313 FIX: Avoid duplicate reading of configuration file on --create-rrd...
* 0379 FIX: check_mk -c: Now also rewrites the location of conf.d directory
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 5156294..0db56b6 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -450,30 +450,45 @@ if __name__ == "__main__":
def output_check_info():
print "Available check types:"
print
- print " plugin perf- in- "
- print "Name type data vent. service description"
+ print " plugin perf- in- "
+ print "Name type data vent. service description"
print "-------------------------------------------------------------------------"
- checks_sorted = check_info.items()
+ checks_sorted = check_info.items() + active_check_info.items()
checks_sorted.sort()
for check_type, check in checks_sorted:
try:
+ if 'command_line' in check:
+ what = 'active'
+ ty_color = tty_blue
+ elif check_uses_snmp(check_type):
+ what = 'snmp'
+ ty_color = tty_magenta
+ else:
+ what = 'tcp'
+ ty_color = tty_yellow
+
if check.get("has_perfdata", False):
p = tty_green + tty_bold + "yes" + tty_normal
else:
p = "no"
- if check["inventory_function"] == None:
+
+ if what == 'active':
+ i = '-'
+ elif check["inventory_function"] == None:
i = "no"
else:
i = tty_blue + tty_bold + "yes" + tty_normal
- if check_uses_snmp(check_type):
- typename = tty_magenta + "snmp" + tty_normal
+ if what == 'active':
+ descr = '-'
else:
- typename = tty_yellow + "tcp " + tty_normal
+ descr = check["service_description"]
- print (tty_bold + "%-19s" + tty_normal + " %s %-3s %-3s %s") % \
- (check_type, typename, p, i, check["service_description"])
+ print (tty_bold + "%-32s" + tty_normal
+ + ty_color + " %-6s " + tty_normal
+ + " %-3s %-3s %s") % \
+ (check_type, what, p, i, descr)
except Exception, e:
sys.stderr.write("ERROR in check_type %s: %s\n" % (check_type, e))
Module: check_mk
Branch: master
Commit: a552864db3cbd7a2b1138f5955474ace7fecbaa9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a552864db3cbd7…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 17 18:14:55 2013 +0100
Updated bug entries #2101
---
.bugs/2101 | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/.bugs/2101 b/.bugs/2101
new file mode 100644
index 0000000..45e4203
--- /dev/null
+++ b/.bugs/2101
@@ -0,0 +1,9 @@
+Title: sidebar content is missing space at bottom
+Component: multisite
+State: open
+Date: 2013-12-17 18:13:50
+Targetversion: future
+Class: nastiness
+
+The sidebar height is set too low. There should really be a space below
+the last snapin to have some small border like 5px.
Module: check_mk
Branch: master
Commit: dc420d2063664a53ba87d2cb44a7863cb75a6e65
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dc420d2063664a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 17 17:37:53 2013 +0100
Updated bug entries #0665, #0897
---
.bugs/665 | 7 +++++--
.bugs/897 | 8 ++++++--
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/.bugs/665 b/.bugs/665
index 5b2ce95..1512d1d 100644
--- a/.bugs/665
+++ b/.bugs/665
@@ -1,9 +1,9 @@
Title: Makefiles von REDHAT/CENTOS 6.4 - Missing packages
Component: core
-State: open
+Class: nastiness
+State: works4me
Date: 2013-03-19 11:28:02
Targetversion: 1.2.3
-Class: nastiness
The following packages need to be installed manually after ./configure has been called
xorg-x11-server-Xvfb
@@ -12,3 +12,6 @@ They are only set in OS_PACKAGES, but probably needed in BUILD_PACKAGES
But what happens if they are missing? Are they needed during compilation?
+
+2013-12-17 17:31:47: changed state open -> works4me
+I see no reason why this should result in a problem. Please provide error output if this is really a problem.
diff --git a/.bugs/897 b/.bugs/897
index 90cd42e..66bda6d 100644
--- a/.bugs/897
+++ b/.bugs/897
@@ -1,12 +1,16 @@
Title: Add some security mechanism to prevent accidential removal of ldap users profile
Component: multisite
-State: open
+Class: nastiness
+State: done
Date: 2013-02-07 16:13:52
Targetversion: 1.2.2
-Class: nastiness
It might happen that users are not visible to the ldap sync (maybe by temporary
misconfiguration). When a sync detects that one user is suddenly missing, it
removes the user from the configuration as also the htpasswd mechanism does.
This could lead in bad situations where customized things in multisite get lost,
maybe we find a way to prevent this somehow...?
+
+2013-12-17 17:33:05: changed state open -> done
+The profile folder deletion has been commented out a longer time ago. The problem should
+be solved for the moment.
Module: check_mk
Branch: master
Commit: 72997abe02dd19214bb5db20c5d99c0e71671751
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=72997abe02dd19…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 17 18:01:06 2013 +0100
FIX Better error handling for invalid service regex in rule conditions
Previous versions of the rule editor in WATO did not check whether or not
the regular expressions provided for matching services are valid. This
change adds a regular expression validation.
---
.bugs/890 | 7 +++++--
.werks/385 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 6 ++++--
4 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/.bugs/890 b/.bugs/890
index 30f064f..c0dafa6 100644
--- a/.bugs/890
+++ b/.bugs/890
@@ -1,11 +1,14 @@
Title: Better error handling for invalid regex in rule
Component: core
-State: open
+Class: nastiness
+State: done
Date: 2013-06-03 14:18:36
Targetversion: 1.2.3
-Class: nastiness
If you enter e.g. H:\ into the "Mount Point" of the df-Rule then cmk -C
crashes with an exception.
Can we make a validator here?
+
+2013-12-17 17:58:48: changed state open -> done
+Added RegExp validation to all service related fields in rule conditions.
diff --git a/.werks/385 b/.werks/385
new file mode 100644
index 0000000..ddded24
--- /dev/null
+++ b/.werks/385
@@ -0,0 +1,10 @@
+Title: Better error handling for invalid service regex in rule conditions
+Level: 2
+Component: wato
+Version: 1.2.5i1
+Date: 1387299554
+Class: fix
+
+Previous versions of the rule editor in WATO did not check whether or not
+the regular expressions provided for matching services are valid. This
+change adds a regular expression validation.
diff --git a/ChangeLog b/ChangeLog
index f541473..b3e0cb5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -91,6 +91,7 @@
* 0341 FIX: Avoid rare exception in WATO when deleting a host...
* 0376 FIX: LDAP: Default configuration of attributes is reflected within WATO now
* 0346 FIX: Fix folder visibility in WATO for unpriviledged users...
+ * 0385 FIX: Better error handling for invalid service regex in rule conditions...
Notifications:
* 0362 sms: now searching PATH for sendsms and smssend commands...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 4518ff6..3c22d8c 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -11654,7 +11654,9 @@ def get_rule_conditions(ruleset):
itemspec = ListChoice(choices = itemenum, columns = 3)
item_list = [ x+"$" for x in itemspec.from_html_vars("item") ]
else:
- vs = ListOfStrings(valuespec = ruleset["itemspec"])
+ vs = ListOfStrings(valuespec = RegExpUnicode(
+ title = ruleset["itemspec"].title(),
+ ))
item_list = vs.from_html_vars("itemlist")
vs.validate_value(item_list, "itemlist")
@@ -11892,7 +11894,7 @@ def mode_edit_rule(phase, new = False):
else:
ListOfStrings(
orientation = "horizontal",
- valuespec = TextAscii(size = 30)).render_input("itemlist", item_list)
+ valuespec = RegExpUnicode(size = 30)).render_input("itemlist", item_list)
html.write("<br><br>")
html.help(_("The entries here are regular expressions to match the beginning. "