Module: check_mk
Branch: master
Commit: c0af7b647ad4e845cb2b41b8b96d66303592a6ab
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c0af7b647ad4e8…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Oct 17 16:01:20 2013 +0200
Added antother suply type to alcatel_power
---
checks/alcatel_power | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/checks/alcatel_power b/checks/alcatel_power
index 6042249..7284ca6 100644
--- a/checks/alcatel_power
+++ b/checks/alcatel_power
@@ -25,12 +25,12 @@
# Boston, MA 02110-1301 USA.
def inventory_alcatel_power(info):
- return [ (x[0], None) for x in info if x[2] in ['0x35000001', '0x45000004']]
+ return [ (x[0], None) for x in info if x[2] in ['0x35000001', '0x45000004', '0x45000002']]
def check_alcatel_power(item, _no_params, info):
for line in info:
if item == line[0]:
- if line[2] not in ['0x35000001', '0x45000004']:
+ if line[2] not in ['0x35000001', '0x45000004', '0x45000002']:
return 3, "No Power supply connected to this port"
if int(line[1]) != 1:
return 2, "Supply in error condition (%s)" % line[1]
Module: check_mk
Branch: master
Commit: b58d431c64a209ed4da97d24d7f56343fcb8819c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b58d431c64a209…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Oct 17 16:00:47 2013 +0200
Updated bug entries #0832
---
.bugs/832 | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/.bugs/832 b/.bugs/832
new file mode 100644
index 0000000..ab41174
--- /dev/null
+++ b/.bugs/832
@@ -0,0 +1,9 @@
+Title: snmp infos are missing in wato inventory until clicking full scan
+Component: wato
+State: open
+Date: 2013-10-17 15:57:04
+Targetversion: 1.4.0
+Class: bug
+
+When adding a hosts, either a tcp+snmp or snmp only, the Informationen from the snmp checks are missing
+after clicking "Save and go to services". They will not shown befor clicking on "Full Scan"
Module: check_mk
Branch: master
Commit: 7c76d9e826cd5faedb62d894343e00392f0a592d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7c76d9e826cd5f…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Oct 17 17:11:21 2013 +0200
Check_ftp: can now be configured via Wato
---
ChangeLog | 1 +
checks/check_ftp | 66 +++++++++++++++++++++++++++++++++
web/plugins/wato/active_checks.py | 73 +++++++++++++++++++++++++++++++++++++
3 files changed, 140 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index caa13f6..ae14b54 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -46,6 +46,7 @@
* New option for full SNMP scan in bulk inventory
* FIX: correct display of number of hosts in bulk inventory
* FIX: nailed down ".siteid" exception when added new site
+ * Check_ftp: can now be configured via Wato
1.2.3i4:
Core:
diff --git a/checks/check_ftp b/checks/check_ftp
new file mode 100644
index 0000000..7200786
--- /dev/null
+++ b/checks/check_ftp
@@ -0,0 +1,66 @@
+#!/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_ftp_arguments(params):
+ host, settings = params
+ args = ' -H %s' % quote_shell_string(host)
+
+ if "response_time" in settings:
+ args += ' -w %f -c %f' % (
+ settings["response_time"][0]/1000.0,
+ settings["response_time"][1]/1000.0)
+
+ if "timeout" in settings:
+ args += ' -t %d' % settings["timeout"]
+
+ if "refuse_state" in settings:
+ args += ' -r %s' % settings["refuse_state"]
+
+ if settings.get("escape_send_string"):
+ args += ' --escape'
+
+ if "send_string" in settings:
+ args += ' -s %s' % quote_shell_string(settings["send_string"])
+
+ if "expect" in settings:
+ for s in settings["expect"]:
+ args += ' -e %s' % quote_shell_string(s)
+
+ if settings.get("ssl"):
+ args += ' --ssl'
+
+ if "cert_days" in settings:
+ args += ' -D %d' % settings["cert_days"]
+
+ return args
+
+active_check_info['ftp'] = {
+ "command_line" : '$USER1$/check_ftp $ARG1$',
+ "argument_function" : check_ftp_arguments,
+ "service_description" : lambda args: "FTP %s" % args[0],
+ "has_perfdata" : True,
+}
+
diff --git a/web/plugins/wato/active_checks.py b/web/plugins/wato/active_checks.py
index 52d46d2..8e1971e 100644
--- a/web/plugins/wato/active_checks.py
+++ b/web/plugins/wato/active_checks.py
@@ -92,6 +92,79 @@ register_rule(group,
)
)
+register_rule(group,
+ "active_checks:ftp",
+ Tuple(
+ title = _("Check FTP Services"),
+ elements = [
+ TextAscii ( title = _("Hostname"), allow_empty = False,
+ help = _("The hostname of the FTP server you want to check"
+ "It is possible to use $HOSTNAME$ or $HOSTADDRESS$ ")
+ ),
+ Dictionary(
+ elements = [
+ ( "response_time",
+ Tuple(
+ title = _("Expected response time"),
+ elements = [
+ Float(
+ title = _("Warning if above"),
+ unit = "ms",
+ default_value = 100.0),
+ Float(
+ title = _("Critical if above"),
+ unit = "ms",
+ default_value = 200.0),
+ ])
+ ),
+ ( "timeout",
+ Integer(
+ title = _("Seconds before connection times out"),
+ unit = _("sec"),
+ default_value = 10,
+ )
+ ),
+ ( "refuse_state",
+ DropdownChoice(
+ title = _("State for connection refusal"),
+ choices = [ ('crit', _("CRITICAL")),
+ ('warn', _("WARNING")),
+ ('ok', _("OK")),
+ ])
+ ),
+
+ ( "send_string",
+ TextAscii(
+ title = _("String to send"),
+ size = 30)
+ ),
+ ( "expect",
+ ListOfStrings(
+ title = _("Strings to expect in response"),
+ orientation = "horizontal",
+ valuespec = TextAscii(size = 30),
+ )
+ ),
+
+ ( "ssl",
+ FixedValue(
+ value = True,
+ totext = _("use SSL"),
+ title = _("Use SSL for the connection."))
+
+ ),
+ ( "cert_days",
+ Integer(
+ title = _("SSL certificate validation"),
+ help = _("Minimum number of days a certificate has to be valid"),
+ unit = _("days"),
+ default_value = 30)
+ ),
+ ]),
+ ]
+ )
+)
+
register_rule(group,
"active_checks:dns",
Module: check_mk
Branch: master
Commit: 232d1a705c71bc13d9fca42bcee85051579bcf3b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=232d1a705c71bc…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Oct 17 16:23:59 2013 +0200
FIX: correctly named dell_om_esmlog
Precompile failed due to a mismatch of the filename and the
check name
---
checkman/dell_om_esmlog | 1 -
checks/dell_om_esmlog | 10 +++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/checkman/dell_om_esmlog b/checkman/dell_om_esmlog
index ebc6f65..c00deb3 100644
--- a/checkman/dell_om_esmlog
+++ b/checkman/dell_om_esmlog
@@ -10,7 +10,6 @@ description:
In case that the logfile more then 80% full, the check returns
a {WARN} state/
-
inventory:
One check will be created
diff --git a/checks/dell_om_esmlog b/checks/dell_om_esmlog
index 02bfbd8..f1fd3da 100644
--- a/checks/dell_om_esmlog
+++ b/checks/dell_om_esmlog
@@ -24,12 +24,12 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-def inventory_dell_om_esmlogs(info):
+def inventory_dell_om_esmlog(info):
if len(info) > 0:
return [ ( None, None ) ]
return []
-def check_dell_om_esmlogs(_no_item, _no_params, info):
+def check_dell_om_esmlog(_no_item, _no_params, info):
status = int(info[0][0])
if status == 5:
state = 2
@@ -44,9 +44,9 @@ def check_dell_om_esmlogs(_no_item, _no_params, info):
return state, message
-check_info["dell_om_esmlogs"] = {
- "check_function" : check_dell_om_esmlogs,
- "inventory_function" : inventory_dell_om_esmlogs,
+check_info["dell_om_esmlog"] = {
+ "check_function" : check_dell_om_esmlog,
+ "inventory_function" : inventory_dell_om_esmlog,
"service_description" : "ESM Log",
"has_perfdata" : False,
# There is no other way to find out that openmanage is present.
Module: check_mk
Branch: master
Commit: 4b5b8fcd663033950f08eb56dd960cb5c8cefad8
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4b5b8fcd663033…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Oct 17 15:17:53 2013 +0200
Commands can now be restricted to only be shown in specific views
---
web/htdocs/views.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index bd0c839..6420737 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -2181,6 +2181,10 @@ def show_command_form(is_open, datasource):
by_group = {}
for command in multisite_commands:
if what in command["tables"] and config.may(command["permission"]):
+ # Some special commands can be shown on special views using this option.
+ # It is currently only used in custom views, not shipped with check_mk.
+ if command.get('only_view') and html.var('view_name') != command['only_view']:
+ continue
group = command.get("group", _("Various Commands"))
by_group.setdefault(group, []).append(command)