Module: check_mk
Branch: master
Commit: 478842395b5586c1e6ccee40c51bea0e3dcfce46
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=478842395b5586…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Tue Aug 5 13:51:39 2014 +0200
#0197 check_uniserv: New Check for Uniserv Data Management Services
This check uses a tcp connect to monitor the Uniserv Service.
Uniserv ( http://www.uniserv.com/ ) is a Data Management Service who offers
diffrent services like Address Checks, Banking Data Checks etc.
---
.werks/197 | 13 ++++++
ChangeLog | 1 +
checkman/check_uniserv | 16 +++++++
checks/check_uniserv | 63 +++++++++++++++++++++++++++
doc/treasures/active_checks/check_uniserv | 67 +++++++++++++++++++++++++++++
web/plugins/wato/active_checks.py | 38 ++++++++++++++++
6 files changed, 198 insertions(+)
diff --git a/.werks/197 b/.werks/197
new file mode 100644
index 0000000..2334331
--- /dev/null
+++ b/.werks/197
@@ -0,0 +1,13 @@
+Title: check_uniserv: New Check for Uniserv Data Management Services
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i6
+Date: 1407239445
+Class: feature
+
+This check uses a tcp connect to monitor the Uniserv Service.
+Uniserv ( http://www.uniserv.com/ ) is a Data Management Service who offers
+diffrent services like Address Checks, Banking Data Checks etc.
+
+
diff --git a/ChangeLog b/ChangeLog
index 5626a53..ae3c049 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@
* 0193 docsis_cm_status: New Check Status Check for Cable Modems with Docsis MIB.
* 1070 printer_input/printer_output: New checks to monitor input/output sub-units of printers...
* 0196 esx_vsphere_hostsystem: New subcheck for maintenance mode...
+ * 0197 check_uniserv: New Check for Uniserv Data Management Services...
* 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/check_uniserv b/checkman/check_uniserv
new file mode 100644
index 0000000..d1b59d8
--- /dev/null
+++ b/checkman/check_uniserv
@@ -0,0 +1,16 @@
+title: Uniserv Service
+agents: active
+catalog: agentless
+license: GPL
+distribution: check_mk
+description:
+ This check uses a tcp connect to monitor the Uniserv Service.
+ Uniserv ( http://www.uniserv.com/ ) is a Data Management Service who offers
+ diffrent services like Address Checks, Banking Data Checks etc.
+
+ Whith this active check it is possible to querie one address and the response from
+ uniserv against a regex, or you can simply try to receive the version number from uniserv to make
+ sure that the service is reachable.
+
+ This check can be configured by Wato.
+
diff --git a/checks/check_uniserv b/checks/check_uniserv
new file mode 100644
index 0000000..013dc33
--- /dev/null
+++ b/checks/check_uniserv
@@ -0,0 +1,63 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 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.
+
+def check_uniserv_arguments(params):
+ args = " $HOSTADDRESS$"
+ args += " " + str(params['port'])
+ args += " " + quote_shell_string(params['service'])
+ if type(params['job']) == tuple:
+ job = params['job'][0]
+ else:
+ job = params['job']
+ if job == "version":
+ args += " VERSION"
+ else:
+ address = params['job'][1]
+ args += " ADDRESS"
+ args += " " + quote_shell_string(address['street'])
+ args += " " + str(address['street_no'])
+ args += " " + quote_shell_string(address['city'])
+ args += " " + quote_shell_string(address['search_regex'])
+
+ return args
+
+def check_uniserv_desc(params):
+ if type(params['job']) == tuple:
+ job = params['job'][0]
+ else:
+ job = params['job']
+ if job == "version":
+ return "Version"
+ else:
+ return "Address " + params['job'][1]['city']
+
+
+active_check_info['uniserv'] = {
+ "command_line" : '$USER1$/check_uniserv $ARG1$',
+ "argument_function" : check_uniserv_arguments,
+ "service_description" : check_uniserv_desc,
+}
+
diff --git a/doc/treasures/active_checks/check_uniserv b/doc/treasures/active_checks/check_uniserv
new file mode 100755
index 0000000..fd3e867
--- /dev/null
+++ b/doc/treasures/active_checks/check_uniserv
@@ -0,0 +1,67 @@
+#!/usr/bin/python
+import socket, sys
+BUFFER_SIZE = 1024
+try:
+ HOST = sys.argv[1]
+ TCP_PORT = int(sys.argv[2])
+ SERVICE = sys.argv[3]
+ JOB = sys.argv[4]
+ if JOB == "ADDRESS":
+ STREET = sys.argv[5]
+ STREET_NR = sys.argv[6]
+ CITY = sys.argv[7]
+ REGEX = sys.argv[8]
+except:
+ print " Usage: client_uniserv.py HOSTNAME PORT SERVICE (VERSION|ADDRESS STREET NR CITY SEARCH_REGEX) "
+ sys.exit(3)
+
+def parse_response(data):
+ info = dict([ x.split('=') for x in data.split(";") ][:-1])
+ if info['type'] == '1':
+ print "Invalid response: " % str(info)
+ sys.exit(3)
+ return info
+
+s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+s.connect((HOST, TCP_PORT))
+
+sendstring = "open:service="+SERVICE+";servicehost="+HOST+"\n"
+s.send(sendstring)
+
+data = parse_response(s.recv(BUFFER_SIZE))
+if not data.get('session'):
+ print "Error getting SID. Response was: " + str(data)
+ sys.exit(3)
+sid = data.get('session')
+
+if JOB == "VERSION":
+ sendstring = "version:session="+sid+"\n"
+ s.send(sendstring)
+ data = parse_response(s.recv(BUFFER_SIZE))
+ state = 0
+ infotext = "Version is " + data['version_str']
+elif JOB == "ADDRESS":
+ import re
+ sendstring = "exec:session=%s;request_type=check_address;in_str=%s;in_hno=%s;in_city=%s\n" % \
+ ( sid, STREET, STREET_NR, CITY )
+ s.send(sendstring)
+ data = parse_response(s.recv(BUFFER_SIZE))
+
+ sendstring = "fetch:session="+sid+";out_zip=?;out_city=?\n"
+ s.send(sendstring)
+ data = parse_response(s.recv(BUFFER_SIZE))
+
+ state = 0
+ infotext = "Address is %s %s" % ( data['out_zip'], data['out_city'])
+ if not re.match( REGEX, data['out_city']):
+ infotext += " But excpects %s" % REGEX
+ state = 2
+else:
+ state = 3
+ infotext = "JOB not known"
+
+s.send("close:session="+sid+"\n")
+s.close()
+
+print infotext
+sys.exit(state)
diff --git a/web/plugins/wato/active_checks.py b/web/plugins/wato/active_checks.py
index 18273dd..be4ee0c 100644
--- a/web/plugins/wato/active_checks.py
+++ b/web/plugins/wato/active_checks.py
@@ -475,6 +475,44 @@ register_rule(group,
match = 'all'
)
+register_rule(group,
+ "active_checks:uniserv", Dictionary(
+ title = _("Check uniserv service"), optional_keys = False, elements = [
+ ("port",
+ Integer( title = _("Port") )),
+ ("service",
+ TextAscii( title = _("Service String"),
+ help = _("Enter here the uniserve service name. (Has nothting to do with service description)")
+ )),
+ ("job",
+ CascadingDropdown(
+ title = _("Mode of the Check"),
+ help = _("Choose if you just want to query the version number,"
+ " or if you want to check the response to a address querie"),
+ choices = [
+ ("version", _("Check for Version")),
+ ("address", _("Check for a Address"),
+ Dictionary(
+ title = _("Address Check mode"),
+ optional_keys = False,
+ elements = [
+ ( "street",
+ TextAscii( title = _("Street name"))),
+ ( "street_no",
+ Integer( title = _("Street number"))),
+ ( "city",
+ TextAscii( title = _("City name"))),
+ ( "search_regex",
+ TextAscii( title = _("Check City against Regex"),
+ help = _( "The City name from the response will be checked against "
+ "the regular expression specified here"),
+ )),
+ ]
+ )),
+ ]
+ )),
+
+ ]))
register_rule(group,
"active_checks:http",
Module: check_mk
Branch: master
Commit: c67f0be79cf0ba768d359a2a31983470eecd1d50
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c67f0be79cf0ba…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Tue Aug 5 11:10:19 2014 +0200
esx_vsphere_hostsystem.maintenance: Added manual
---
checkman/esx_vsphere_hostsystem.maintenance | 21 +++++++++++++++++++++
checks/esx_vsphere_hostsystem | 1 -
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/checkman/esx_vsphere_hostsystem.maintenance b/checkman/esx_vsphere_hostsystem.maintenance
new file mode 100644
index 0000000..6715708
--- /dev/null
+++ b/checkman/esx_vsphere_hostsystem.maintenance
@@ -0,0 +1,21 @@
+title: VMWare ESX Host System: Maintenance State
+agents: vsphere
+catalog: os/misc
+license: GPL
+distribution: check_mk
+description:
+ This check queries the maintenance State of an ESX host
+ system via the vsphere agent and returns:
+
+ {OK} if the ESX host has the same sate since the last service detection
+
+ {CRIT} if the state has changed.
+
+ The behavior can be changed by a Wato rule to force Maintenance mode or not.
+
+ See "Monitoring VMWare ESX with Check_MK" in the online documentation
+ as well.
+
+inventory:
+ On each ESX host one check is generated.
+
diff --git a/checks/esx_vsphere_hostsystem b/checks/esx_vsphere_hostsystem
index b885c00..7f7d262 100644
--- a/checks/esx_vsphere_hostsystem
+++ b/checks/esx_vsphere_hostsystem
@@ -211,7 +211,6 @@ def inventory_esx_vsphere_hostsystem_maintenance(info):
data = esx_vsphere_hostsystem_convert(info)
if 'runtime.inMaintenanceMode' in data:
current_state = str(data['runtime.inMaintenanceMode'][0]).lower()
- print current_state
return [(None, { 'target_state' : current_state })]
def check_esx_vsphere_hostsystem_maintenance(_no_item, params, info):
Module: check_mk
Branch: master
Commit: 3adef29f4f79911e22bd8cfd951c30d597b323fe
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3adef29f4f7991…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Aug 5 08:28:00 2014 +0200
Updated bug entries #2128, #2152, #2154
---
.bugs/2128 | 7 +++++--
.bugs/2152 | 7 +++++--
.bugs/2154 | 7 +++++--
3 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/.bugs/2128 b/.bugs/2128
index 5dd4bef..511f3b7 100644
--- a/.bugs/2128
+++ b/.bugs/2128
@@ -1,10 +1,13 @@
Title: mk-job: Start time is only available after job finished
Component: checks
-State: open
+Class: bug
+State: done
Date: 2014-04-22 08:32:35
Targetversion: 1.2.5i1
-Class: bug
This should really be changed. The start time should be available once the job has been
started. The check needs to deal with the old job info and the start time of the just
started and currently running job while the job is running.
+
+2014-08-05 08:27:09: changed state open -> done
+Has been fixed. The check does process the currently running commands start_time.
diff --git a/.bugs/2152 b/.bugs/2152
index be404a8..293ee6c 100644
--- a/.bugs/2152
+++ b/.bugs/2152
@@ -1,10 +1,13 @@
Title: Resorting of embedded views in dashboard drop display_options
Component: multisite
-State: open
+Class: bug
+State: done
Date: 2014-04-15 10:49:41
Targetversion: future
-Class: bug
If you resort a view by clicking on a column header (of a view that is
contained in the dashboard) then the display options get lost and the
title and context buttons appear.
+
+2014-08-05 07:56:17: changed state open -> done
+Has been solved with new dashboard editor
diff --git a/.bugs/2154 b/.bugs/2154
index e286e45..3f1896f 100644
--- a/.bugs/2154
+++ b/.bugs/2154
@@ -1,9 +1,9 @@
Title: Online-Status of users not correct
Component: wato
-State: open
+Class: bug
+State: done
Date: 2014-05-07 11:52:58
Targetversion: 1.2.5i1
-Class: bug
In the WATO users page there is a gray or green ball that indicates
wether a user is currently online. This is assumed to work as follows:
@@ -18,3 +18,6 @@ At least 50 users where active, but just a couple being displayed as online. It
the case that some cache prohibits the correct update of the last_seen information in
WATO, so that the last_seen.mk files are not being loaded and an old state of them being
used.
+
+2014-08-05 07:59:37: changed state open -> done
+Has been solved in 1.2.5i1.