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 "
Module: check_mk
Branch: master
Commit: 3e5a158c3d3152f3c76c2049bb07842eda9cd3c2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3e5a158c3d3152…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Wed Nov 12 16:20:58 2014 +0100
Fixed werk description again
---
.werks/1446 | 2 +-
ChangeLog | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.werks/1446 b/.werks/1446
index f0bb514..ccd04b9 100644
--- a/.werks/1446
+++ b/.werks/1446
@@ -3,7 +3,7 @@ Level: 1
Component: checks
Compatible: compat
Version: 1.2.5i7
-Date: 1415804682
+Date: 1415142000
Class: fix
<tt>cisco_temp_perf</tt> previously didn't inventorize on hosts where <tt>cisco_temp_sensor</tt>
diff --git a/ChangeLog b/ChangeLog
index 81764df..375d694 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,9 +25,9 @@
* 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!
+ * 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!
- * 1446 FIX: cisco_temp_perf: Check now finds missing sensors in case where also cisco_temp_sensor is being used....
Multisite:
* 1508 Allow input of plugin output and perfdata when faking check results...
Module: check_mk
Branch: master
Commit: 6455c932c1b44db5e4c0a38fc93235715f96503d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6455c932c1b44d…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Wed Nov 12 16:13:06 2014 +0100
Fixed werk description
---
.werks/1446 | 7 +++++--
ChangeLog | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/.werks/1446 b/.werks/1446
index 4034f96..f0bb514 100644
--- a/.werks/1446
+++ b/.werks/1446
@@ -1,9 +1,12 @@
-Title: cisco_temp_perf: Modified scan function for check to be inventorized alongside cisco_temp_sensor. Can lead to duplicate services in some cases
+Title: cisco_temp_perf: Check now finds missing sensors in case where also cisco_temp_sensor is being used.
Level: 1
Component: checks
Compatible: compat
Version: 1.2.5i7
Date: 1415804682
-Class: feature
+Class: fix
+<tt>cisco_temp_perf</tt> previously didn't inventorize on hosts where <tt>cisco_temp_sensor</tt>
+was being used. This has been changed to find sensors that were previously
+missing, but might lead to some sensors appearing twice in some cases.
diff --git a/ChangeLog b/ChangeLog
index 4ef66aa..81764df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,7 +20,6 @@
* 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
- * 1446 cisco_temp_perf: Modified scan function for check to be inventorized alongside cisco_temp_sensor. Can lead to duplicate services in some cases
* 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...
@@ -28,6 +27,7 @@
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!
+ * 1446 FIX: cisco_temp_perf: Check now finds missing sensors in case where also cisco_temp_sensor is being used....
Multisite:
* 1508 Allow input of plugin output and perfdata when faking check results...
Module: check_mk
Branch: master
Commit: 06efb1aaaf115367828a928ebde33aa03fc0064a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=06efb1aaaf1153…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Wed Nov 12 16:06:39 2014 +0100
#1446 cisco_temp_perf: Modified scan function for check to be inventorized alongside cisco_temp_sensor. Can lead to duplicate services in some cases
---
.werks/1446 | 9 +++++++++
ChangeLog | 1 +
2 files changed, 10 insertions(+)
diff --git a/.werks/1446 b/.werks/1446
new file mode 100644
index 0000000..4034f96
--- /dev/null
+++ b/.werks/1446
@@ -0,0 +1,9 @@
+Title: cisco_temp_perf: Modified scan function for check to be inventorized alongside cisco_temp_sensor. Can lead to duplicate services in some cases
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1415804682
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 3eba1cf..4ef66aa 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
+ * 1446 cisco_temp_perf: Modified scan function for check to be inventorized alongside cisco_temp_sensor. Can lead to duplicate services in some cases
* 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...