Module: check_mk
Branch: master
Commit: 3aa77101d8a177939553376038c7a693f22d1217
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3aa77101d8a177…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Fri Jan 8 16:55:38 2016 +0100
#1321 sap.dialog: It is now possible to configure levels for FrontEndNetTime, ResponseTime
and UsersLoggedIn
---
.werks/1321 | 9 ++++++++
ChangeLog | 1 +
checks/sap | 13 ++++++++---
web/plugins/wato/check_parameters.py | 42 ++++++++++++++++++++++++++++++++++
4 files changed, 62 insertions(+), 3 deletions(-)
diff --git a/.werks/1321 b/.werks/1321
new file mode 100644
index 0000000..c3bf833
--- /dev/null
+++ b/.werks/1321
@@ -0,0 +1,9 @@
+Title: sap.dialog: It is now possible to configure levels for FrontEndNetTime,
ResponseTime and UsersLoggedIn
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1452268457
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 42c3272..9329466 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -76,6 +76,7 @@
* 2913 fortigate_node, fortigate_node.cpu, fortigate_node.memory,
fortigate_node.sessions: New checks to monitor HA nodes of fortigate firewalls
* 1319 blade_bx_powerfan: Check can now be configured using Wato
* 2915 supermicro.smart: new check to monitor harddisk health on snmp-enabled
supermicro devices
+ * 1321 sap.dialog: It is now possible to configure levels for FrontEndNetTime,
ResponseTime and UsersLoggedIn
* 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/checks/sap b/checks/sap
index 8f165f4..b2f8449 100644
--- a/checks/sap
+++ b/checks/sap
@@ -64,12 +64,19 @@ def check_sap_dialog(item, params, info):
return s.replace('(', '_').replace(')',
'_').replace(' ', '_').replace('.',
'_').rstrip('_')
# {'UsersLoggedIn': (2, '-'), 'ResponseTime(StandardTran.)':
(6, 'msec'), 'FrontEndNetTime': (0, 'msec'),
'ResponseTime': (77, 'msec')}
- perfdata = [ (perf_clean_key(k), v[0]) for k, v in dialog.items() ]
- output = ', '.join([ '%s: %d%s' % (k, v[0], (v[1] != '-' and
v[1] or '')) for k, v in dialog.items() ])
- return (0, output, perfdata)
+ for key, value in dialog.items():
+ state = 0
+ if key in params:
+ warn, crit = params[key]
+ if value[0] >= crit:
+ state = 2
+ elif value[0] >= warn:
+ state = 1
+ yield state, "%s: %d%s" % (key, value[0], (value[1] != '-' and
value[1] or '') ), [ (perf_clean_key(key), value[0]) ]
check_info['sap.dialog'] = {
"check_function" : check_sap_dialog,
+ "group" : "sap_dialog",
"inventory_function" : inventory_sap_dialog,
"service_description" : "%s Dialog",
"has_perfdata" : True,
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 285884f..89ae8bd 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -2167,6 +2167,48 @@ register_check_parameters(
register_check_parameters(
subgroup_applications,
+ "sap_dialog",
+ ("SAP Dialog"),
+ Dictionary(
+ elements = [
+ ( "UsersLoggedIn",
+ Tuple(
+ title = _("Number of Loggedin Users"),
+ elements = [
+ Integer(title = _("Warning at"), label =
_("Users")),
+ Integer(title = _("Critical at"), label =
_("Users"))
+ ]
+ )
+ ),
+ ( "FrontEndNetTime",
+ Tuple(
+ title = _("Frontend net time"),
+ elements = [
+ Float(title = _("Warning at"), unit = _('ms') ),
+ Float(title = _("Critical at"), unit = _('ms') )
+ ]
+ )
+ ),
+ ( "ResponseTime",
+ Tuple(
+ title = _("Response Time"),
+ elements = [
+ Float(title = _("Warning at"), unit = _('ms') ),
+ Float(title = _("Critical at"), unit = _('ms') )
+ ]
+ )
+ ),
+ ]
+ ),
+ TextAscii(
+ title = _("System ID"),
+ help = _("The SAP system ID."),
+ ),
+ match_type = "dict",
+)
+
+register_check_parameters(
+ subgroup_applications,
"nginx_status",
("Nginx Status"),
Dictionary(