Module: check_mk
Branch: master
Commit: be5f253448ef6fdad7db334798323a5a5f2b9b44
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=be5f253448ef6f…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Nov 13 15:20:54 2014 +0100
#1437 FIX veeam_jobs: fixed incorrect state for BackupSync job
The check now reports an OK state when type is <tt>BackupSync</tt> and the current state is <tt>Idle</tt>.
Previously it checked the backup status for <tt>Idle</tt>
---
.werks/1437 | 11 +++++++++++
ChangeLog | 1 +
checks/veeam_jobs | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/1437 b/.werks/1437
new file mode 100644
index 0000000..dbf1f74
--- /dev/null
+++ b/.werks/1437
@@ -0,0 +1,11 @@
+Title: veeam_jobs: fixed incorrect state for BackupSync job
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.5i7
+Date: 1415886692
+
+The check now reports an OK state when type is <tt>BackupSync</tt> and the current state is <tt>Idle</tt>.
+Previously it checked the backup status for <tt>Idle</tt>
diff --git a/ChangeLog b/ChangeLog
index 9e22544..9de321b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,6 +29,7 @@
* 1446 FIX: cisco_temp_perf: Check now finds missing sensors in case where also cisco_temp_sensor is being used....
* 1203 FIX: veeam_client: Now supports multiple Backups for one host...
NOTE: Please refer to the migration notes!
+ * 1437 FIX: veeam_jobs: fixed incorrect state for BackupSync job...
Multisite:
* 1508 Allow input of plugin output and perfdata when faking check results...
diff --git a/checks/veeam_jobs b/checks/veeam_jobs
index 50ebc3b..9418253 100644
--- a/checks/veeam_jobs
+++ b/checks/veeam_jobs
@@ -48,7 +48,7 @@ def check_veeam_jobs(item, _no_params, info):
if backup_status == "Success":
state = 0
- elif backup_status == 'Idle' and backup_type == "BackupSync":
+ elif backup_current == 'Idle' and backup_type == "BackupSync":
# A sync job is always idle
state = 0
elif backup_current == "Working":
Module: check_mk
Branch: master
Commit: 0f218818139e6e1deeb8a0cc9fed4955105c4be9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0f218818139e6e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Nov 13 15:18:48 2014 +0100
#1511 FIX oracle_jobs: avoid broken checks, make compatible with old version
After the introduction of the necessary job owner, previous checks would fail
until reinventorized. This has been fixed. The check is now compatible with
old checks where the job owner is not yet contained in the item.
---
.werks/1511 | 13 +++++++++++++
ChangeLog | 1 +
checks/oracle_jobs | 14 +++++++-------
3 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/.werks/1511 b/.werks/1511
new file mode 100644
index 0000000..b225d21
--- /dev/null
+++ b/.werks/1511
@@ -0,0 +1,13 @@
+Title: oracle_jobs: avoid broken checks, make compatible with old version
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.5i7
+Date: 1415888257
+
+After the introduction of the necessary job owner, previous checks would fail
+until reinventorized. This has been fixed. The check is now compatible with
+old checks where the job owner is not yet contained in the item.
+
diff --git a/ChangeLog b/ChangeLog
index 9e22544..2165c9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,6 +29,7 @@
* 1446 FIX: cisco_temp_perf: Check now finds missing sensors in case where also cisco_temp_sensor is being used....
* 1203 FIX: veeam_client: Now supports multiple Backups for one host...
NOTE: Please refer to the migration notes!
+ * 1511 FIX: oracle_jobs: avoid broken checks, make compatible with old version...
Multisite:
* 1508 Allow input of plugin output and perfdata when faking check results...
diff --git a/checks/oracle_jobs b/checks/oracle_jobs
index cf5eb0d..c285bfb 100644
--- a/checks/oracle_jobs
+++ b/checks/oracle_jobs
@@ -45,21 +45,21 @@ def inventory_oracle_jobs(info):
return [ ( ("%s.%s.%s" % (line[0], line[1], line[2])), {} ) for line in info ]
def check_oracle_jobs(item, params, info):
- try:
- if item.count('.') == 2:
- sid, job_owner, job_name = item.split('.')
- except ValueError:
- return (3, 'Invalid check item given (<SID>.<job_owner>.<job_name> expected)')
+ if item.count('.') == 2:
+ sid, job_owner, job_name = item.split('.')
+ else:
+ # old format without job owner. Simply ignore owner.
+ sid, job_name = item.split('.')
+ job_owner = None
data_found = False
for line in info:
-
service_found = False
if line[0] == sid:
data_found = True
- if (line[0] == sid and line[1] == job_owner and line[2] == job_name):
+ if line[0] == sid and (line[1] == job_owner or job_owner == None) and line[2] == job_name:
service_found = True
param_disabled = params["disabled"]
Module: check_mk
Branch: master
Commit: d6c885c324830bf5b85e79c4ccda792420c73502
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d6c885c324830b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Nov 13 13:34:08 2014 +0100
mssql_backup: ignore trailing garbadge in agent output
---
checks/mssql_backup | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/checks/mssql_backup b/checks/mssql_backup
index ad550d7..5de613c 100644
--- a/checks/mssql_backup
+++ b/checks/mssql_backup
@@ -24,17 +24,21 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
+
+# TODO: Remove this. Use time.strptime and time.strftime!!
import datetime
-#<<<mssql_backup>>>
-#MSSQL_SQLEXPRESS test123 1331207325
+# <<<mssql_backup>>>
+# MSSQL_SQLEXPRESS test123 1331207325
# Might be None to have no thresholds or a tuple of two ints
# (<warn age in seconds>, <crit age in seconds>)
mssql_backup_default_levels = None
def inventory_mssql_backup(info):
- return [ (line[0] + ' ' + line[1], 'mssql_backup_default_levels') for line in info ]
+ return [ (line[0] + ' ' + line[1], 'mssql_backup_default_levels')
+ for line in info
+ if len(line) == 4 ]
def check_mssql_backup(item, params, info):
for line in info:
Module: check_mk
Branch: master
Commit: 0a21ef228fb05a67a90c00e98b2350245ef47b08
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0a21ef228fb05a…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Nov 13 12:32:10 2014 +0100
#1436 FIX quicksearch: search with multiple patterns (h: / s:) no longer discards the host pattern
The host filter name of the target page was renamed from <tt>host</tt> to <tt>host_regex</tt>.
The quicksearch still used the old filter name to insert this data. Therefore the host pattern
data got discarded.
---
.werks/1436 | 13 +++++++++++++
ChangeLog | 1 +
web/plugins/sidebar/search.py | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/1436 b/.werks/1436
new file mode 100644
index 0000000..d6a8e75
--- /dev/null
+++ b/.werks/1436
@@ -0,0 +1,13 @@
+Title: quicksearch: search with multiple patterns (h: / s:) no longer discards the host pattern
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.5i7
+Date: 1415878184
+
+The host filter name of the target page was renamed from <tt>host</tt> to <tt>host_regex</tt>.
+The quicksearch still used the old filter name to insert this data. Therefore the host pattern
+data got discarded.
+
diff --git a/ChangeLog b/ChangeLog
index 9b0cd18..9e22544 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -47,6 +47,7 @@
* 1433 FIX: Quicksearch: no longer shows an invalid search result when looking for multiple hosts...
* 1494 FIX: Fixed error in NagVis Maps snapin when some users had no contact groups assigned
* 1496 FIX: Fixed exception after editing a dashboard as user without permission to publish dashboards...
+ * 1436 FIX: quicksearch: search with multiple patterns (h: / s:) no longer discards the host pattern...
WATO:
* 1170 Added buttons to move rules to top/bottom of the list to ruleset edit dialog
diff --git a/web/plugins/sidebar/search.py b/web/plugins/sidebar/search.py
index 2f03873..9b7aae8 100644
--- a/web/plugins/sidebar/search.py
+++ b/web/plugins/sidebar/search.py
@@ -244,7 +244,7 @@ def search_host_service_url_tmpl(used_filters, data, host_is_ip = False):
tmpl = 'view.py?view_name=searchsvc&filled_in=filter'
for url_param, qs_name in [ ("service_regex", "services" ),
host_is_ip and ("host_address", "host" )\
- or ("host", "hosts" ),
+ or ("host_regex", "hosts" ),
("opthostgroup", "hostgroups" ),
("optservicegroup", "servicegroups")]:
if filters_combined.get(qs_name):
Module: check_mk
Branch: master
Commit: 1169df43c5ec7e0f3e7dabf1bd529b2b6c5d031d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1169df43c5ec7e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Nov 13 09:50:02 2014 +0100
#1509 if, if64: New option for make inventory based on port alias
All interface checks now allow to inventory just those ports whose
alias matches one of a list of regular expressions. These are a new
option in the WATO rule <i>Network Interface and Switch Port Inventory</i>.
This allows you to control which ports are monitored based on the alias
<b>without</b> using the alias as the service description.
---
.werks/1509 | 13 +++++++++++++
ChangeLog | 1 +
checkman/if64 | 2 +-
checks/if.include | 11 ++++++++++-
web/plugins/wato/check_parameters.py | 26 +++++++++++++++++++++-----
5 files changed, 46 insertions(+), 7 deletions(-)
diff --git a/.werks/1509 b/.werks/1509
new file mode 100644
index 0000000..d57236f
--- /dev/null
+++ b/.werks/1509
@@ -0,0 +1,13 @@
+Title: if, if64: New option for make inventory based on port alias
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1415868493
+Class: feature
+
+All interface checks now allow to inventory just those ports whose
+alias matches one of a list of regular expressions. These are a new
+option in the WATO rule <i>Network Interface and Switch Port Inventory</i>.
+This allows you to control which ports are monitored based on the alias
+<b>without</b> using the alias as the service description.
diff --git a/ChangeLog b/ChangeLog
index 375d694..9b0cd18 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,7 @@
* 1507 New optional parse_function for check API...
* 1445 quantum_libsmall_door, quantum_libsmall_status: Two new checks for monitoring small Quantum tape libraries
* 1448 domino_info: check is extended to also show and monitor the lnNotesServerState
+ * 1509 if, if64: New option for make inventory based on port alias...
* 1478 FIX: kernel.util, statgrab_cpu: fix computation of utilization...
* 1480 FIX: brocade_vdx_status: disable check on some devices that do not support it...
* 1485 FIX: dell_om_disks, dell_om_esmlog, dell_om_mem, dell_om_processors, dell_om_sensors: detect more devices...
diff --git a/checkman/if64 b/checkman/if64
index 036fb5e..2eb81b9 100644
--- a/checkman/if64
+++ b/checkman/if64
@@ -46,7 +46,7 @@ item:
inventory:
The inventory creates one service for each port that fulfills configurable conditions.
Per default these are ports which are currently found {up} and are of types {6} (ethernetCsmacd),
- {32} (frameRelay) or {117} (gigabitEthernet).
+ {32} (frameRelay), {117} (gigabitEthernet) or several others.
{Grouping:} In some situations you do not want to monitor a single
interface but a group of interfaces that together form a pool.
diff --git a/checks/if.include b/checks/if.include
index f7f3c60..d5de510 100644
--- a/checks/if.include
+++ b/checks/if.include
@@ -116,6 +116,15 @@ def inventory_if_common(info, has_nodeinfo = False):
uses_alias = settings.get('use_alias', if_inventory_uses_alias)
porttypes = settings.get('porttypes', if_inventory_porttypes)
portstates = settings.get('portstates', if_inventory_portstates)
+ match_alias = settings.get('match_alias')
+
+ def alias_matches(alias):
+ if match_alias == None:
+ return True
+ for regex in match_alias:
+ if get_regex(regex).match(alias):
+ return True
+ return False
# Allow main check to set no port type (e.g. hitachi_hnas_fc_if)
porttypes.append("")
@@ -176,7 +185,7 @@ def inventory_if_common(info, has_nodeinfo = False):
duplicate.add(item)
seen_items.add(item)
- if ifType in porttypes and ifOperStatus in portstates:
+ if ifType in porttypes and ifOperStatus in portstates and alias_matches(ifAlias):
params = {}
if if_inventory_monitor_state:
params["state"] = [ifOperStatus]
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 49ea1c4..46f5814 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -227,26 +227,41 @@ register_rule(group + '/' + subgroup_inventory,
title = _("Network Interface and Switch Port Inventory"),
valuespec = Dictionary(
elements = [
- ("use_desc", Checkbox(
+ ( "use_desc",
+ Checkbox(
title = _("Use description as service name for network interface checks"),
label = _("use description"),
help = _("This option lets Check_MK use the interface description as item instead "
"of the port number. If no description is available then the port number is "
"used anyway."))),
- ("use_alias", Checkbox(
+ ( "use_alias",
+ Checkbox(
title = _("Use alias as service name for network interface checks"),
label = _("use alias"),
help = _("This option lets Check_MK use the alias of the port (ifAlias) as item instead "
"of the port number. If no alias is available then the port number is used "
"anyway."))),
- ("portstates", ListChoice(title = _("Network interface port states to inventorize"),
+ ( "match_alias",
+ ListOfStrings(
+ title = _("Match interface alias (regex)"),
+ help = _("Only inventorize interfaces whose alias matches one of the configured "
+ "regular expressions. The match is done on the beginning of the alias. "
+ "This allows you to select interfaces based on the alias without having "
+ "the alias be part of the service description."),
+ orientation = "horizontal",
+ valuespec = RegExp(size = 32),
+ )),
+
+ ( "portstates",
+ ListChoice(title = _("Network interface port states to inventorize"),
help = _("When doing inventory on switches or other devices with network interfaces "
"then only ports found in one of the configured port states will be added to the monitoring."),
choices = _if_portstate_choices,
toggle_all = True,
default_value = ['1'],
)),
- ("porttypes", ListChoice(title = _("Network interface port types to inventorize"),
+ ( "porttypes",
+ ListChoice(title = _("Network interface port types to inventorize"),
help = _("When doing inventory on switches or other devices with network interfaces "
"then only ports of the specified types will be created services for."),
choices = _if_porttype_choices,
@@ -254,7 +269,8 @@ register_rule(group + '/' + subgroup_inventory,
toggle_all = True,
default_value = [ '6', '32', '62', '117', '127', '128', '129', '180', '181', '182', '205','229' ],
)),
- ("rmon", Checkbox(
+ ( "rmon",
+ Checkbox(
title = _("Collect RMON statistics data"),
help = _("If you enable this option, for every RMON capable switch port an additional service will "
"be created which is always OK and collects RMON data. This will give you detailed information "