Module: check_mk
Branch: master
Commit: 3d79c7b0728702f8d3b2d243118b74ac2d884e10
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3d79c7b0728702…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Nov 6 15:46:36 2014 +0100
#1203 FIX veeam_client: Now supports multiple Backups for one host
Before the check only supported one backup per host, so no item was needed. Now the check supports multiple Backups.
This means, now a item is in used. A reinventory is now necessary. Also you need to renew you Wato rule (if one).
---
.werks/1203 | 11 ++++++++
ChangeLog | 2 ++
checks/veeam_client | 46 ++++++++++++++++++++++++++--------
web/plugins/wato/check_parameters.py | 4 +--
4 files changed, 51 insertions(+), 12 deletions(-)
diff --git a/.werks/1203 b/.werks/1203
new file mode 100644
index 0000000..0b49f6c
--- /dev/null
+++ b/.werks/1203
@@ -0,0 +1,11 @@
+Title: veeam_client: Now supports multiple Backups for one host
+Level: 1
+Component: checks
+Compatible: incomp
+Version: 1.2.5i7
+Date: 1415285052
+Class: fix
+
+Before the check only supported one backup per host, so no item was needed. Now the check supports multiple Backups.
+This means, now a item is in used. A reinventory is now necessary. Also you need to renew you Wato rule (if one).
+
diff --git a/ChangeLog b/ChangeLog
index 38274fb..7e7e81d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,8 @@
* 1485 FIX: dell_om_disks, dell_om_esmlog, dell_om_mem, dell_om_processors, dell_om_sensors: detect more devices...
* 1202 FIX: cisco_power, cisco_temp_perf: Both checks now using a new service description...
NOTE: Please refer to the migration notes!
+ * 1203 FIX: veeam_client: Now supports multiple Backups for one host...
+ NOTE: Please refer to the migration notes!
Multisite:
* 1164 FIX: Fixed links from servicegroup overviews to single servicegroups
diff --git a/checks/veeam_client b/checks/veeam_client
index af6671d..92f3cdc 100644
--- a/checks/veeam_client
+++ b/checks/veeam_client
@@ -28,14 +28,38 @@ factory_settings["veeam_client"] = {
"age": ( 108000, 172800 ), # 30h/2d
}
-def inventory_veeam_client(info):
- if info[0][0] == "Status":
- return [ (None, {} ) ]
-
-def check_veeam_client(item, params, info):
- if not info[0][0] == "Status":
- return 3, "No status data found in first line of agent data"
- data = dict(info[:-1])
+def parse_veeam_client(info):
+ data = {}
+ for line in info:
+ if line[0] == "Status":
+ if len(line) == 2:
+ last_status = line[1]
+ else:
+ # Prevent empty entries
+ last_status = False
+ elif line[0] == 'JobName':
+ if last_status:
+ last_found = line[1]
+ data[last_found] = {}
+ data[last_found]['Status'] = last_status
+ else:
+ if last_status and len(line) == 2:
+ data[last_found][line[0]] = line[1]
+ return data
+
+
+def inventory_veeam_client(parsed):
+ for job in parsed.keys():
+ yield job, {}
+
+def check_veeam_client(item, params, parsed):
+ # Fallback for old None item version
+ #FIXME Can be remvoed in CMK 2.0
+ if item == None:
+ key = parsed.keys()[0]
+ data = parsed[key]
+ else:
+ data = parsed[item]
perfdata = []
infotexts = []
@@ -49,7 +73,8 @@ def check_veeam_client(item, params, info):
infotexts.append("Status: %s" % data['Status'] )
# Only output the Job name
- infotexts.append("Job: %s" % data['JobName'] )
+ if data.get('JobName'):
+ infotexts.append("Job: %s" % data['JobName'] )
@@ -122,7 +147,8 @@ check_info["veeam_client"] = {
'inventory_function': inventory_veeam_client,
'service_description': 'VEEAM Client',
'group': 'veeam_backup',
- "default_levels_variable" : "veeam_client",
+ 'parse_function': parse_veeam_client,
+ 'default_levels_variable' : 'veeam_client',
'has_perfdata': True,
}
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 020ee90..22551c8 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -3691,8 +3691,8 @@ register_check_parameters(
)
)]
),
- None,
- None
+ TextAscii(title=_("Jobname")),
+ "first"
)
register_check_parameters(
Module: check_mk
Branch: master
Commit: 53c8d096cfe712ca92ea887ed8a9058dfd09f8f4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=53c8d096cfe712…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 6 15:16:44 2014 +0100
Fixed path for storing status files of check_mail_loop check
---
doc/treasures/active_checks/check_mail_loop | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/treasures/active_checks/check_mail_loop b/doc/treasures/active_checks/check_mail_loop
index 47a8010..25d341a 100755
--- a/doc/treasures/active_checks/check_mail_loop
+++ b/doc/treasures/active_checks/check_mail_loop
@@ -67,7 +67,7 @@ OPTIONS:
--connect-timeout Timeout in seconds for network connects (defaults to 10)
--status-dir PATH This plugin needs a file to store information about
sent, received and expected mails. Defaults to either
- /tmp/ or /omd/sites/<sitename>/var/tmp when executed
+ /tmp/ or /omd/sites/<sitename>/var/check_mk when executed
from within an OMD site
--status-suffix SUFFIX Concantenated with "check_mail_loop.SUFFIX.status" to
generate the name of the status file. Empty by default
@@ -181,7 +181,7 @@ if fetch_port == None:
if not status_dir:
status_dir = os.environ.get('OMD_ROOT')
if status_dir:
- status_dir += '/var/tmp'
+ status_dir += '/var/check_mk'
else:
status_dir = '/tmp'
if status_suffix:
Module: check_mk
Branch: master
Commit: ebf9b5d7bda110887edbb6c8961aaec8fc7ded75
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ebf9b5d7bda110…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 6 14:59:48 2014 +0100
#1493 Added config option "Default filter group" to set the initial network topology view filter
The new "Network Topology: Default Filter Group" option can be used to initially render a filtered
network topology view when opening it instead of a view which shows all hosts.
---
.werks/1493 | 10 ++++++++++
ChangeLog | 1 +
web/plugins/config/builtin.py | 3 +++
web/plugins/dashboard/builtin.py | 12 ++++++++----
web/plugins/wato/check_mk_configuration.py | 23 +++++++++++++++++++++++
5 files changed, 45 insertions(+), 4 deletions(-)
diff --git a/.werks/1493 b/.werks/1493
new file mode 100644
index 0000000..84fc6ee
--- /dev/null
+++ b/.werks/1493
@@ -0,0 +1,10 @@
+Title: Added config option "Default filter group" to set the initial network topology view filter
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.2.5i7
+Date: 1415282309
+Class: feature
+
+The new "Network Topology: Default Filter Group" option can be used to initially render a filtered
+network topology view when opening it instead of a view which shows all hosts.
diff --git a/ChangeLog b/ChangeLog
index e60f40c..ef702d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,7 @@
Multisite:
* 1508 Allow input of plugin output and perfdata when faking check results...
+ * 1493 Added config option "Default filter group" to set the initial network topology view filter...
* 1164 FIX: Fixed links from servicegroup overviews to single servicegroups
* 1166 FIX: Also prevting stylesheet update issues during version updates (just like for JS files)
* 1481 FIX: Fix broken layout of Host-, Service- and Contactgroup filters
diff --git a/web/plugins/config/builtin.py b/web/plugins/config/builtin.py
index 6e98986..d1054da 100644
--- a/web/plugins/config/builtin.py
+++ b/web/plugins/config/builtin.py
@@ -242,3 +242,6 @@ user_localizations = default_user_localizations
# Write WATO folder permissions to auth.php file
export_folder_permissions = False
+
+# Name of the hostgroup to filter the network topology view by default
+topology_default_filter_group = None
diff --git a/web/plugins/dashboard/builtin.py b/web/plugins/dashboard/builtin.py
index 5d6dd0a..a7f6672 100644
--- a/web/plugins/dashboard/builtin.py
+++ b/web/plugins/dashboard/builtin.py
@@ -187,6 +187,13 @@ builtin_dashboards["main"] = {
#Only work in OMD installations
if defaults.omd_site:
+ def topology_url():
+ return defaults.url_prefix + 'nagvis/frontend/nagvis-js/index.php?' + \
+ 'mod=Map&header_template=on-demand-filter&header_menu=1&label_show=1' + \
+ '&sources=automap&act=view&backend_id=' + defaults.omd_site + \
+ '&render_mode=undirected&url_target=main&filter_group=' + \
+ (config.topology_default_filter_group or '')
+
builtin_dashboards["topology"] = {
"single_infos": [],
"context" : {},
@@ -199,10 +206,7 @@ if defaults.omd_site:
{
"type" : "url",
"title" : "Topology of Site " + defaults.omd_site,
- "url" : defaults.url_prefix + 'nagvis/frontend/nagvis-js/index.php?' + \
- 'mod=Map&header_template=on-demand-filter&header_menu=1&label_show=1' + \
- '&sources=automap&act=view&backend_id=' + defaults.omd_site + \
- '&render_mode=undirected&url_target=main',
+ "urlfunc" : 'topology_url',
"reload_on_resize" : True,
"position" : (1, 1),
"size" : (GROW, GROW),
diff --git a/web/plugins/wato/check_mk_configuration.py b/web/plugins/wato/check_mk_configuration.py
index 9d86a84..1792534 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -466,6 +466,29 @@ register_configvar(group,
domain = "multisite",
)
+# Helper that retrieves the list of hostgroups via Livestatus
+# use alias by default but fallback to name if no alias defined
+def list_hostgroups():
+ groups = dict(html.live.query("GET hostgroups\nCache: reload\nColumns: name alias\n"))
+ return [ (name, groups[name] or name) for name in groups.keys() ]
+
+register_configvar(group,
+ "topology_default_filter_group",
+ Optional(DropdownChoice(
+ choices = list_hostgroups,
+ sorted = True,
+ ),
+ title = _("Network Topology: Default Filter Group"),
+ help = _("By default the network topology view shows you the parent / child relations "
+ "of all hosts within your local site. The list can be filtered based on hostgroup "
+ "memberships by the users. You can define a default group to use for filtering "
+ "which is used when a user opens the network topology view."),
+ none_label = _("Show all hosts when opening the network topology view"),
+ default_value = None,
+ ),
+ domain = "multisite"
+)
+
#.
# .--WATO----------------------------------------------------------------.
# | __ ___ _____ ___ |
Module: check_mk
Branch: master
Commit: 26e1086705b521fef4f1d3edf04bb7a10bfdc41d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=26e1086705b521…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 6 14:23:57 2014 +0100
#1492 FIX Fixed too long URL bug when deleting a timeperiod right after creating one
---
.werks/1492 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/1492 b/.werks/1492
new file mode 100644
index 0000000..47db6bf
--- /dev/null
+++ b/.werks/1492
@@ -0,0 +1,10 @@
+Title: Fixed too long URL bug when deleting a timeperiod right after creating one
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.5i7
+Date: 1415280213
+
+
diff --git a/ChangeLog b/ChangeLog
index ed86bc6..e60f40c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -39,6 +39,7 @@
* 1165 FIX: Fixed exception in service discovery of logwatch event console forwarding checks...
* 1490 FIX: Timperiod excludes can now even be configured when creating a timeperiod...
* 1491 FIX: Fixed bug in dynamic lists where removing an item was not always possible...
+ * 1492 FIX: Fixed too long URL bug when deleting a timeperiod right after creating one
Notifications:
* 1168 FIX: HTML mails can now be configured to display graphs among each other...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 103a006..8dea064 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -9182,7 +9182,7 @@ def mode_timeperiods(phase):
timeperiod = timeperiods[name]
edit_url = make_link([("mode", "edit_timeperiod"), ("edit", name)])
- delete_url = html.makeactionuri([("_delete", name)])
+ delete_url = make_action_link([("mode", "timeperiods"), ("_delete", name)])
table.cell(_("Actions"), css="buttons")
html.icon_button(edit_url, _("Properties"), "edit")
Module: check_mk
Branch: master
Commit: 663b5ceede70100be9289cf9b14cef3ffa979e81
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=663b5ceede7010…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 6 13:52:44 2014 +0100
Clarified meaning of timeperiod exceptions
---
web/htdocs/wato.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index d7b6a65..6699527 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -9535,7 +9535,7 @@ def mode_edit_timeperiod(phase):
if not timeperiod_excludes(timeperiods, tpname, name):
other_tps.append((tpname, tp.get("alias") or name))
- vs_excl = ListChoice(choices = other_tps)
+ vs_excl = ListChoice(choices=other_tps)
# convert Check_MK representation of range to ValueSpec-representation
def convert_from_tod(tod):
@@ -9683,9 +9683,11 @@ def mode_edit_timeperiod(phase):
html.write("</table>")
# Exceptions
- forms.section(_("Exceptions"))
+ forms.section(_("Exceptions (from weekdays)"))
html.help(_("Here you can specify exceptional time ranges for certain "
- "dates in the form YYYY-MM-DD."))
+ "dates in the form YYYY-MM-DD which are used to define more "
+ "specific definitions to override the times configured for the matching "
+ "weekday."))
exceptions = []
for k in timeperiod:
@@ -9697,6 +9699,8 @@ def mode_edit_timeperiod(phase):
# Excludes
if other_tps:
forms.section(_("Exclude"))
+ html.help(_('You can use other timeperiod defnitions to exclude the times '
+ 'defined in the other timeperiods from this current timeperiod.'))
vs_excl.render_input("exclude", timeperiod.get("exclude", []))
Module: check_mk
Branch: master
Commit: 8d18825445e677d91d5002b49156b269cae51d36
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8d18825445e677…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 6 13:41:58 2014 +0100
#1491 FIX Fixed bug in dynamic lists where removing an item was not always possible
We use the so called valuespec ListOf() in several places where a dynamic amount
of elements can be added to a list of things, for example the number of exceptions
of a timeperiod in the timeperiod edit dialog.
Now, when you created a new timeperiod, added one exception and imediately removed
it, you had no chance to save this timeperiod without adding another exception to
the list. This has been fixed now.
---
.werks/1491 | 16 ++++++++++++++++
ChangeLog | 1 +
web/htdocs/valuespec.py | 10 +++++++---
3 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/.werks/1491 b/.werks/1491
new file mode 100644
index 0000000..ae33d74
--- /dev/null
+++ b/.werks/1491
@@ -0,0 +1,16 @@
+Title: Fixed bug in dynamic lists where removing an item was not always possible
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.5i7
+Date: 1415277372
+
+We use the so called valuespec ListOf() in several places where a dynamic amount
+of elements can be added to a list of things, for example the number of exceptions
+of a timeperiod in the timeperiod edit dialog.
+
+Now, when you created a new timeperiod, added one exception and imediately removed
+it, you had no chance to save this timeperiod without adding another exception to
+the list. This has been fixed now.
diff --git a/ChangeLog b/ChangeLog
index 55d95d7..a2b9d9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -37,6 +37,7 @@
* 1489 Added iCalendar import for generating timeperiods e.g. for holidays...
* 1165 FIX: Fixed exception in service discovery of logwatch event console forwarding checks...
* 1490 FIX: Timperiod excludes can now even be configured when creating a timeperiod...
+ * 1491 FIX: Fixed bug in dynamic lists where removing an item was not always possible...
Notifications:
* 1168 FIX: HTML mails can now be configured to display graphs among each other...
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index b8e1695..3ab26c8 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -845,7 +845,7 @@ class ListOf(ValueSpec):
# original 'value' but take the value from the HTML variables.
if html.has_var("%s_count" % varprefix):
filled_in = True
- count = int(html.var("%s_count" % varprefix))
+ count = len(self.get_indexes(varprefix))
value = [None] * count # dummy for the loop
else:
filled_in = False
@@ -892,16 +892,20 @@ class ListOf(ValueSpec):
s += '<tr><td>%s</td></tr>' % self._valuespec.value_to_text(v)
return s + '</table>'
- def from_html_vars(self, varprefix):
+ def get_indexes(self, varprefix):
count = int(html.var(varprefix + "_count"))
n = 1
indexes = {}
while n <= count:
indexof = html.var(varprefix + "_indexof_%d" % n)
- if indexof != None: # deleted entry
+ # for deleted entries, we have removed the whole row, therefore indexof is None
+ if indexof != None:
indexes[int(indexof)] = n
n += 1
+ return indexes
+ def from_html_vars(self, varprefix):
+ indexes = self.get_indexes(varprefix)
value = []
k = indexes.keys()
k.sort()
Module: check_mk
Branch: master
Commit: b06827416bb071781498b1fa51f9d69dc675b95f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b06827416bb071…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 6 12:19:08 2014 +0100
Fixed SyntaxWarning in apache error log (used prior to global declaration)
---
web/htdocs/images/icon_ical.png | Bin 0 -> 4711 bytes
web/htdocs/userdb.py | 3 +--
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/web/htdocs/images/icon_ical.png b/web/htdocs/images/icon_ical.png
new file mode 100644
index 0000000..d3b8f47
Binary files /dev/null and b/web/htdocs/images/icon_ical.png differ
diff --git a/web/htdocs/userdb.py b/web/htdocs/userdb.py
index 9ab3306..753a357 100644
--- a/web/htdocs/userdb.py
+++ b/web/htdocs/userdb.py
@@ -40,6 +40,7 @@ builtin_user_attribute_names = []
def load_plugins():
global user_attributes
global multisite_user_connectors
+ global builtin_user_attribute_names
# Do not cache the custom user attributes. They can be created by the user
# during runtime, means they need to be loaded during each page request.
@@ -59,8 +60,6 @@ def load_plugins():
multisite_user_connectors = []
load_web_plugins("userdb", globals())
-
- global builtin_user_attribute_names
builtin_user_attribute_names = user_attributes.keys()
declare_custom_user_attrs()
Module: check_mk
Branch: master
Commit: 5a2c2f9eb9ce1f082e373d0b941f7f343df9b8e0
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5a2c2f9eb9ce1f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 6 12:25:55 2014 +0100
#1489 Added iCalendar import for generating timeperiods e.g. for holidays
The timeperiod management module of WATO has been extended with an import
mode vor iCalendar (*.ics) files. This can be used to easily create timeperiods
for holidays which then can be used to exclude them from your other timeperiods.
There are a lot of pages on the internet which provide you with iCalendar including
the appointments for either the holidays of specific years. They might also contain
appointments which have a recurrence configured, e.g. on a yearly base. The import
currently deals with monthly and yearly recurrences of appointments by resolving them
for the configured time horizon.
After interpreting the iCalendar file, you will be redirected to the timeperiod
creation dialog where you can either modify the prefilled values or just confirm
the dialog to finally create the timeperiod.
---
.werks/1489 | 21 +++++
ChangeLog | 1 +
web/htdocs/valuespec.py | 1 +
web/htdocs/wato.py | 227 +++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 250 insertions(+)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=5a2c2f9eb9…