Module: check_mk
Branch: master
Commit: 25a6724b6539a9d8c310a28779cfcf7b93ea3b91
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=25a6724b6539a9…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri May 25 14:18:48 2012 +0200
Updated bug entries #0711
---
.bugs/711 | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/.bugs/711 b/.bugs/711
index 6ed603a..9986442 100644
--- a/.bugs/711
+++ b/.bugs/711
@@ -1,12 +1,17 @@
Title: don't replicate to hosts with problematic clock differences
Component: wato
-State: open
+Class: nastiness
+State: wontfix
Date: 2012-05-11 17:55:33
Targetversion: future
-Class: nastiness
If you replicate to a host that has a clock that drifted into future something
can break.
We should not replicate to systems that have fundamental problems; the
replication may still work, but there may be much larger issues be caused in the
followup.
+
+2012-05-25 14:18:43: changed state open -> wontfix
+In my opinion enforcing a correct time is not the task
+of Check_MK. And detecting time differences is not easy
+to implement in a clean way.
Module: check_mk
Branch: master
Commit: 3cf1a996fabd50f99f2884ed654d36f5f6a2332f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3cf1a996fabd50…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri May 25 12:59:16 2012 +0200
check_http, check_tcp: allow to omit -I
---
ChangeLog | 4 +---
checks/check_http | 10 +++++++++-
checks/check_tcp | 6 +++++-
web/plugins/wato/active_checks.py | 37 +++++++++++++++++++++++++++++--------
4 files changed, 44 insertions(+), 13 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 35107d2..e4fde8e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -65,11 +65,9 @@
* Linux: Modified cluster section to allow pacemaker/corosync clusters without heartbeat
* AIX: convert NIC check to lnx_if (now being compatible with if/if64)
* AIX: new check for CPU utilization (using section lparstat_aix)
-<<<<<<< HEAD
* ntp checks: Changed default value of time offsets to be 200ms (WARN) / 500ms (CRIT)
-=======
* aironet_{errors,clients}: detect new kinds of devices (Thanks to Tiago Sousa)
->>>>>>> aa82b76e17247eb3d5af8167ae7153a232c4a9ee
+ * check_http, check_tcp: allow to omit -I and use dynamic DNS name instead
1.2.0b4:
Core:
diff --git a/checks/check_http b/checks/check_http
index 4444a04..e96812c 100644
--- a/checks/check_http
+++ b/checks/check_http
@@ -31,6 +31,12 @@ def check_http_arguments(params):
if "vhost" in settings:
args += ' -H %s' % quote_shell_string(settings["vhost"])
+ if "virthost" in settings:
+ vhost, omit_ip = settings["virthost"]
+ args += ' -H %s' % quote_shell_string(vhost)
+ else:
+ omit_ip = False
+
if "uri" in settings:
args += ' -u %s' % quote_shell_string(settings["uri"])
@@ -95,11 +101,13 @@ def check_http_arguments(params):
if "max_age" in settings:
args += ' -M %d' % settings["max_age"]
+ if not omit_ip:
+ args = " -I $HOSTADDRESS$" + args
return args
active_check_info['http'] = {
- "command_line" : '$USER1$/check_http -I $HOSTADDRESS$ $ARG1$',
+ "command_line" : '$USER1$/check_http $ARG1$',
"argument_function" : check_http_arguments,
"service_description" : lambda params: "HTTP %s" % params[0],
"has_perfdata" : True,
diff --git a/checks/check_tcp b/checks/check_tcp
index cde96a6..c716266 100644
--- a/checks/check_tcp
+++ b/checks/check_tcp
@@ -73,12 +73,16 @@ def check_tcp_arguments(params):
if "quit_string" in settings:
args += ' -q %s' % quote_shell_string(settings["quit_string"])
+ if "hostname" in settings:
+ args += ' -H %s' % quote_shell_string(settings["hostname"])
+ else:
+ args += ' -H $HOSTADDRESS$'
return args
active_check_info['tcp'] = {
- "command_line" : '$USER1$/check_tcp -H $HOSTADDRESS$ $ARG1$',
+ "command_line" : '$USER1$/check_tcp $ARG1$',
"argument_function" : check_tcp_arguments,
"service_description" : lambda args: "TCP Port %d" % args[0],
"has_perfdata" : True,
diff --git a/web/plugins/wato/active_checks.py b/web/plugins/wato/active_checks.py
index 215578f..a231038 100644
--- a/web/plugins/wato/active_checks.py
+++ b/web/plugins/wato/active_checks.py
@@ -40,6 +40,13 @@ register_rule(group,
Dictionary(
title = _("Optional parameters"),
elements = [
+ ( "hostname",
+ TextAscii(
+ title = _("DNS Hostname"),
+ allow_empty = False,
+ help = _("If you specify a hostname here, then a dynamic DNS lookup "
+ "will be done instead of using the IP address of the host "
+ "as configured in your host properties."))),
( "response_time",
Tuple(
title = _("Expected response time"),
@@ -177,14 +184,28 @@ register_rule(group,
Dictionary(
title = _("Optional settings"),
elements = [
- ( "vhost",
- TextAscii(
- title = _("Name of the virtual host"),
- help = _("Set this in order to specify the name of the "
- "virtual host for the query (using HTTP/1.1). When you "
- "leave this empty, then the IP address of the host "
- "will be used instead."),
- allow_empty = False)
+ ( "virthost",
+ Tuple(
+ title = _("Virtual host"),
+ elements = [
+ TextAscii(
+ title = _("Name of the virtual host"),
+ help = _("Set this in order to specify the name of the "
+ "virtual host for the query (using HTTP/1.1). When you "
+ "leave this empty, then the IP address of the host "
+ "will be used instead."),
+ allow_empty = False),
+ Checkbox(
+ label = _("Omit specifying an IP address"),
+ help = _("Usually Check_MK will nail this check to the "
+ "IP address of the host it is attached to. With this "
+ "option you can have the check use the name of the "
+ "virtual host instead and do a dynamic DNS lookup."),
+ true_label = _("omit IP address"),
+ false_label = _("specify IP address"),
+ ),
+ ]
+ )
),
( "uri",
TextAscii(
Module: check_mk
Branch: master
Commit: 976868a6753564279e59b9899faaf1b7a319fa9c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=976868a6753564…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri May 25 12:48:39 2012 +0200
FIX: Handling empty lines in htpasswd correctly
---
ChangeLog | 2 ++
web/htdocs/login.py | 5 +++--
web/htdocs/wato.py | 36 +++++++++++++++++++-----------------
3 files changed, 24 insertions(+), 19 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 35107d2..d4bc0f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,6 +27,7 @@
* FIX: Allowing german umlauts in users mail addresses
* Allow list of aux tags to be missing in host tag definitions. This
makes migration from older version easier.
+ * FIX: user management modules can now deal with empty lines in htpasswd
Multisite:
* New display type 'boxes-omit-root' for BI views
@@ -51,6 +52,7 @@
* FIX: fix problem where filter settings (of checkboxes) are not effective
when it comes to executing commands
* FIX: Fixed styling issues of view filters with dropdown fields
+ * FIX: multisite login can now deal with empty lines in htpasswd
Mobile:
* FIX: Fixed logtime filter settings in all mobile views
diff --git a/web/htdocs/login.py b/web/htdocs/login.py
index fb9eacb..88ebbc1 100644
--- a/web/htdocs/login.py
+++ b/web/htdocs/login.py
@@ -59,8 +59,9 @@ def load_htpasswd():
creds = {}
for line in open(defaults.htpasswd_file, 'r'):
- username, pwhash = line.split(':', 1)
- creds[username] = pwhash.rstrip('\n')
+ if ':' in line:
+ username, pwhash = line.split(':', 1)
+ creds[username] = pwhash.rstrip('\n')
return creds
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index cdb87e3..ebbd2cb 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -7835,23 +7835,25 @@ def load_users():
filename = defaults.htpasswd_file
if os.path.exists(filename):
for line in file(filename):
- id, password = line.strip().split(":")[:2]
- if password.startswith("!"):
- locked = True
- password = password[1:]
- else:
- locked = False
- if id in result:
- result[id]["password"] = password
- result[id]["locked"] = locked
- else:
- # Create entry if this is an admin user
- new_user = {
- "roles" : config.roles_of_user(id),
- "password" : password,
- "locked" : False
- }
- result[id] = new_user
+ line = line.strip()
+ if ':' in line:
+ id, password = line.strip().split(":")[:2]
+ if password.startswith("!"):
+ locked = True
+ password = password[1:]
+ else:
+ locked = False
+ if id in result:
+ result[id]["password"] = password
+ result[id]["locked"] = locked
+ else:
+ # Create entry if this is an admin user
+ new_user = {
+ "roles" : config.roles_of_user(id),
+ "password" : password,
+ "locked" : False
+ }
+ result[id] = new_user
# Other unknown entries will silently be dropped. Sorry...
# Now read the automation secrets and add them to existing
Module: check_mk
Branch: master
Commit: b7042da5a2dbe4137c16249724060bcd4eaef675
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b7042da5a2dbe4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri May 25 11:39:09 2012 +0200
FIX: Allowing german umlauts in users mail addresses
---
.bugs/690 | 7 +++++--
.bugs/693 | 9 +++++++--
ChangeLog | 1 +
web/htdocs/wato.py | 2 +-
4 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/.bugs/690 b/.bugs/690
index f38fe52..79b7935 100644
--- a/.bugs/690
+++ b/.bugs/690
@@ -1,11 +1,14 @@
Title: Change default thresholds of ntp check
Component: checks
-State: open
+Class: nastiness
+State: done
Date: 2012-04-02 15:25:35
Targetversion: future
-Class: nastiness
The default thresholds of the ntp check are too strict for most environments. Thresholds of
20.0ms and 50.0ms are not realistic for datacenter environments.
We should change the default values to something less strict like around several seconds.
+
+2012-05-25 11:27:54: changed state open -> done
+Increased thresholds by factor 10 to 200ms/500ms
diff --git a/.bugs/693 b/.bugs/693
index cefd1b7..1524a9e 100644
--- a/.bugs/693
+++ b/.bugs/693
@@ -1,9 +1,14 @@
Title: Acknowledge WATO pending changes when applying config by using cmk
Component: core
-State: open
+Class: nastiness
+State: wontfix
Date: 2012-04-25 12:23:47
Targetversion: future
-Class: nastiness
It confuses users that a manual restart via "cmk" command does not acknowledge the pending
changes which can be found in the wato changelog.
+
+2012-05-25 11:31:44: changed state open -> wontfix
+Esepcially in distributed wato setups this is not possible since cmk -R does not know anything about the
+other sites. It would acknowledge the pending changes and remove the info that other sites don't have these
+changes yet.
diff --git a/ChangeLog b/ChangeLog
index 5a47b37..d2395f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,7 @@
* Keep track of changes made by other users before activating changes,
let user confirm this, new permission can be used to prevent a user
from activating foreign changes.
+ * FIX: Allowing german umlauts in users mail addresses
Multisite:
* New display type 'boxes-omit-root' for BI views
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 68d395b..70e6c15 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -7519,7 +7519,7 @@ def mode_edit_user(phase):
# Email address
email = html.var("email").strip()
- regex_email = '^[-a-zA-Z0-9_.]+(a)[-a-zA-Z0-9]+(\.[a-zA-Z]+)*$'
+ regex_email = '^[-a-zäöüÄÖÜA-Z0-9_.]+(a)xn--[-a-za-z0-9]+(\-4kba73ab2jc.[a-zA-Z]+)*$'
if email and not re.match(regex_email, email):
raise MKUserError("email", _("'%s' is not a valid email address." % email))
new_user["email"] = email