Module: check_mk
Branch: master
Commit: 9b922f79f8117adee7008e982c47bd694611ebae
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9b922f79f8117a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Feb 11 11:42:03 2016 +0100
Updated bug entries #2329
---
.bugs/2329 | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/.bugs/2329 b/.bugs/2329
new file mode 100644
index 0000000..786a3b4
--- /dev/null
+++ b/.bugs/2329
@@ -0,0 +1,11 @@
+Title: check_mk-esx_vsphere_datastores usage can not be graphed with new graphing
+Component: checks
+State: open
+Date: 2016-02-11 11:40:03
+Targetversion: 1.2.8
+Class: bug
+
+When using the stored agent output "esx-6.0-1" the filesystem Filesystem EQLSAS-DS-SQL3 can not be
+render the graph for the usage of the datastore. Seems the translation is not working.
+
+The name of the perf variable is only "EQLSAS-DS-SQL3" which is really bad.
Module: check_mk
Branch: master
Commit: d53cd5f87e464401dd963040e8b3ad16f43f5690
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d53cd5f87e4644…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Feb 11 10:33:08 2016 +0100
Small cleanups: Removed some unused variables and duplicate import of time
---
.bugs/2222 | 7 +++++--
web/htdocs/views.py | 11 +----------
2 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/.bugs/2222 b/.bugs/2222
index 15605ba..a801309 100644
--- a/.bugs/2222
+++ b/.bugs/2222
@@ -1,9 +1,12 @@
Title: Views for services of one host and for all services have icons at different positions
Component: multisite
-State: open
+Class: nastiness
+State: done
Date: 2014-10-31 15:20:29
Targetversion: future
-Class: nastiness
The position of the column "service icons" is not always the same.
Sometimes it's at the beginning, sometimes at the end.
+
+2016-02-11 10:27:18: changed state open -> done
+This has already been cleaned up.
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index babed74..9c88557 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -24,7 +24,7 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-import config, defaults, livestatus, time, os, re, pprint, time
+import config, defaults, livestatus, time, os, re, pprint
import weblib, traceback, forms, valuespec, inventory, visuals, metrics
from lib import *
@@ -399,10 +399,6 @@ def view_editor_options():
('force_checkboxes', _('Always show the checkboxes')),
('user_sortable', _('Make view sortable by user')),
('play_sounds', _('Play alarm sounds')),
- # FIXME
- #html.help(_("If enabled and the view shows at least one host or service problem "
- # "the a sound will be played by the browser. Please consult the %s for details.")
- # % docu_link("multisite_sounds", _("documentation")))
]
def view_editor_specs(ds_name, general_properties=True):
@@ -693,7 +689,6 @@ def transform_valuespec_value_to_view(view):
def create_view_from_valuespec(old_view, view):
ds_name = old_view.get('datasource', html.var('datasource'))
view['datasource'] = ds_name
- datasource = multisite_datasources[ds_name]
vs_value = {}
for ident, vs in view_editor_specs(ds_name):
attrs = vs.from_html_vars(ident)
@@ -736,7 +731,6 @@ def show_filter_form(is_open, filters):
# sort filters according to title
s = [(f.sort_index, f.title, f) for f in filters if f.available()]
s.sort()
- col = 0
# First show filters with double height (due to better floating
# layout)
@@ -1890,11 +1884,9 @@ def core_command(what, row, row_nr, total_rows):
if what == "host":
spec = host
cmdtag = "HOST"
- prefix = "host_"
elif what == "service":
spec = "%s;%s" % (host, descr)
cmdtag = "SVC"
- prefix = "service_"
else:
spec = row.get(what + "_id")
if descr:
@@ -2268,7 +2260,6 @@ def sort_url(view, painter, join_index):
2. user defined sorters (url sorter)
3. configured view sorters
"""
- sort = html.var('sort', None)
sorter = []
group_sort, user_sort, view_sort = get_separated_sorters(view)
Module: check_mk
Branch: master
Commit: a863af50eeb211becadb50d8821fa14514a2b243
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a863af50eeb211…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Feb 11 16:19:51 2016 +0100
#3053 FIX Fixed broken login with Python 2.4 (e.g. on CentOS 5.x systems)
---
.werks/3053 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/html_mod_python.py | 8 ++++++--
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.werks/3053 b/.werks/3053
new file mode 100644
index 0000000..ba437b6
--- /dev/null
+++ b/.werks/3053
@@ -0,0 +1,9 @@
+Title: Fixed broken login with Python 2.4 (e.g. on CentOS 5.x systems)
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.2.7i4
+Date: 1455203973
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 8d34471..eff1840 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -325,6 +325,7 @@
* 3171 FIX: Logout in one site will log out of all sites sharing the same auth.secret...
* 3048 FIX: It is now possible to add a context filter right after removing it from a view again...
* 3050 FIX: Fixed broken "Host state (first character)" painter
+ * 3053 FIX: Fixed broken login with Python 2.4 (e.g. on CentOS 5.x systems)
WATO:
* 2442 WATO remove host: improved cleanup of obsolete host files...
diff --git a/web/htdocs/html_mod_python.py b/web/htdocs/html_mod_python.py
index 40a4752..b1ebba0 100644
--- a/web/htdocs/html_mod_python.py
+++ b/web/htdocs/html_mod_python.py
@@ -183,8 +183,12 @@ class html_mod_python(htmllib.html):
def set_cookie(self, varname, value, expires = None):
- # httponly tells the browser not to make this cookie available to Javascript
- c = Cookie.Cookie(varname, make_utf8(value), path='/', httponly=True)
+ # httponly tells the browser not to make this cookie available to Javascript.
+ # But it is only available from Python 2.6+. Be compatible.
+ try:
+ c = Cookie.Cookie(varname, make_utf8(value), path='/', httponly=True)
+ except AttributeError:
+ c = Cookie.Cookie(varname, make_utf8(value), path='/')
if self.is_ssl_request():
c.secure = True
Module: check_mk
Branch: master
Commit: 6c2cade197cd844cbc03ae726c7676bfdd27f0ca
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6c2cade197cd84…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Feb 11 17:48:03 2016 +0100
updated werk text
---
.werks/2992 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.werks/2992 b/.werks/2992
index 9eecf6f..e4d61fb 100644
--- a/.werks/2992
+++ b/.werks/2992
@@ -16,4 +16,4 @@ usually <i>searchhost</i>, and replace the <i>Hostname</i> filter with the
<i>Hostname or Alias</i> filter. If both filters are active, you will only
get the hostnames on the quicksearch.<br>
-Reason: <i>Hostname</i> AND <i>Hostname and Alias</i>: Just the hostname...
+Reason: <i>Hostname</i> AND <i>Hostname or Alias</i> results in <i>Just the hostname...</i>
Module: check_mk
Branch: master
Commit: 5805e66f78fc816b23512621c1f4ed418238e758
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5805e66f78fc81…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Feb 11 17:44:13 2016 +0100
#2992 New visual filter: "Hostname or Alias"
Previously you could either search for the hostname or the hostalias
with distinct filters. This new filter returns both matches, e.g
any hosts starting with 'server7' and any hostaliases with 'server7'.
The <i>Quicksearch</i> sidebar snapin also supports this new filter.
If you want to use it you need to edit the target view of the quicksearch,
usually <i>searchhost</i>, and replace the <i>Hostname</i> filter with the
<i>Hostname or Alias</i> filter. If both filters are active, you will only
get the hostnames on the quicksearch.<br>
Reason: <i>Hostname</i> AND <i>Hostname and Alias</i>: Just the hostname...
---
.werks/2992 | 19 +++++++++++++++++++
ChangeLog | 1 +
web/htdocs/sidebar.py | 27 ++++++++++++++++++++-------
web/plugins/visuals/filters.py | 26 +++++++++++++++++++++++++-
4 files changed, 65 insertions(+), 8 deletions(-)
diff --git a/.werks/2992 b/.werks/2992
new file mode 100644
index 0000000..9eecf6f
--- /dev/null
+++ b/.werks/2992
@@ -0,0 +1,19 @@
+Title: New visual filter: "Hostname or Alias"
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.2.7i4
+Date: 1455208441
+Class: feature
+
+Previously you could either search for the hostname or the hostalias
+with distinct filters. This new filter returns both matches, e.g
+any hosts starting with 'server7' and any hostaliases with 'server7'.
+
+The <i>Quicksearch</i> sidebar snapin also supports this new filter.
+If you want to use it you need to edit the target view of the quicksearch,
+usually <i>searchhost</i>, and replace the <i>Hostname</i> filter with the
+<i>Hostname or Alias</i> filter. If both filters are active, you will only
+get the hostnames on the quicksearch.<br>
+
+Reason: <i>Hostname</i> AND <i>Hostname and Alias</i>: Just the hostname...
diff --git a/ChangeLog b/ChangeLog
index 9d6d3b5..da12669 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -275,6 +275,7 @@
* 2769 Verifying that the Check_MK GUI is not used with Apache threaded MPM (e.g. worker)
* 2880 Automatically detect changes in local web/plugins, no Apache restart needed anymore...
* 2929 Show all metrics of a service in a nicely formatted table in the service details
+ * 2992 New visual filter: "Hostname or Alias"...
* 2680 FIX: LDAP: Fixed exception when syncing groups using configurations from previous versions...
* 2435 FIX: New graphing system: fixed broken graphs for iSCSI checks...
* 2696 FIX: Fixed broken perfometer for update checks
diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py
index bb5575e..b6658ac 100644
--- a/web/htdocs/sidebar.py
+++ b/web/htdocs/sidebar.py
@@ -691,7 +691,14 @@ def plugin_matches_filters(plugin, used_filters):
return False
return True
-def search_url_tmpl(used_filters, row, exact = True):
+def search_url_tmpl(used_filters, matched_instances):
+ exact = True
+ if matched_instances and len(matched_instances) == 1:
+ row = matched_instances[0]
+ else:
+ row = matched_instances and matched_instances[0] or None
+ exact = False
+
if not row:
def find_plugin(filters):
for entry in search_plugins:
@@ -763,6 +770,15 @@ def search_url_tmpl(used_filters, row, exact = True):
'site' : site,
}
+ # This little 'adjustment' adds an extra url parameter for an optional hostnameoralias filter in the target view.
+ # If this filter is not activated it won't have any impact. The search_url_templ function is currently not designed
+ # to handle matches of multiple filter types and probably requires a complete revision to support this.
+ if not exact and matched_instances:
+ found_plugins = set(map(lambda instances: instances[0]["id"], matched_instances))
+ # Only add this extra parameter if there are solely hosts and host_alias matches
+ if "hosts" in found_plugins or "host_alias" in found_plugins:
+ url_tmpl += "&hostnameoralias=%s" % used_filters[0][1]
+
return url_tmpl
@@ -909,7 +925,7 @@ def render_search_results(used_filters, objects, format_func = format_result):
# Find missing urls
name = get_row_name(row)
if "url" not in row_options:
- row_options["url"] = search_url_tmpl(used_filters, row)
+ row_options["url"] = search_url_tmpl(used_filters, [row])
obj_id = (row_options["url"], name)
if obj_id not in unique:
@@ -952,14 +968,11 @@ def search_open():
if not q:
return
- data, used_filters = process_search(q)
+ matched_instances, used_filters = process_search(q)
if not used_filters:
return
- if data and len(data) == 1:
- url = search_url_tmpl(used_filters, data[0])
- else:
- url = search_url_tmpl(used_filters, data and data[0] or None, exact = False)
+ url = search_url_tmpl(used_filters, matched_instances)
html.set_http_header('Location', url)
from mod_python import apache
diff --git a/web/plugins/visuals/filters.py b/web/plugins/visuals/filters.py
index bbe1d96..b7e915f 100644
--- a/web/plugins/visuals/filters.py
+++ b/web/plugins/visuals/filters.py
@@ -32,7 +32,8 @@ class FilterText(Filter):
htmlvars = [htmlvar]
if negateable:
htmlvars.append("neg_" + htmlvar)
- Filter.__init__(self, name, title, info, htmlvars, [column])
+ link_columns = type(column) == list and column or [column]
+ Filter.__init__(self, name, title, info, htmlvars, link_columns)
self.op = op
self.column = column
self.negateable = negateable
@@ -79,6 +80,25 @@ class FilterUnicode(FilterText):
htmlvar = self.htmlvars[0]
return html.get_unicode_input(htmlvar, "")
+class FilterHostnameOrAlias(FilterUnicode):
+ def __init__(self, *args):
+ FilterUnicode.__init__(self, *args)
+
+ def filter(self, infoname):
+ current_value = self._current_value()
+
+ if self.negateable and html.get_checkbox(self.htmlvars[1]):
+ negate = "!"
+ else:
+ negate = ""
+
+ if current_value:
+ if type(current_value) == unicode:
+ current_value = current_value.encode("utf-8")
+ return "Filter: host_name %s%s %s\nFilter: alias %s%s %s\nOr: 2\n" % ((negate, self.op, lqencode(current_value)) * 2)
+ else:
+ return ""
+
# filter title info column htmlvar
declare_filter(100, FilterText("hostregex", _("Hostname"), "host", "host_name", "host_regex", "~~" , True),
_("Search field allowing regular expressions and partial matches"))
@@ -100,6 +120,10 @@ declare_filter(202, FilterUnicode("service_display_name", _("Service alternative
declare_filter(202, FilterUnicode("output", _("Status detail"), "service", "service_plugin_output", "service_output", "~~"))
+declare_filter(102, FilterHostnameOrAlias("hostnameoralias", _("Hostname or Alias"), "host", ["host_alias", "host_name"], "hostnameoralias", "~~", False),
+ _("Search field allowing regular expressions and partial matches"))
+
+
class FilterIPAddress(Filter):
def __init__(self, what):
self._what = what
Module: check_mk
Branch: master
Commit: 172c66552433479a6cd9b3b862d0500fce8c9469
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=172c6655243347…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Feb 11 16:57:31 2016 +0100
updated werk
---
.werks/2980 | 1 +
1 file changed, 1 insertion(+)
diff --git a/.werks/2980 b/.werks/2980
index efe304f..2725c5c 100644
--- a/.werks/2980
+++ b/.werks/2980
@@ -6,4 +6,5 @@ Version: 1.2.7i4
Date: 1455205795
Class: feature
+This new special agent can be configured, just like the other special agents, via the Datasource Programs in WATO.
Please make sure, that if you have installed freeipmi that IPMI is really support by your hardware.
Module: check_mk
Branch: master
Commit: 2fc7854cac6a2e146eff3a286eb8288c57228198
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2fc7854cac6a2e…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Feb 11 16:52:14 2016 +0100
#2980 agent_ipmi_sensors: new special agent to monitor IPMI data via ipmi-sensors (of freeipmi)
Please make sure, that if you have installed freeipmi that IPMI is really support by your hardware.
---
.werks/2980 | 9 ++
ChangeLog | 1 +
agents/special/agent_ipmi_sensors | 137 +++++++++++++++++++++++++++++++
checks/agent_ipmi_sensors | 37 +++++++++
web/plugins/wato/datasource_programs.py | 31 +++++++
5 files changed, 215 insertions(+)
diff --git a/.werks/2980 b/.werks/2980
new file mode 100644
index 0000000..efe304f
--- /dev/null
+++ b/.werks/2980
@@ -0,0 +1,9 @@
+Title: agent_ipmi_sensors: new special agent to monitor IPMI data via ipmi-sensors (of freeipmi)
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1455205795
+Class: feature
+
+Please make sure, that if you have installed freeipmi that IPMI is really support by your hardware.
diff --git a/ChangeLog b/ChangeLog
index 2aaafc9..9d6d3b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -115,6 +115,7 @@
* 2977 aruba_wlc_clients: new check which monitors the WLC clients of a Aruba Networks WLAN Controller
* 3173 datapower_cpu datapower_fan datapower_fs datapower_ldrive datapower_mem datapower_pdrive datapower_raid_bat datapower_tcp datapower_temp: Detect XI52 Model
* 2979 aruba_wlc_aps: new inventory plugin for Aruba Networks WLAN Controller which displays name, group name, model, serial number and system location of all access points of this WLC
+ * 2980 agent_ipmi_sensors: new special agent to monitor IPMI data via ipmi-sensors (of freeipmi)...
* 2660 FIX: fixed windows agent using the wrong working directory...
* 2664 FIX: ps: Speedup in situation with many matching processes...
* 2661 FIX: windows agent: fixed incomplete process list...
diff --git a/agents/special/agent_ipmi_sensors b/agents/special/agent_ipmi_sensors
new file mode 100755
index 0000000..a5510d0
--- /dev/null
+++ b/agents/special/agent_ipmi_sensors
@@ -0,0 +1,137 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2015 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# tails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+
+import os, sys, getopt, subprocess
+
+
+def usage():
+ sys.stderr.write("""Check_MK IPMI Sensors
+
+USAGE: agent_ipmi_sensors [OPTIONS] HOST
+ agent_ipmi_sensors --help
+
+ARGUMENTS:
+ HOST Host name or IP address
+
+OPTIONS:
+ --help Show this help message and exit
+ -u Username
+ -p Password
+ -l Privilege level
+ Possible are 'user', 'operator', 'admin'
+ --debug Debug output
+""")
+
+
+short_options = 'u:p:l:'
+long_options = [ 'help', 'debug' ]
+
+
+opt_debug = False
+hostname = None
+username = None
+password = None
+privilege_lvl = None
+
+
+try:
+ opts, args = getopt.getopt(sys.argv[1:], short_options, long_options)
+except getopt.GetoptError, err:
+ sys.stderr.write("%s\n" % err)
+ sys.exit(1)
+
+
+if len(args) == 1:
+ hostname = args[0]
+elif not args:
+ sys.stderr.write("ERROR: No host given.\n")
+ sys.exit(1)
+else:
+ sys.stderr.write("ERROR: Please specify exactly one host.\n")
+ sys.exit(1)
+
+
+for o, a in opts:
+ if o in [ '--help' ]:
+ usage()
+ sys.exit(0)
+ elif o in [ '--debug' ]:
+ opt_debug = True
+ elif o in [ '-u' ]:
+ username = a
+ elif o in [ '-p' ]:
+ password = a
+ elif o in [ '-l' ]:
+ privilege_lvl = a
+
+
+if not (username and password and privilege_lvl):
+ sys.stderr.write("ERROR: Credentials are missing.\n")
+ sys.exit(1)
+
+
+for sub_path in [ "sbin", "bin", "local/sbin", "local/bin" ]:
+ base_cmd = "/usr/%s/ipmi-sensors" % sub_path
+ ipmi_cmd = [base_cmd, "-h", hostname, "-u", username, "-p", password, "-l", privilege_lvl ]
+ try:
+ if opt_debug:
+ sys.stdout.write("DEBUG: try executing '%s'\n" % base_cmd)
+ p = subprocess.Popen(ipmi_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ sensor_data, err = p.communicate()
+ break
+ except Exception, e:
+ if opt_debug:
+ sys.stdout.write("ERROR: '%s': %s\n" % (base_cmd, e))
+ continue
+
+
+# output
+# ID | Name | Type | Reading | Units | Event
+# 4 | CPU Temp | Temperature | 28.00 | C | 'OK'
+# 71 | System Temp | Temperature | 28.00 | C | 'OK'
+# 607 | P1-DIMMC2 TEMP | Temperature | N/A | C | N/A
+
+
+def parse_ipmi_sensor_data(ipmi_sensor_data):
+ for line in ipmi_sensor_data:
+ if line.startswith("ID"):
+ continue
+ else:
+ sensor_id, sensor_name, sensor_type, reading, unit, event = \
+ map(lambda x: x.strip().replace(" ", "_").replace("/", ""), line.split("|"))
+ sys.stdout.write("%s %s_%s %s_%s_(NA/NA) [%s]\n" % \
+ (sensor_id, sensor_type, sensor_name,
+ reading, unit, event.replace("'", "")))
+
+
+if err:
+ sys.stderr.write("ERROR: '%s'\n" % err[:-1])
+ sys.exit(1)
+else:
+ sys.stdout.write("<<<ipmi_sensors>>>\n")
+ parse_ipmi_sensor_data(sensor_data.splitlines())
+ sys.exit(0)
diff --git a/checks/agent_ipmi_sensors b/checks/agent_ipmi_sensors
new file mode 100644
index 0000000..66a8c34
--- /dev/null
+++ b/checks/agent_ipmi_sensors
@@ -0,0 +1,37 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2014 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# tails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+def agent_ipmi_sensors_arguments(params, hostname, ipaddress):
+ args = ''
+
+ args += " -u " + quote_shell_string(params["username"])
+ args += " -p " + quote_shell_string(params["password"])
+ args += " -l " + quote_shell_string(params["privilege_lvl"])
+
+ args += " " + quote_shell_string(ipaddress)
+ return args
+
+special_agent_info['ipmi_sensors'] = agent_ipmi_sensors_arguments
diff --git a/web/plugins/wato/datasource_programs.py b/web/plugins/wato/datasource_programs.py
index 8dc3f61..fdb2741 100644
--- a/web/plugins/wato/datasource_programs.py
+++ b/web/plugins/wato/datasource_programs.py
@@ -214,6 +214,37 @@ register_rule(group,
match = 'first')
register_rule(group,
+ "special_agents:ipmi_sensors",
+ Dictionary(
+ elements = [
+ ( "username",
+ TextAscii(
+ title = _("Username"),
+ allow_empty = False,
+ )
+ ),
+ ( "password",
+ Password(
+ title = _("Password"),
+ allow_empty = False,
+ )
+ ),
+ ( "privilege_lvl",
+ TextAscii(
+ title = _("Privilege Level"),
+ help = _("Possible are 'user', 'operator', 'admin'"),
+ allow_empty = False,
+ )
+ )
+ ],
+ optional_keys = False
+ ),
+ title = _("Check IPMI Sensors via Freeipmi"),
+ help = _("This rule selects the Agent IPMI Sensors instead of the normal Check_MK Agent "
+ "which collects the data through the Freeipmi command"),
+ match = 'first')
+
+register_rule(group,
"special_agents:netapp",
Transform(
Dictionary(