Module: check_mk
Branch: master
Commit: 221cef050095ee3c1020070962d5ae7c444939a5
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=221cef050095ee…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed May 20 16:09:57 2015 +0200
#2296 win_dhcp_pools: Convert global option for discovery empty pools into rule set
The selection wether empty DHCP should be discovered has now been moved into
a rule set. If you had set the global option then it is still functioning
and can be overridden on a per-host-basis with rules.
---
.werks/2296 | 11 +++++++++++
ChangeLog | 1 +
checks/win_dhcp_pools | 9 ++++++---
web/plugins/wato/check_mk_configuration.py | 15 ---------------
web/plugins/wato/check_parameters.py | 16 ++++++++++++++++
5 files changed, 34 insertions(+), 18 deletions(-)
diff --git a/.werks/2296 b/.werks/2296
new file mode 100644
index 0000000..6c8051c
--- /dev/null
+++ b/.werks/2296
@@ -0,0 +1,11 @@
+Title: win_dhcp_pools: Convert global option for discovery empty pools into rule set
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1432130938
+Class: feature
+
+The selection wether empty DHCP should be discovered has now been moved into
+a rule set. If you had set the global option then it is still functioning
+and can be overridden on a per-host-basis with rules.
diff --git a/ChangeLog b/ChangeLog
index 0a6494f..be4552e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -188,6 +188,7 @@
* 2232 printer_supply: move setting for "some remaining" status from global option to check parameters...
* 2293 logwatch: Remove global setting logwatch_service_output from WATO...
* 2294 if, if64: Move global option for padding port numbers with zeroes into rule...
+ * 2296 win_dhcp_pools: Convert global option for discovery empty pools into rule set...
* 1457 FIX: logins: new check renamed from "users" check...
NOTE: Please refer to the migration notes!
* 1762 FIX: lnx_thermal: Now ignoring trip points with level 0...
diff --git a/checks/win_dhcp_pools b/checks/win_dhcp_pools
index 081dd64..7adfa42 100644
--- a/checks/win_dhcp_pools
+++ b/checks/win_dhcp_pools
@@ -24,8 +24,6 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-# Author: Lars Michelsen <lm(a)mathias-kettner.de>
-
# Example outputs from agent:
#
# <<<win_dhcp_pools>>>
@@ -62,6 +60,7 @@
win_dhcp_pools_default_levels = (10, 5)
win_dhcp_pools_inventorize_empty = False
+discovery_win_dhcp_pools = []
win_dhcp_pools_stats_translate = {
'Entdeckungen': 'Discovers',
@@ -82,6 +81,10 @@ def parse_win_dhcp_pools(info):
return [ ' '.join(line).rstrip('.').split(' = ') for line in info ]
def inventory_win_dhcp_pools(info):
+ settings = host_extra_conf_merged(g_hostname, discovery_win_dhcp_pools)
+ discover_empty = settings.get("empty_pools", win_dhcp_pools_inventorize_empty)
+ print discover_empty
+
inventory = []
in_block = False
last_pool = ""
@@ -98,7 +101,7 @@ def inventory_win_dhcp_pools(info):
in_block = False
used, free, pending = pool_stats
size = used + free + pending
- if size > 0 or win_dhcp_pools_inventorize_empty:
+ if size > 0 or discover_empty:
inventory.append((last_pool, 'win_dhcp_pools_default_levels'))
return inventory
diff --git a/web/plugins/wato/check_mk_configuration.py b/web/plugins/wato/check_mk_configuration.py
index f635458..359e5f3 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -1434,21 +1434,6 @@ register_configvar(group,
))
-# WAS IST DAS???
-register_configvar(group,
- "win_dhcp_pools_inventorize_empty",
- Checkbox(
- title = _("Inventorize empty windows dhcp pools"),
- help = _("You can activate the inventorization of "
- "dhcp pools, which have no ip addresses in it"),
- ),
- need_restart = True
- )
-
-group = _("Check configuration")
-
-
-
#.
# .--Rulesets------------------------------------------------------------.
# | ____ _ _ |
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 5a5ef10..e0fd84b 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -426,6 +426,22 @@ register_rule(group + '/' + subgroup_inventory,
match = 'all',
)
+register_rule(group + '/' + subgroup_inventory,
+ varname = "discovery_win_dhcp_pools",
+ title = _("Discovery of Windows DHCP Pools"),
+ valuespec = Dictionary(
+ elements = [
+ ( "empty_pools",
+ Checkbox(
+ title = _("Discovery of empty DHCP pools"),
+ label = _("Include empty pools into the monitoring"),
+ help = _("You can activate the creation of services for "
+ "DHCP pools, which contain no IP addresses."),
+ )),
+ ]
+ ),
+ match = 'dict',
+)
register_rule(group + '/' + subgroup_inventory,
Module: check_mk
Branch: master
Commit: ec5c0ccb3fd0fa4765f5b2e0cbfaa9db6202324d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ec5c0ccb3fd0fa…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed May 20 14:50:46 2015 +0200
#2295 FIX Fix exception in reporting for views that do not show a host name
---
.werks/2295 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/views.py | 9 +++++++--
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/.werks/2295 b/.werks/2295
new file mode 100644
index 0000000..d911ed7
--- /dev/null
+++ b/.werks/2295
@@ -0,0 +1,10 @@
+Title: Fix exception in reporting for views that do not show a host name
+Level: 1
+Component: reporting
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1432126221
+
+
diff --git a/ChangeLog b/ChangeLog
index 645229f..0a6494f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -542,6 +542,7 @@
* 1990 FIX: Fix two exceptions in PDF exports of host group views
* 2189 FIX: Allow changing graph number from 1 to "all" when editing PNP graph in report...
* 2206 FIX: Add missing option "Show timeline of each object directly in table" for reports...
+ * 2295 FIX: Fix exception in reporting for views that do not show a host name
Event Console:
* 1845 Keep record of original source IP address of a syslog message or SNMP trap...
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index e140c36..f26fef7 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -971,6 +971,10 @@ def show_view(view, show_heading = False, show_buttons = True,
need_inventory_data = False
# Prepare Filter headers for Livestatus
+ # TODO: When this is used by the reporting then *all* filters are
+ # active. That way the inventory data will always be loaded. When
+ # we convert this to the visuals principle the we need to optimize
+ # this.
filterheaders = ""
only_sites = None
all_active_filters = [ f for f in use_filters if f.available() ]
@@ -1080,10 +1084,11 @@ def show_view(view, show_heading = False, show_buttons = True,
if len(join_painters) > 0:
do_table_join(datasource, rows, filterheaders, join_painters, join_columns, only_sites)
- # Add inventory data if one of the painters needs it
+ # Add inventory data if one of the painters or filters needs it
if need_inventory_data:
for row in rows:
- row["host_inventory"] = inventory.host(row["host_name"])
+ if "host_name" in row:
+ row["host_inventory"] = inventory.host(row["host_name"])
sort_data(rows, sorters)
else:
Module: check_mk
Branch: master
Commit: cc0072cad87ccab34e498a9a80839707785e72bc
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cc0072cad87cca…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed May 20 14:23:50 2015 +0200
#2294 if, if64: Move global option for padding port numbers with zeroes into rule
You now can configure wether port numbers should be padded with zero on a per
host basis in the rule set <i>Network Interface and Switch Port Discovery</i>.
The global option has been remove from WATO. Any setting you have made is
still functioning, though.
---
.werks/2294 | 12 ++
ChangeLog | 1 +
checks/if.include | 10 +-
web/htdocs/lib.py | 12 +-
web/plugins/wato/check_mk_configuration.py | 209 +---------------------------
web/plugins/wato/check_parameters.py | 69 ++++++---
6 files changed, 75 insertions(+), 238 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=cc0072cad8…
Module: check_mk
Branch: master
Commit: 3f3875ef3b5f45e33a6a75f997a594fc8405192d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3f3875ef3b5f45…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed May 20 13:59:06 2015 +0200
#2293 logwatch: Remove global setting logwatch_service_output from WATO
This setting decides wether (default) or not to output the last critical
found message in a logfile in the output of the check plugin of logwatch
checks. You still can set this variable in <tt>main.mk</tt> if you like.
Existing setting still work.
This make Check_MK more consistent: there are no settings for checks
in the global settings any more now.
---
.werks/2293 | 15 +++++++++++++++
ChangeLog | 1 +
web/plugins/wato/check_mk_configuration.py | 16 ----------------
3 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/.werks/2293 b/.werks/2293
new file mode 100644
index 0000000..8cce36b
--- /dev/null
+++ b/.werks/2293
@@ -0,0 +1,15 @@
+Title: logwatch: Remove global setting logwatch_service_output from WATO
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1432123043
+Class: feature
+
+This setting decides wether (default) or not to output the last critical
+found message in a logfile in the output of the check plugin of logwatch
+checks. You still can set this variable in <tt>main.mk</tt> if you like.
+Existing setting still work.
+
+This make Check_MK more consistent: there are no settings for checks
+in the global settings any more now.
diff --git a/ChangeLog b/ChangeLog
index b119e3b..b5eb162 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -186,6 +186,7 @@
* 2277 mk_oracle.ps1: changed location of config file...
NOTE: Please refer to the migration notes!
* 2232 printer_supply: move setting for "some remaining" status from global option to check parameters...
+ * 2293 logwatch: Remove global setting logwatch_service_output from WATO...
* 1457 FIX: logins: new check renamed from "users" check...
NOTE: Please refer to the migration notes!
* 1762 FIX: lnx_thermal: Now ignoring trip points with level 0...
diff --git a/web/plugins/wato/check_mk_configuration.py b/web/plugins/wato/check_mk_configuration.py
index 2392076..8f57ca5 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -1643,22 +1643,6 @@ register_configvar(deprecated,
"by overridden on a per-host and per-port base by defining special check "
"parameters via a rule.")))
-register_configvar(group,
- "logwatch_service_output",
- DropdownChoice(
- title = _("Service output for logwatch"),
- help = _("You can change the plugin output of logwatch "
- "to show only the count of messages or also "
- "to show the last worst message"),
- choices = [
- ( 'default' , _("Show count and last message") ),
- ( 'count', _("Show only count")),
- ],
- default_value = 'default',
- ),
- need_restart = True
- )
-
#.
# .--Rulesets------------------------------------------------------------.
Module: check_mk
Branch: master
Commit: 26354b95a73afcd4a38ada24991f514b1a0e82d4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=26354b95a73afc…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed May 20 13:39:24 2015 +0200
#2232 printer_supply: move setting for "some remaining" status from global option to check parameters
This is due to a cleanup and for making Check_MK more consitent. If you already have
changed the global variable, your setting will still work.
---
.werks/2232 | 10 ++++
ChangeLog | 1 +
checks/printer_supply | 34 +++++++++----
web/plugins/wato/check_mk_configuration.py | 32 ------------
web/plugins/wato/check_parameters.py | 76 ++++++++++++++++++----------
5 files changed, 84 insertions(+), 69 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=26354b95a7…
Module: check_mk
Branch: master
Commit: 299c1962490d4a89efb27d85c079917766e2e825
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=299c1962490d4a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue May 19 17:56:40 2015 +0200
#2231 More transparently show errors during service discovery
Checks might run into problems parsing the output of an agent plugin. When
this happens during a normal check, you will soon know this as the according
service goes <i>UNKNOWN</i> and you will be able to create a crash dump.
Errors in single check plugins during service discovery, however, have been
silently ignored unless you used <tt>--debug</tt> on the command line. This
behaviour has been changed in the following way:
H2:<tt>cmk -I</tt> on the command line
Now for each files plugin a warning is being printed, but the discovery
continues. <tt>--debug</tt> will let the Python exception come through
and abort the discovery with a precise error message - just as it used
to be.
H2:Check_MK Discovery service
The discovery check now in case of an error during the discovery goes
to <i>UNKNOWN</i> and produces a crash dump - just as normal checks do.
That way you can easily send us a crash report in case of any error.
Previously error would be ignored silently.
H2:Service list in WATO
In WATO the list of a host's services will display a yellow error
message if one of the plugins fails. This messages has a link for
retrying the discovery without the error message and that way switch
back to the old behaviours (temporarliy).
H2:Bulk discovery in WATO
The bulk discovery keeps to the old behaviour of silently ignoring
errors but has got a new checkbox for letting a host fail if at
least one check plugin of the host runs into an error. The default
setting of the checkbox is to ignore errors.
---
.werks/2231 | 43 ++++++++++++++++++++
ChangeLog | 1 +
modules/automation.py | 20 +++++++++-
modules/check_mk_base.py | 100 +++++++++++++++++++++++++---------------------
modules/discovery.py | 86 +++++++++++++++++++++++++--------------
web/htdocs/wato.py | 16 +++++++-
6 files changed, 188 insertions(+), 78 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=299c196249…
Module: check_mk
Branch: master
Commit: 45592b7f9eb49b8489912719fb5e0e60bae8ea75
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=45592b7f9eb49b…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue May 19 17:42:42 2015 +0200
updated werk description
---
.werks/2275 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.werks/2275 b/.werks/2275
index 13400b1..a8a2715 100644
--- a/.werks/2275
+++ b/.werks/2275
@@ -14,7 +14,7 @@ The windows agent now comes with the following folders
<tr><td>plugins</td><td>plugin scripts</td></tr>
<tr><td>config</td><td>configuration files for scripts</td></tr>
<tr><td>state</td><td>state files for scripts and the agent, e.g. logwatch state</td></tr>
-<tr><td>spool</td><td>spoolfiles from other applications</td>/tr>
+<tr><td>spool</td><td>spoolfiles from other applications</td></tr>
<tr><td>log</td><td>logfiles from scripts and the agent</td></tr>
<tr><td>temp</td><td>working directory for scripts</td></tr>
</table>