Module: check_mk
Branch: master
Commit: 3a49369fc6b6d7e72eb8268ba55b35193684a14c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3a49369fc6b6d7…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Feb 3 10:52:24 2015 +0100
#1933 esx_vsphere_objects: now able to set a different alert level when the host/vm reports 'unknown'
The unknown level can be configured via the WATO rule <i>State of ESX hosts and virtual machines</i>
---
.werks/1933 | 11 +++++++++++
ChangeLog | 1 +
web/plugins/wato/check_parameters.py | 7 +++++++
3 files changed, 19 insertions(+)
diff --git a/.werks/1933 b/.werks/1933
new file mode 100644
index 0000000..188ce7c
--- /dev/null
+++ b/.werks/1933
@@ -0,0 +1,11 @@
+Title: esx_vsphere_objects: now able to set a different alert level when the host/vm reports 'unknown'
+Level: 1
+Component: checks
+Class: feature
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1422957021
+
+The unknown level can be configured via the WATO rule <i>State of ESX hosts and virtual machines</i>
+
diff --git a/ChangeLog b/ChangeLog
index 49129db..d413469 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -70,6 +70,7 @@
* 1968 qlogic_fcport, qlogic_sanbox, qlogic_sanbox_fabric_element: Supporting SAN Switch Module for IBM BladeCenter(R) now
* 1220 if,if64: Discovery can now be based on port description...
* 1930 Windows agent: now able to unpack plugins.cap file (created by Check_MK agent bakery)...
+ * 1933 esx_vsphere_objects: now able to set a different alert level when the host/vm reports 'unknown'...
* 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_parameters.py b/web/plugins/wato/check_parameters.py
index 59a564f..04c5eeb 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -3216,6 +3216,13 @@ register_check_parameters(
default_value = 1,
)
),
+ ( "unknown",
+ MonitoringState(
+ title = _("Unknown"),
+ help = _("Check result if the host or VM state is reported as <i>unknown</i>"),
+ default_value = 3,
+ )
+ ),
]
)
),
Module: check_mk
Branch: master
Commit: 4ce3d01fbbaf615c2e870c03974a73e65e641279
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4ce3d01fbbaf61…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Feb 2 16:02:02 2015 +0100
#1931 FIX agent_vsphere: no longer crashes when host has no license information
---
.werks/1931 | 10 ++++++++++
ChangeLog | 1 +
agents/special/agent_vsphere | 5 ++++-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/1931 b/.werks/1931
new file mode 100644
index 0000000..bf9f995
--- /dev/null
+++ b/.werks/1931
@@ -0,0 +1,10 @@
+Title: agent_vsphere: no longer crashes when host has no license information
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1422889303
+
+
diff --git a/ChangeLog b/ChangeLog
index f477999..aaf50a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -135,6 +135,7 @@
* 1970 FIX: lparstat_aix: Made the check compatible to different kind of lparstat output...
* 1971 FIX: printer_input/printer_output: Discovery is using name field when available no...
NOTE: Please refer to the migration notes!
+ * 1931 FIX: agent_vsphere: no longer crashes when host has no license information
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
diff --git a/agents/special/agent_vsphere b/agents/special/agent_vsphere
index 505aa9d..e64884c 100755
--- a/agents/special/agent_vsphere
+++ b/agents/special/agent_vsphere
@@ -703,7 +703,10 @@ if not error:
license_hosts = get_pattern('<returnval>(.*?)</returnval>', licenses_response)
licenses = {}
for host in license_hosts:
- key, name, total, used = get_pattern("<licenseKey>(.*?)</licenseKey>.*?<name>(.*?)</name><total>(.*?)</total><used>(.*?)</used>", host)[0]
+ license_info = get_pattern("<licenseKey>(.*?)</licenseKey>.*?<name>(.*?)</name><total>(.*?)</total><used>(.*?)</used>", host)
+ if not license_info:
+ continue
+ key, name, total, used = license_info[0]
# We merge all entries with the same name, duplicate keys are ignored since they provide the same data
licenses.setdefault(name, {"used_keys": [], "total": 0, "used": 0})
if key not in licenses[name]["used_keys"]:
Module: check_mk
Branch: master
Commit: 6c47884c96f75f885792b2fe0109ebffdf6b9c68
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6c47884c96f75f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Feb 2 13:44:40 2015 +0100
#1974 FIX Event console views were randomly ignoring host filters
Some times the event console views were accessed with a host filter,
for example using the name of a host, the view was showing events
which did not belong to this host. After reloading the page, the
view was showing a correctly filtered list again some times.
---
.werks/1974 | 13 +++++++++++++
ChangeLog | 1 +
mkeventd/web/plugins/views/mkeventd.py | 5 ++---
3 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/.werks/1974 b/.werks/1974
new file mode 100644
index 0000000..6cb7863
--- /dev/null
+++ b/.werks/1974
@@ -0,0 +1,13 @@
+Title: Event console views were randomly ignoring host filters
+Level: 1
+Component: ec
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1422880977
+
+Some times the event console views were accessed with a host filter,
+for example using the name of a host, the view was showing events
+which did not belong to this host. After reloading the page, the
+view was showing a correctly filtered list again some times.
diff --git a/ChangeLog b/ChangeLog
index 6bace5b..6ca25b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -208,6 +208,7 @@
* 1878 SEC: Fixed possible shell injection when filtering the EC archive...
* 1839 FIX: Fix exception when notifying EC alert into monitoring for traps (because PID is missing)
* 1813 FIX: Fixed bug in event console rule editor when no contact groups configured
+ * 1974 FIX: Event console views were randomly ignoring host filters...
HW/SW-Inventory:
* 1846 Keep track of changes of software and hardware...
diff --git a/mkeventd/web/plugins/views/mkeventd.py b/mkeventd/web/plugins/views/mkeventd.py
index abab801..7afca6c 100644
--- a/mkeventd/web/plugins/views/mkeventd.py
+++ b/mkeventd/web/plugins/views/mkeventd.py
@@ -42,7 +42,7 @@ except:
# '----------------------------------------------------------------------'
def table_events(what, columns, add_headers, only_sites, limit, filters):
- # First we wetch the list of all events from mkeventd - either current
+ # First we fetch the list of all events from mkeventd - either current
# or historic ones. We ignore any filters for host_ here. Note:
# event_host and host_name needn't be compatible. They might differ
# in case. Also in the events table instead of the host name there
@@ -139,7 +139,7 @@ def table_events(what, columns, add_headers, only_sites, limit, filters):
filter_code = filt.filter('event')
if filter_code:
have_host_filter = True
- break
+ break
if not have_host_filter:
# Create empty host for outer join on host table
@@ -148,7 +148,6 @@ def table_events(what, columns, add_headers, only_sites, limit, filters):
empty_host["host_state"] = 0
empty_host["host_has_been_checked"] = 0
-
# We're ready to join the host-data with the event data now. The question
# is what to do with events that cannot be mapped to a host...
new_rows = []
Module: check_mk
Branch: master
Commit: d51ddd84bb6bf0b2b2bd254d51a69305a3b4dec7
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d51ddd84bb6bf0…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Mon Feb 2 13:42:19 2015 +0100
#1220 if,if64: Discovery can now be based on port description
Like in Werk #1509 for ifAlias, interface checks can now also filter by ifDesc without the need to use the ifdescription as part of the service description
---
.werks/1220 | 10 ++++++++++
ChangeLog | 1 +
checks/if.include | 12 +++++++-----
web/plugins/wato/check_parameters.py | 11 ++++++++++-
4 files changed, 28 insertions(+), 6 deletions(-)
diff --git a/.werks/1220 b/.werks/1220
new file mode 100644
index 0000000..4bebc4c
--- /dev/null
+++ b/.werks/1220
@@ -0,0 +1,10 @@
+Title: if,if64: Discovery can now be based on port description
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1422880649
+Class: feature
+
+Like in Werk #1509 for ifAlias, interface checks can now also filter by ifDesc without the need to use the ifdescription as part of the service description
+
diff --git a/ChangeLog b/ChangeLog
index 13071fe..6bace5b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -68,6 +68,7 @@
* 1958 akcp_daisy_smoke: added new check for smoke sensors on expansion boards which are daisy chained to an AKCP securityProbe 5E...
* 1219 synology_disks, synology_fans, synology_info, synology_raid, synology_status, synology_update: Multiple Synology NAS Checks
* 1968 qlogic_fcport, qlogic_sanbox, qlogic_sanbox_fabric_element: Supporting SAN Switch Module for IBM BladeCenter(R) now
+ * 1220 if,if64: Discovery can now be based on port description...
* 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/if.include b/checks/if.include
index e6bd09f..d484ef9 100644
--- a/checks/if.include
+++ b/checks/if.include
@@ -131,12 +131,13 @@ def inventory_if_common(info, has_nodeinfo = False):
porttypes = settings.get('porttypes', if_inventory_porttypes)
portstates = settings.get('portstates', if_inventory_portstates)
match_alias = settings.get('match_alias')
+ match_desc = settings.get('match_desc')
- def alias_matches(alias):
- if match_alias == None:
+ def port_match(name, what):
+ if what == None:
return True
- for r in match_alias:
- if regex(r).match(alias):
+ for r in what:
+ if regex(r).match(name):
return True
return False
@@ -215,7 +216,8 @@ def inventory_if_common(info, has_nodeinfo = False):
duplicate.add(item)
seen_items.add(item)
- if ifType in porttypes and ifOperStatus in portstates and alias_matches(ifAlias):
+ if ifType in porttypes and ifOperStatus in portstates and \
+ port_match(ifAlias, match_alias) and port_match(ifDescr, match_desc):
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 5af6329..59a564f 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -252,7 +252,16 @@ register_rule(group + '/' + subgroup_inventory,
orientation = "horizontal",
valuespec = RegExp(size = 32),
)),
-
+ ( "match_desc",
+ ListOfStrings(
+ title = _("Match interface description (regex)"),
+ help = _("Only discover interfaces whose the description matches one of the configured "
+ "regular expressions. The match is done on the beginning of the description. "
+ "This allows you to select interfaces based on the description without having "
+ "the alias be part of the service description."),
+ orientation = "horizontal",
+ valuespec = RegExp(size = 32),
+ )),
( "portstates",
ListChoice(title = _("Network interface port states to discover"),
help = _("When doing discovery on switches or other devices with network interfaces "