Module: check_mk
Branch: master
Commit: ae67c2b058e28bd20dd5340d9a33daa640f6ade9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ae67c2b058e28b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu May 10 14:05:34 2012 +0200
fixed logwatch pattern item select help text
---
checks/mssql_versions | 39 ++++++++++++++++++++++++++++++++++
web/plugins/wato/check_parameters.py | 3 +-
2 files changed, 41 insertions(+), 1 deletions(-)
diff --git a/checks/mssql_versions b/checks/mssql_versions
new file mode 100644
index 0000000..c24189d
--- /dev/null
+++ b/checks/mssql_versions
@@ -0,0 +1,39 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2012 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.
+
+# <<<mssql_versions>>>
+# MSSQL$SQLEXPRESS 10.50.1600.1
+
+def inventory_mssql_versions(info):
+ return [ (line[0].replace('$', '_'), None) for line in info if
len(line) >= 2 ]
+
+def check_mssql_versions(item, _unused, info):
+ for line in info:
+ if line[0].replace('$', '_') == item:
+ return (0, 'OK - Server is running Version %s' % line[1])
+ return (2, "UNKNOWN - Server instance not existing or not running")
+
+check_info['mssql_versions'] = (check_mssql_versions, "MSSQL %s
Version", 0, inventory_mssql_versions )
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 4893395..034a499 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -126,7 +126,8 @@ register_rule(group + '/' + subgroup_applications,
),
itemtype = 'item',
itemname = 'logfile',
- itemhelp = _("One or several regular expressions for matching logfile
lines."),
+ itemhelp = _("Put the item names of the logfiles here. For example
\"System$\" "
+ "to select the service \"LOG System\"."),
match = 'list',
)