Module: check_mk
Branch: master
Commit: 5ca1f935c6b7d231cd9115746d946b92375a50f9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5ca1f935c6b7d2…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Fri Nov 7 09:03:13 2014 +0100
#1448 domino_info: check is extended to also show and monitor the lnNotesServerState
---
.werks/1448 | 9 +++++++++
ChangeLog | 1 +
checkman/domino_info | 15 +++++++++++----
checks/domino_info | 28 +++++++++++++++++++++++-----
4 files changed, 44 insertions(+), 9 deletions(-)
diff --git a/.werks/1448 b/.werks/1448
new file mode 100644
index 0000000..c83b530
--- /dev/null
+++ b/.werks/1448
@@ -0,0 +1,9 @@
+Title: domino_info: check is extended to also show and monitor the lnNotesServerState
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1415347315
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index bd15e6a..eb99d58 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,7 @@
* 1432 agent_vsphere: now able to monitor virtual machines snapshots...
* 1507 New optional parse_function for check API...
* 1445 quantum_libsmall_door, quantum_libsmall_status: Two new checks for monitoring
small Quantum tape libraries
+ * 1448 domino_info: check is extended to also show and monitor the
lnNotesServerState
* 1478 FIX: kernel.util, statgrab_cpu: fix computation of utilization...
* 1480 FIX: brocade_vdx_status: disable check on some devices that do not support
it...
* 1485 FIX: dell_om_disks, dell_om_esmlog, dell_om_mem, dell_om_processors,
dell_om_sensors: detect more devices...
diff --git a/checkman/domino_info b/checkman/domino_info
index 6464205..d790d22 100644
--- a/checkman/domino_info
+++ b/checkman/domino_info
@@ -4,7 +4,14 @@ 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.
+
+ This check uses snmp to extract the following information about a Lotus
+ Domino Server from the Notes-MIB: {lnNotesServerState} the overall
+ state, {lnServerName} the server name, {lnMailDomain} the server domain,
+ {lnServerNotesVersion} the Lotus Domino version.
+
+ The state of the check is determined from the {lnNotesServerState}. A state of
+ 1:{up} leads to an OK state, states 2-4:{down, not_responding, crashed}
+ lead to a critical state, otherwise the state is warning.
+
+ No configuration and no limits can be set in this check.
diff --git a/checks/domino_info b/checks/domino_info
index 4055dbc..8754b0a 100644
--- a/checks/domino_info
+++ b/checks/domino_info
@@ -27,20 +27,37 @@
# Example SNMP walk:
#
+# .1.3.6.1.4.1.334.72.2.2.0 1
# .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
+domino_info_states = {
+ '1' : 'up',
+ '2' : 'down',
+ '3' : 'not-responding',
+ '4' : 'crashed',
+ '5' : 'unknown'
+}
+
def inventory_domino_info(info):
- if info and len(info) == 3:
+ if info and len(info[0]) != 0:
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
+ serverstate, domain, name, release = info
+ if int(serverstate[0][0]) > 4:
+ state = 1
+ infotext = "Server is %s" % ( domino_info_states[serverstate[0][0]] )
+ elif int(serverstate[0][0]) > 1:
+ state = 2
+ infotext = "Server is %s" % ( domino_info_states[serverstate[0][0]] )
+ else:
+ state = 0
+ infotext = "Server is %s. Domain: %s, Name: %s, %s" \
+ % ( domino_info_states[serverstate[0][0]], domain[0][0], name[0][0],
release[0][0] )
+ yield state, infotext
check_info['domino_info'] = {
"check_function" : check_domino_info,
@@ -49,6 +66,7 @@ check_info['domino_info'] = {
"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.2", [ 2 ] ], #
lnNotesServerState
[ ".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