Module: check_mk
Branch: master
Commit: 4cef91f45d67e71c13fbefa0e9332950d70f6d04
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4cef91f45d67e7…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Feb 5 13:03:11 2014 +0100
fixed broken inventory function
---
modules/check_mk.py | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 72b5abd..7e09c8a 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -2645,7 +2645,6 @@ def quote_nagios_string(s):
# '----------------------------------------------------------------------'
def do_inventory(hostnames, checknames, only_new):
-
# For clusters add their nodes to the list
nodes = []
for h in hostnames:
@@ -2663,18 +2662,17 @@ def do_inventory(hostnames, checknames, only_new):
else:
sys.stdout.write("Inventorizing all hosts.\n")
- if inventory_checks:
- checknames = inventory_checks.split(",")
-
# remove existing checks, if option -I is used twice
if seen_I > 1:
- if inventory_checks == None:
- checknames = inventorable_checktypes("all")
+ if not checknames:
+ checks_to_remove = inventorable_checktypes("all")
+ else:
+ checks_to_remove = checknames
if len(hostnames) > 0:
# Entries in hostnames that are either prefixed with @
# or are no valid hostnames are considered to be tags.
for host in hostnames:
- remove_autochecks_of(host, checknames)
+ remove_autochecks_of(host, checks_to_remove)
# If all nodes of a cluster are contained in the list, then
# also remove the autochecks of that cluster. Beware: a host
# can be part more multiple clusters
@@ -2687,7 +2685,7 @@ def do_inventory(hostnames, checknames, only_new):
if len(missing) == 0:
if opt_verbose:
sys.stdout.write("All nodes of %s specified, dropping checks of %s, too.\n" % (clust, node))
- remove_autochecks_of(clust, checknames)
+ remove_autochecks_of(clust, checks_to_remove)
else:
sys.stdout.write("Warning: %s is part of cluster %s, but you didn't specify %s as well.\nChecks on %s will be kept.\n" %
@@ -2695,10 +2693,10 @@ def do_inventory(hostnames, checknames, only_new):
else:
for host in all_active_hosts() + all_active_clusters():
- remove_autochecks_of(host, checknames)
+ remove_autochecks_of(host, checks_to_remove)
reread_autochecks()
- if inventory_checks == None:
+ if checknames == None:
do_snmp_scan(hostnames)
checknames = inventorable_checktypes("tcp")
Module: check_mk
Branch: master
Commit: b79eee3701c9b119ce845a0bf00659ddded3cfa9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b79eee3701c9b1…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Feb 4 15:16:45 2014 +0100
FIX Fix language jumping to German when saving user profiles
---
.werks/690 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 2 +-
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.werks/690 b/.werks/690
new file mode 100644
index 0000000..5bd5a60
--- /dev/null
+++ b/.werks/690
@@ -0,0 +1,9 @@
+Title: Fix language jumping to German when saving user profiles
+Level: 2
+Component: wato
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1391523357
+
+
diff --git a/ChangeLog b/ChangeLog
index 803b5ec..52f3e89 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -252,6 +252,7 @@
* 0269 FIX: brocade_fcport: fixed problem on displaying check_parameters in WATO...
* 0271 FIX: Fixed sorting in duallist element (two lists with interchangable elements)...
* 0131 FIX: Error rates for network interfaces can now be set smaller then 0.1 when using Wato....
+ * 0690 FIX: Fix language jumping to German when saving user profiles
Notifications:
* 0362 sms: now searching PATH for sendsms and smssend commands...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index f1edb20..acf36c8 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -13126,7 +13126,7 @@ def HostnameTranslation(**kwargs):
def select_language(user_language):
languages = [ l for l in get_languages() if not config.hide_language(l[0]) ]
- inactive = user_language != ''
+ inactive = not not user_language
if languages:
forms.section(_("Language"),
Module: check_mk
Branch: master
Commit: d8aeca6898566d4a3d161e2288f51b23f766b021
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d8aeca6898566d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Feb 4 14:42:07 2014 +0100
check_dns: allow to specify multiple expected answers
---
.werks/697 | 8 ++++++++
ChangeLog | 1 +
checks/check_dns | 7 ++++++-
web/plugins/wato/active_checks.py | 20 +++++++++++++-------
4 files changed, 28 insertions(+), 8 deletions(-)
diff --git a/.werks/697 b/.werks/697
new file mode 100644
index 0000000..7a48eaf
--- /dev/null
+++ b/.werks/697
@@ -0,0 +1,8 @@
+Title: check_dns: allow to specify multiple expected answers
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1391521300
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 6345c5f..803b5ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -80,6 +80,7 @@
* 0698 emc_isilon.nodehealth: new check for EMC Isilon Storage systems: NodeHealth
* 0699 emc_isilon_iops: New check for Disk Operations per Second (IOPS) in EMC Isilon Storage
* 0132 New checks fjdarye101_disks fjdarye101_rluns: Fujitsu Storage Systems with 2013 Firmware
+ * 0697 check_dns: allow to specify multiple expected answers
* 0103 FIX: services: Fixed bug with service inventory defined in main.mk...
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
* 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
diff --git a/checks/check_dns b/checks/check_dns
index f655577..4ac542c 100644
--- a/checks/check_dns
+++ b/checks/check_dns
@@ -34,7 +34,12 @@ def check_dns_arguments(params):
args += " -s '$HOSTADDRESS$'"
if "expected_address" in settings:
- args += ' -a %s' % quote_shell_string(settings["expected_address"])
+ # Convert from old (str) to new (list of strings)
+ exp = settings["expected_address"]
+ if type(exp) in ( str, unicode ):
+ exp = [ exp ]
+ for entry in exp:
+ args += ' -a %s' % quote_shell_string(entry)
if settings.get("expected_authority"):
args += ' -A'
diff --git a/web/plugins/wato/active_checks.py b/web/plugins/wato/active_checks.py
index 9f61da3..0cc357c 100644
--- a/web/plugins/wato/active_checks.py
+++ b/web/plugins/wato/active_checks.py
@@ -168,8 +168,10 @@ register_rule(group,
help = _("Check the resolution of a hostname into an IP address by a DNS server. "
"This check uses <tt>check_dns</tt> from the standard Nagios plugins."),
elements = [
- TextAscii(title = _("Hostname"), allow_empty = False,
- help = _('The name or address you want to query')),
+ TextAscii(
+ title = _("Queried Hostname or IP address"),
+ allow_empty = False,
+ help = _('The name or IPv4 address you want to query')),
Dictionary(
title = _("Optional parameters"),
elements = [
@@ -179,11 +181,15 @@ register_rule(group,
allow_empty = False,
help = _("Optional DNS server you want to use for the lookup"))),
( "expected_address",
- TextAscii(
- title = _("Expected Address"),
- allow_empty = False,
- help = _("Optional IP-Address you expect the DNS server to return. The host "
- "must end with a dot (.) " )),
+ Transform(
+ ListOfStrings(
+ title = _("Expected answer (IP address or hostname)"),
+ help = _("List all allowed expected answers here. If query for an "
+ "IP address then the answer will be host names, that end "
+ "with a dot."),
+ ),
+ forth = lambda old: type(old) in (str, unicode) and [old] or old,
+ ),
),
( "expected_authority",
FixedValue(