Module: check_mk
Branch: master
Commit: b32f9bb5ff6d07d785966ce25c8606e6548d050b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b32f9bb5ff6d07…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Tue Jan 20 12:15:33 2015 +0100
#1524 kentix_temp: Now supports setting levels
Previously, this check only used the levels configured in the device.
Now, setting own levels is possible, as well as specifying which levels
have priority.
As the service description and the item name has changed, re-inventory
is required
---
.werks/1524 | 14 ++++++++++++
ChangeLog | 2 ++
checkman/kentix_temp | 32 ++++++++++++++++++++++++---
checks/kentix_temp | 43 ++++++++++++++++--------------------
web/plugins/perfometer/check_mk.py | 1 +
5 files changed, 65 insertions(+), 27 deletions(-)
diff --git a/.werks/1524 b/.werks/1524
new file mode 100644
index 0000000..9b786eb
--- /dev/null
+++ b/.werks/1524
@@ -0,0 +1,14 @@
+Title: kentix_temp: Now supports setting levels
+Level: 1
+Component: checks
+Compatible: incomp
+Version: 1.2.7i1
+Date: 1421752383
+Class: feature
+
+Previously, this check only used the levels configured in the device.
+Now, setting own levels is possible, as well as specifying which levels
+have priority.
+As the service description and the item name has changed, re-inventory
+is required
+
diff --git a/ChangeLog b/ChangeLog
index 1cd78f9..890d25f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -43,6 +43,8 @@
* 1214 ups_bat_temp,ups_capacity,ups_in_freq,ups_in_voltage,ups_out_load,ups_out_voltage: Checks now detect more UPS Devices...
* 1523 lnx_thermal: Now supports setting levels...
NOTE: Please refer to the migration notes!
+ * 1524 kentix_temp: Now supports setting levels...
+ NOTE: Please refer to the migration notes!
* 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/checkman/kentix_temp b/checkman/kentix_temp
index 5d0108c..8d8a308 100644
--- a/checkman/kentix_temp
+++ b/checkman/kentix_temp
@@ -6,8 +6,34 @@ distribution: check_mk
description:
This check monitors the temperature measured by the Kentix MultiSensor-RACK device.
- No limits are set in the check, since limits are configured in the device
- itself. These limits are taken as the lower and upper warning levels of the check.
+ The device allows to configure an upper and lower warning level. These are used as
+ device critical levels.
+
+item:
+ "Rack"
perfdata:
- One variable: the temperature
+ One variable: the temperature in °C
+
+[parameters]
+This checks parameters are a dictionary with the
+following (optional) keys:
+
+ {"levels"}: A tuple (warn, crit) containing the upper levels. Default: (70, 80)
+
+ {"levels_lower"}: A tuple (warn, crit) containing the lower levels. No defaults.
+
+ {"output_unit"}: "c", "f" or "k", the check will output the temperature in the
+specified unit. If this is not set, output is in degrees Celsius.
+
+ {"input_unit"}: "c, "f" or "k". By default, the check interprets the sensor value
+according to the unit sent by the device. This key allows to override that. Tread
+lightly, as this may lead to a misinterpreted temperature. Should only be used if
+the device reports its unit incorrectly.
+
+ {"device_levels_handling"]: How the check treats the device's internal levels
+versus the ones you specify yourself. The following options are supported: "best"
+results in the best status between yours and the device's levels, "worst" in the
+worst, "usr" ignore's the device's levels, "dev" ignores yours, usrdefault and
+devdefault uses your/the devices set of levels if present, otherwise the other
+respectively. Default setting is "devdefault"
diff --git a/checks/kentix_temp b/checks/kentix_temp
index 982c75a..d26f936 100644
--- a/checks/kentix_temp
+++ b/checks/kentix_temp
@@ -26,34 +26,29 @@
def inventory_kentix_temp(info):
if info:
- return [ (None, None ) ]
+ return [ ("Rack", {} ) ]
-def check_kentix_temp(_no_item, _no_params, info):
+def check_kentix_temp(item, params, info):
value, lower_warn, upper_warn, alarm, text = info[0]
- temp = float(value)/10
- perfdata = [ ("temp", temp, lower_warn+":"+upper_warn ) ]
upper_warn = float(upper_warn)
lower_warn = float(lower_warn)
- infotext = "%.1f C (min/max at %.1f/%.1f C)" % (temp, lower_warn, upper_warn)
- if temp >= upper_warn or temp <= lower_warn:
- state = 1
- infotext = "%s: %s" % (text, infotext)
- else:
- state = 0
- return state, infotext, perfdata
+ temp = float(value)/10
+
+ return check_temperature(temp, params, dev_levels = (upper_warn, upper_warn), dev_levels_lower = (lower_warn, lower_warn))
check_info["kentix_temp"] = {
- 'check_function': check_kentix_temp,
- 'inventory_function': inventory_kentix_temp,
- 'service_description': 'Temperature',
- 'has_perfdata': True,
- 'snmp_info': ('.1.3.6.1.4.1.37954.3.1.1',
- ['1', # temperatureValue
- '2', # temperatureMin
- '3', # temperatureMax
- '4', # temperatureAlarm, not used here
- '5', # temperatureAlarmtext
- ]
- ),
- "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.332.11.6"),
+ 'check_function' : check_kentix_temp,
+ 'inventory_function' : inventory_kentix_temp,
+ 'service_description' : 'Temperature %s',
+ 'has_perfdata' : True,
+ 'snmp_info' : ('.1.3.6.1.4.1.37954.3.1.1',
+ ['1', # temperatureValue
+ '2', # temperatureMin
+ '3', # temperatureMax
+ '4', # temperatureAlarm, not used here
+ '5', # temperatureAlarmtext
+ ]),
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.332.11.6"),
+ "group" : "temperature",
+ "includes" : [ "temperature.include" ],
}
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index 38ffb11..79f5ca2 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -369,6 +369,7 @@ perfometers["check_mk-lnx_thermal"] = perfometer_temperature
perfometers["check_mk-climaveneta_temp"] = perfometer_temperature
perfometers["check_mk-carel_sensors"] = perfometer_temperature
perfometers["check_mk-netscaler_health.temp"] = perfometer_temperature
+perfometers["check_mk-kentix_temp"] = perfometer_temperature
def perfometer_temperature_multi(row, check_command, perf_data):
display_value = -1
Module: check_mk
Branch: master
Commit: b9fb3e586b0868767e88eb99bedf7268b2f86c3a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b9fb3e586b0868…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Tue Jan 20 12:13:27 2015 +0100
#1853 FIX cisco_power, cisco_fan, cisco_temp_perf: fixed algorithm to determine check item for some special cases
For some Cisco switches the item name of sensors was incorrectly determined
from the snmp oid "ciscoEnvMonSupplyStatusDescr". When the status description
contains "Status is ..." or "PS1 ..." in the second field, this field was
incorrectly included in the item name.
The problem is fixed. Since the item name changes due to this fix, you need to
redo a service discovery.
To our knowledge this problem only affects the cisco_power check. cisco_fan
and cisco_temp_perf may theorectically be affected since the same algorithm
is used, but the status descriptions for these checks are different.
Example:
status description: "Sw1, PS1 Normal, RPS Normal",
old item name: "Sw1 PS1 Normal 3036",
new item name: "Sw1"
---
.werks/1853 | 25 +++++++++++++++++++++++++
ChangeLog | 2 ++
checks/cisco_sensor_item.include | 2 +-
3 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/.werks/1853 b/.werks/1853
new file mode 100644
index 0000000..dce9c70
--- /dev/null
+++ b/.werks/1853
@@ -0,0 +1,25 @@
+Title: cisco_power, cisco_fan, cisco_temp_perf: fixed algorithm to determine check item for some special cases
+Level: 1
+Component: checks
+Compatible: incomp
+Version: 1.2.7i1
+Date: 1421751304
+Class: fix
+
+For some Cisco switches the item name of sensors was incorrectly determined
+from the snmp oid "ciscoEnvMonSupplyStatusDescr". When the status description
+contains "Status is ..." or "PS1 ..." in the second field, this field was
+incorrectly included in the item name.
+
+The problem is fixed. Since the item name changes due to this fix, you need to
+redo a service discovery.
+
+To our knowledge this problem only affects the cisco_power check. cisco_fan
+and cisco_temp_perf may theorectically be affected since the same algorithm
+is used, but the status descriptions for these checks are different.
+
+Example:
+
+status description: "Sw1, PS1 Normal, RPS Normal",
+old item name: "Sw1 PS1 Normal 3036",
+new item name: "Sw1"
diff --git a/ChangeLog b/ChangeLog
index 9c35fdd..1ce291f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -83,6 +83,8 @@
* 1844 FIX: oracle_crs_res: fix computation of node a ressource is running on...
* 1852 FIX: solaris_multipath: this check now works with inventory to remember the number of total paths...
NOTE: Please refer to the migration notes!
+ * 1853 FIX: cisco_power, cisco_fan, cisco_temp_perf: fixed algorithm to determine check item for some special cases...
+ NOTE: Please refer to the migration notes!
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
diff --git a/checks/cisco_sensor_item.include b/checks/cisco_sensor_item.include
index 9bdaa18..dbe9c34 100644
--- a/checks/cisco_sensor_item.include
+++ b/checks/cisco_sensor_item.include
@@ -39,7 +39,7 @@ def cisco_sensor_item(trial_string, fall_back):
elif '#' in splited[-1] or 'Power' in splited[-1]:
item = " ".join(splited)
# If second last part start with Status, remove that part
- elif splited[-2].startswith(" Status"):
+ elif splited[-2].startswith("Status") or splited[-2].startswith("PS1"):
item = " ".join(splited[:-2])
# Take anything, but without last part
else:
Module: check_mk
Branch: master
Commit: 3c13d3df54ee3326a3be700f5f37f28906df5ecc
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3c13d3df54ee33…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jan 20 11:31:06 2015 +0100
Updated bug entries #2287
---
.bugs/2287 | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/.bugs/2287 b/.bugs/2287
new file mode 100644
index 0000000..74b89a5
--- /dev/null
+++ b/.bugs/2287
@@ -0,0 +1,9 @@
+Title: Add search function to edit role page
+Component: wato
+State: open
+Date: 2015-01-20 11:30:17
+Targetversion: 1.2.5i1
+Class: feature
+
+There are a lot of permissions. The user should be able to filter the list
+using a search term.
Module: check_mk
Branch: master
Commit: a1ab443b17eb90c4a58c66aa89d7c623b4af818e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a1ab443b17eb90…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jan 20 11:53:04 2015 +0100
#1873 SEC Escaping event text of event console messages correctly in views
Event texts of messages which have been processed by the event console
and resulted in a event might contain HTML code which is now escaped
correctly to prevent XSS attacks when shown in the event console views.
---
.werks/1873 | 12 ++++++++++++
ChangeLog | 1 +
mkeventd/web/plugins/views/mkeventd.py | 2 +-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/1873 b/.werks/1873
new file mode 100644
index 0000000..e3843e5
--- /dev/null
+++ b/.werks/1873
@@ -0,0 +1,12 @@
+Title: Escaping event text of event console messages correctly in views
+Level: 1
+Component: ec
+Class: security
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1421751062
+
+Event texts of messages which have been processed by the event console
+and resulted in a event might contain HTML code which is now escaped
+correctly to prevent XSS attacks when shown in the event console views.
diff --git a/ChangeLog b/ChangeLog
index f530c49..a908613 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -143,6 +143,7 @@
Event Console:
* 1845 Keep record of original source IP address of a syslog message or SNMP trap...
+ * 1873 SEC: Escaping event text of event console messages correctly in views...
* 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
diff --git a/mkeventd/web/plugins/views/mkeventd.py b/mkeventd/web/plugins/views/mkeventd.py
index 37d1559..abab801 100644
--- a/mkeventd/web/plugins/views/mkeventd.py
+++ b/mkeventd/web/plugins/views/mkeventd.py
@@ -325,7 +325,7 @@ if mkeventd_enabled:
"title" : _("Text/Message of the event"),
"short" : _("Message"),
"columns" : ["event_text"],
- "paint" : lambda row: ("", row["event_text"].replace("\x01","<br>")),
+ "paint" : lambda row: ("", html.attrencode(row["event_text"]).replace("\x01","<br>")),
}
def paint_ec_match_groups(row):
Module: check_mk
Branch: master
Commit: e5512faaa958427799835e4b7a4fb6a974d5474f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e5512faaa95842…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jan 20 10:58:39 2015 +0100
Updated bug entries #2286
---
.bugs/2286 | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/.bugs/2286 b/.bugs/2286
new file mode 100644
index 0000000..972fa05
--- /dev/null
+++ b/.bugs/2286
@@ -0,0 +1,14 @@
+Title: Implement custom sorting of infos in view editor
+Component: multisite
+State: open
+Date: 2015-01-20 10:56:39
+Targetversion: 1.2.5i1
+Class: nastiness
+
+When creating a new view, the first dialog is to choose whether or not
+a "specific object" should be shown, this list is sorted by alphabetic
+order. However, this does not reflect the common uses. It would be more
+user friendly to sort the assumed most used to the top, for example
+Host / Service.
+
+Same task for the list of filters when editing a view.
Module: check_mk
Branch: master
Commit: 3c626779cc77dcd035c7675a771f94ddb6c1fd80
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3c626779cc77dc…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jan 20 10:50:28 2015 +0100
#1871 FIX Site filter is only shown as host related filter now
Previously the site filter was displayed for all kind of object
types in the view editor. This has been fixed now.
---
.werks/1871 | 11 +++++++++++
ChangeLog | 1 +
web/plugins/visuals/filters.py | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/1871 b/.werks/1871
new file mode 100644
index 0000000..6283c0a
--- /dev/null
+++ b/.werks/1871
@@ -0,0 +1,11 @@
+Title: Site filter is only shown as host related filter now
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1421747385
+
+Previously the site filter was displayed for all kind of object
+types in the view editor. This has been fixed now.
diff --git a/ChangeLog b/ChangeLog
index cc4999b..2a02c77 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -112,6 +112,7 @@
* 1804 FIX: Fixed prechecked checkboxes in view actions after first action submit...
* 1843 FIX: Fixed crash in display of crash report for precompiled host checks
* 1870 FIX: Joined columns were empty in CSV, JSON or PYTHON exports of view...
+ * 1871 FIX: Site filter is only shown as host related filter now...
WATO:
* 1760 Added search form to manual checks page
diff --git a/web/plugins/visuals/filters.py b/web/plugins/visuals/filters.py
index 46f3aff..4ec065a 100644
--- a/web/plugins/visuals/filters.py
+++ b/web/plugins/visuals/filters.py
@@ -498,7 +498,7 @@ declare_filter(232, FilterNagiosExpression("service", "service_staleness",
class FilterSite(Filter):
def __init__(self, name, enforce):
- Filter.__init__(self, name, _("Site") + (enforce and _( " (enforced)") or ""), None, ["site"], [])
+ Filter.__init__(self, name, _("Site") + (enforce and _( " (enforced)") or ""), 'host', ["site"], [])
self.enforce = enforce
def visible(self):
Module: check_mk
Branch: master
Commit: 3af641bf8e7022dc53c2b2b87aff4ef058042a59
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3af641bf8e7022…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Jan 20 10:38:48 2015 +0100
#1670 winperf_processor: fixed invalid check values on counter wrap
This check reused a counter wrapped value in further counter calculations.
---
.werks/1670 | 9 +++++++++
ChangeLog | 1 +
checks/winperf_processor | 2 +-
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.werks/1670 b/.werks/1670
new file mode 100644
index 0000000..7a737fc
--- /dev/null
+++ b/.werks/1670
@@ -0,0 +1,9 @@
+Title: winperf_processor: fixed invalid check values on counter wrap
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1421742895
+Class: feature
+
+This check reused a counter wrapped value in further counter calculations.
diff --git a/ChangeLog b/ChangeLog
index de00fd3..f67ab73 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -42,6 +42,7 @@
* 1214 ups_bat_temp,ups_capacity,ups_in_freq,ups_in_voltage,ups_out_load,ups_out_voltage: Checks now detect more UPS Devices...
* 1523 lnx_thermal: Now supports setting levels...
NOTE: Please refer to the migration notes!
+ * 1670 winperf_processor: fixed invalid check values on counter wrap...
* 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/winperf_processor b/checks/winperf_processor
index 93dd1c2..ed1309d 100644
--- a/checks/winperf_processor
+++ b/checks/winperf_processor
@@ -51,7 +51,7 @@ def check_winperf_util(_no_item, params, info):
# sums up to total (called _Total). We only need that last value.
ticks = int(line[-2])
num_cpus = len(line) - 3
- ticks_per_sec = get_rate("winperf_util", this_time, ticks)
+ ticks_per_sec = get_rate("winperf_util", this_time, ticks, onwrap = RAISE)
# We get the value of the PERF_100NSEC_TIMER_INV here.
# This counter type shows the average percentage of active time observed
# during the sample interval. This is an inverse counter. Counters of this