Module: check_mk
Branch: master
Commit: ab2dc9eff864889b6df9124d3cf653ad9ae441c1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ab2dc9eff86488…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Feb 3 13:56:32 2017 +0100
4020 windows/megaraid.bat: now also provides information for the megaraid_bbu check (Battery Backup Unit)
Change-Id: Idebc32fde02f70806160eafa8a22d9e3806ca239
---
.werks/4020 | 9 +++++++++
ChangeLog | 1 +
agents/windows/plugins/megaraid.bat | 4 ++++
3 files changed, 14 insertions(+)
diff --git a/.werks/4020 b/.werks/4020
new file mode 100644
index 0000000..5d7bbbf
--- /dev/null
+++ b/.werks/4020
@@ -0,0 +1,9 @@
+Title: windows/megaraid.bat: now also provides information for the megaraid_bbu check (Battery Backup Unit)
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.4.0i4
+Date: 1486126523
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index bf87a7c..c16c2cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,6 +25,7 @@
* 4334 mssql_instance: now the connection status is configurable
* 4336 diskstat: now detects NVMe drives, eg. solid-state drives
* 4019 Windows powershell scripts are now always called with the options -noprofile -executionpolicy bypass...
+ * 4020 windows/megaraid.bat: now also provides information for the megaraid_bbu check (Battery Backup Unit)
* 4171 FIX: perle_psmu: fixed value error...
* 4172 FIX: smart.temp: fixed discovery and check function...
* 4173 FIX: if.include: ignore some more keys in 'Network interfaces and switch ports' rule which are only used for interface grouping
diff --git a/agents/windows/plugins/megaraid.bat b/agents/windows/plugins/megaraid.bat
index 889e716..de05916 100644
--- a/agents/windows/plugins/megaraid.bat
+++ b/agents/windows/plugins/megaraid.bat
@@ -60,6 +60,10 @@ REM get logical disc info
ECHO ^<^<^<megaraid_ldisks^>^>^>
"!MegaCli!" -LDInfo -Lall -aALL -NoLog | FINDSTR "Size State Number Adapter Virtual"
+REM get bbu info
+ECHO ^<^<^<megaraid_bbu^>^>^>
+"!MegaCli!" -AdpBbuCmd -GetBbuStatus -aAll -NoLog | FINDSTR /V "Exit"
+
REM delete tmpfiles
DEL "!tmpfile!"
DEL "!enclist!"
Module: check_mk
Branch: master
Commit: ba32da568a355a0fe0c6812aabf9920927e4322f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ba32da568a355a…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Feb 3 13:44:59 2017 +0100
4019 Windows powershell scripts are now always called with the options -noprofile -executionpolicy bypass
The -noprofile option improves the startup of the powershell interpreter.
The "-executionpolicy bypass" means that the agent will no longer check any
signatures of powershell scripts, since we don't provide them in ps1 script, anyway.
Change-Id: I6bed38679df31b19cdeec8afddf086fd2a60ec34
---
.werks/4019 | 12 ++++++++++++
ChangeLog | 1 +
agents/windows/build_version | 2 +-
agents/windows/check_mk_agent-64.exe | Bin 1328640 -> 1328640 bytes
agents/windows/check_mk_agent-64.unstripped.exe | Bin 15652368 -> 15652368 bytes
agents/windows/check_mk_agent-64.unversioned.exe | Bin 1328640 -> 1328640 bytes
agents/windows/check_mk_agent.exe | Bin 1305088 -> 1305088 bytes
agents/windows/check_mk_agent.msi | Bin 2903552 -> 2903552 bytes
agents/windows/check_mk_agent.unstripped.exe | Bin 13543976 -> 13543976 bytes
agents/windows/check_mk_agent.unversioned.exe | Bin 1305088 -> 1305088 bytes
agents/windows/install_agent-64.exe | Bin 586638 -> 586639 bytes
agents/windows/install_agent.exe | Bin 583697 -> 583691 bytes
12 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/4019 b/.werks/4019
new file mode 100644
index 0000000..facca67
--- /dev/null
+++ b/.werks/4019
@@ -0,0 +1,12 @@
+Title: Windows powershell scripts are now always called with the options -noprofile -executionpolicy bypass
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.4.0i4
+Date: 1486125546
+Class: feature
+
+The -noprofile option improves the startup of the powershell interpreter.
+The "-executionpolicy bypass" means that the agent will no longer check any
+signatures of powershell scripts, since we don't provide them in ps1 script, anyway.
+
diff --git a/ChangeLog b/ChangeLog
index 4bc55d7..bf87a7c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,7 @@
* 4332 check_http: Add support for TLSv1.1 and TLSv1.2 as configuration option...
* 4334 mssql_instance: now the connection status is configurable
* 4336 diskstat: now detects NVMe drives, eg. solid-state drives
+ * 4019 Windows powershell scripts are now always called with the options -noprofile -executionpolicy bypass...
* 4171 FIX: perle_psmu: fixed value error...
* 4172 FIX: smart.temp: fixed discovery and check function...
* 4173 FIX: if.include: ignore some more keys in 'Network interfaces and switch ports' rule which are only used for interface grouping
diff --git a/agents/windows/build_version b/agents/windows/build_version
index 5cf52bb..6357d64 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-2520
+2522
diff --git a/agents/windows/check_mk_agent-64.exe b/agents/windows/check_mk_agent-64.exe
index 144e0f9..aadbe3e 100755
Binary files a/agents/windows/check_mk_agent-64.exe and b/agents/windows/check_mk_agent-64.exe differ
diff --git a/agents/windows/check_mk_agent-64.unstripped.exe b/agents/windows/check_mk_agent-64.unstripped.exe
index 40ec91b..fead502 100755
Binary files a/agents/windows/check_mk_agent-64.unstripped.exe and b/agents/windows/check_mk_agent-64.unstripped.exe differ
diff --git a/agents/windows/check_mk_agent-64.unversioned.exe b/agents/windows/check_mk_agent-64.unversioned.exe
index e433ce3..599cfa7 100755
Binary files a/agents/windows/check_mk_agent-64.unversioned.exe and b/agents/windows/check_mk_agent-64.unversioned.exe differ
diff --git a/agents/windows/check_mk_agent.exe b/agents/windows/check_mk_agent.exe
index dbd5c70..bb27778 100755
Binary files a/agents/windows/check_mk_agent.exe and b/agents/windows/check_mk_agent.exe differ
diff --git a/agents/windows/check_mk_agent.msi b/agents/windows/check_mk_agent.msi
index e6aad8c..8cb6c97 100755
Binary files a/agents/windows/check_mk_agent.msi and b/agents/windows/check_mk_agent.msi differ
diff --git a/agents/windows/check_mk_agent.unstripped.exe b/agents/windows/check_mk_agent.unstripped.exe
index ebf005c..6a56d88 100755
Binary files a/agents/windows/check_mk_agent.unstripped.exe and b/agents/windows/check_mk_agent.unstripped.exe differ
diff --git a/agents/windows/check_mk_agent.unversioned.exe b/agents/windows/check_mk_agent.unversioned.exe
index 74668ad..3c80bab 100755
Binary files a/agents/windows/check_mk_agent.unversioned.exe and b/agents/windows/check_mk_agent.unversioned.exe differ
diff --git a/agents/windows/install_agent-64.exe b/agents/windows/install_agent-64.exe
index ad7f116..44c648b 100755
Binary files a/agents/windows/install_agent-64.exe and b/agents/windows/install_agent-64.exe differ
diff --git a/agents/windows/install_agent.exe b/agents/windows/install_agent.exe
index b83676d..714e77f 100755
Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe differ
Module: check_mk
Branch: master
Commit: ac944ea7431eb65c5fb3470d39b0ceb5d0fd274c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ac944ea7431eb6…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Feb 3 13:05:02 2017 +0100
Fixed highlighting of rules when ruleset already matches a search
Change-Id: I5a89ce2984c59ded8487acb2be491e96a6b55459
---
web/htdocs/wato.py | 6 ++---
web/htdocs/watolib.py | 63 +++++++++++++++++++++++++++++++--------------------
2 files changed, 41 insertions(+), 28 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 9b94877..3e6f834 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -12210,9 +12210,9 @@ class ModeEditRuleset(WatoMode):
if rule.is_disabled():
css.append("disabled")
- has_rule_search_options = bool([ k for k in search_options.keys()
- if k == "fulltext" or k.startswith("rule_") ])
- if has_rule_search_options and rule.matches_search(search_options):
+ if ruleset.has_rule_search_options(search_options) \
+ and rule.matches_search(search_options) \
+ and ("fulltext" in search_options and not ruleset.matches_fulltext_search(search_options)):
css.append("matches_search")
table.row(css=" ".join(css) if css else None)
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index 8e3c979..83897b1 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -6217,7 +6217,7 @@ class SearchedRulesets(FilteredRulesetCollection):
e.g. by their name, title or help."""
for ruleset in self._origin_rulesets.get_rulesets().values():
- if ruleset.matches_search(self._search_options):
+ if ruleset.matches_search_with_rules(self._search_options):
self._rulesets[ruleset.name] = ruleset
@@ -6319,7 +6319,39 @@ class Ruleset(object):
return content
- def matches_search(self, search_options):
+ # Whether or not either the ruleset itself matches the search or the rules match
+ def matches_search_with_rules(self, search_options):
+ if not self.matches_ruleset_search_options(search_options):
+ return False
+
+ # The ruleset matched or did not decide to skip the whole ruleset.
+ # The ruleset should be matched in case a rule matches.
+
+ if not self.has_rule_search_options(search_options):
+ return self.matches_fulltext_search(search_options)
+
+ # Store the matching rules for later result rendering
+ self.search_matching_rules = []
+ for folder, rule_index, rule in self.get_rules():
+ if rule.matches_search(search_options):
+ self.search_matching_rules.append(rule)
+
+ if not self.search_matching_rules:
+ return self.matches_fulltext_search(search_options)
+ else:
+ return True
+
+
+ def has_rule_search_options(self, search_options):
+ return bool([ k for k in search_options.keys() if k == "fulltext" or k.startswith("rule_") ])
+
+
+ def matches_fulltext_search(self, search_options):
+ return match_one_of_search_expression(search_options, "fulltext",
+ [self.name, self.title(), self.help()])
+
+
+ def matches_ruleset_search_options(self, search_options):
if "ruleset_deprecated" in search_options and search_options["ruleset_deprecated"] != self.is_deprecated():
return False
@@ -6339,28 +6371,6 @@ class Ruleset(object):
if not match_search_expression(search_options, "ruleset_help", self.help()):
return False
- has_rules_search = bool([ s for s in search_options.keys() \
- if s == "fulltext" or s.startswith("rule_") ])
-
- if not has_rules_search and "fulltext" not in search_options:
- return True
-
- # Store the matching rules for later result rendering
- self.search_matching_rules = []
- for folder, rule_index, rule in self.get_rules():
- if rule.matches_search(search_options):
- self.search_matching_rules.append(rule)
-
- if "fulltext" not in search_options:
- return bool(self.search_matching_rules)
-
- if not match_one_of_search_expression(search_options, "fulltext",
- [self.name, self.title(), self.help()]):
- if self.search_matching_rules:
- return True
- else:
- return False
-
return True
@@ -6781,6 +6791,9 @@ class Rule(object):
if not match_search_expression(search_options, "rule_comment", self.comment()):
return False
+ if "rule_value" in search_options and not self.ruleset.valuespec():
+ return False
+
if self.ruleset.valuespec() and \
not match_search_expression(search_options, "rule_value",
"%s" % self.ruleset.valuespec().value_to_text(self.value)):
@@ -6843,8 +6856,8 @@ def match_one_of_search_expression(search_options, attr_name, search_in_list):
return True
return False
-#.
+#.
# .--Read-Only-----------------------------------------------------------.
# | ____ _ ___ _ |
# | | _ \ ___ __ _ __| | / _ \ _ __ | |_ _ |