Module: check_mk
Branch: master
Commit: 61b4c3f761ba2745bec9b6458c5777969a62240d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=61b4c3f761ba27…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Fri Oct 24 11:55:36 2014 +0200
#0664 domino_users: new check to monitor the number of users on a Domino Notes server
---
.werks/664 | 9 ++++++
ChangeLog | 1 +
checkman/domino_users | 22 +++++++++++++
checks/domino_users | 58 ++++++++++++++++++++++++++++++++++
web/plugins/wato/check_parameters.py | 14 ++++++++
5 files changed, 104 insertions(+)
diff --git a/.werks/664 b/.werks/664
new file mode 100644
index 0000000..84d949c
--- /dev/null
+++ b/.werks/664
@@ -0,0 +1,9 @@
+Title: domino_users: new check to monitor the number of users on a Domino Notes server
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i6
+Date: 1414144487
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index c90686c..e8d89ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -75,6 +75,7 @@
* 0662 domino_mailqueues: new check to monitor mail queues in Lotus Domino
* 1188 veeam_client: Check now also outputs ReadSize and TransferedSize...
* 0663 domino_info: new check to extract informational data about a Lotus Domino Server
+ * 0664 domino_users: new check to monitor the number of users on a Domino Notes server
* 1051 FIX: tcp_conn_stats: fix missing performance data...
* 1142 FIX: winperf_ts_sessions: fix computation, check has never really worked
* 1090 FIX: zfsget: fixed exception which happened on incomplete zfs entries
diff --git a/checkman/domino_users b/checkman/domino_users
new file mode 100644
index 0000000..5d69d70
--- /dev/null
+++ b/checkman/domino_users
@@ -0,0 +1,22 @@
+title: IBM Lotus Domino: Domino Users
+agents: snmp
+catalog: app/lotusnotes
+license: GPL
+distribution: check_mk
+description:
+ This check uses snmp to extract the number of users on a Lotus Domino Server.
+ Warning and critical upper limits can be set to the number of users.
+
+perfdata:
+ The number of users
+
+[parameters]
+parameters(tuple): parameters is a tuple of two values
+
+ {warn}: (int) The warning level
+
+ {crit}: (int) The critical level
+
+[configuration]
+domino_users_default_levels (tuple): This variable is preset to { (1000,1500) }
+
diff --git a/checks/domino_users b/checks/domino_users
new file mode 100644
index 0000000..b2496ea
--- /dev/null
+++ b/checks/domino_users
@@ -0,0 +1,58 @@
+#!/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-
+# ails. 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.
+
+domino_users_default_levels = ( 1000, 1500 )
+
+def inventory_domino_users(info):
+ if info:
+ yield None, 'domino_users_default_levels'
+
+def check_domino_users(_no_item, params, info):
+ if info:
+ users = int(info[0][0])
+ warn, crit = params
+ infotext = "%d Domino Users on Server" % users
+ levels = " (Warn/Crit at %s/%s)" % ( warn, crit )
+ perfdata = [ ( "users", users, warn, crit ) ]
+ state = 0
+ if users >= crit:
+ state = 2
+ infotext += levels
+ elif users >= warn:
+ state = 1
+ infotext += levels
+ yield state, infotext, perfdata
+
+
+check_info["domino_users"] = {
+ "check_function" : check_domino_users,
+ "inventory_function" : inventory_domino_users,
+ "service_description" : "Domino Users",
+ "has_perfdata" : True,
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.311.1.1.3.1.2",
+ "snmp_info" : (".1.3.6.1.4.1.334.72.1.1.6.3", [6]),
+ "group" : "domino_users"
+}
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 7d34671..14ecc9c 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -6866,3 +6866,17 @@ register_check_parameters(
),
"first"
)
+
+register_check_parameters(
+ subgroup_applications,
+ "domino_users",
+ _("Lotus Domino Users"),
+ Tuple(
+ title = _("Number of Lotus Domino Users"),
+ elements = [
+ Integer(title = _("warning if above"), default_value = 1000 ),
+ Integer(title = _("critical if above"), default_value = 1500 ),
+ ]
+ ),
+ None, None
+)
Module: check_mk
Branch: master
Commit: 9613fb5d83214aa8d36ed9502b9b4823d3854ac8
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9613fb5d83214a…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Fri Oct 24 10:01:16 2014 +0200
#0663 domino_info: new check to extract informational data about a Lotus Domino Server
---
.werks/663 | 9 ++++++++
ChangeLog | 1 +
checkman/domino_info | 10 +++++++++
checks/domino_info | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 77 insertions(+)
diff --git a/.werks/663 b/.werks/663
new file mode 100644
index 0000000..1457c9e
--- /dev/null
+++ b/.werks/663
@@ -0,0 +1,9 @@
+Title: domino_info: new check to extract informational data about a Lotus Domino Server
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i6
+Date: 1414137636
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 1c45197..c90686c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -74,6 +74,7 @@
* 1442 ups_socomec_out_source: New check for checking the power source of out phases for Socomec UPSs
* 0662 domino_mailqueues: new check to monitor mail queues in Lotus Domino
* 1188 veeam_client: Check now also outputs ReadSize and TransferedSize...
+ * 0663 domino_info: new check to extract informational data about a Lotus Domino Server
* 1051 FIX: tcp_conn_stats: fix missing performance data...
* 1142 FIX: winperf_ts_sessions: fix computation, check has never really worked
* 1090 FIX: zfsget: fixed exception which happened on incomplete zfs entries
diff --git a/checkman/domino_info b/checkman/domino_info
new file mode 100644
index 0000000..6464205
--- /dev/null
+++ b/checkman/domino_info
@@ -0,0 +1,10 @@
+title: IBM Lotus Domino: Informational Data
+agents: snmp
+catalog: app/lotusnotes
+license: GPL
+distribution: check_mk
+description:
+ This check uses snmp to extract the following informational data about a
+ Lotus Notes Server: {lnServerName} the server name, {lnMailDomain} the server
+ domain, {lnServerNotesVersion} the Lotus Notes version. No configuration and
+ no limits can be set in this check.
diff --git a/checks/domino_info b/checks/domino_info
new file mode 100644
index 0000000..4055dbc
--- /dev/null
+++ b/checks/domino_info
@@ -0,0 +1,57 @@
+#!/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-
+# ails. 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.
+
+
+# Example SNMP walk:
+#
+# .1.3.6.1.4.1.334.72.1.1.4.8.0 MEDEMA
+# .1.3.6.1.4.1.334.72.1.1.6.2.1.0 CN=HH-BK4/OU=SRV/O=MEDEMA/C=DE
+# .1.3.6.1.4.1.334.72.1.1.6.2.4.0 Release 8.5.3FP5 HF89
+
+
+def inventory_domino_info(info):
+ if info and len(info) == 3:
+ yield None, None
+
+def check_domino_info(_no_item, _no_params, info):
+ if len(info) == 3:
+ domain, name, release = info
+ infotext = "Name: %s, Domain: %s, %s" % ( domain[0][0], name[0][0], release[0][0] )
+ yield 0, infotext
+
+check_info['domino_info'] = {
+ "check_function" : check_domino_info,
+ "inventory_function" : inventory_domino_info,
+ "has_perfdata" : False,
+ "service_description" : "Domino Info",
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.311.1.1.3.1.2",
+ "snmp_info" : [
+ [ ".1.3.6.1.4.1.334.72.1.1.4", [ 8 ] ], # lnMailDomain
+ [ ".1.3.6.1.4.1.334.72.1.1.6.2", [ 1 ] ], # lnServerName
+ [ ".1.3.6.1.4.1.334.72.1.1.6.2", [ 4 ] ], # lnServerNotesVersion
+ ]
+}
+