Hello Christian,
One of the checks is the problem(check_http). I removed it and it works now. See below the check.
Kind regards,
[asd2@gdnmonitor06 checks_save]$ cat check_http
#!/usr/bin/python
-- encoding: utf-8; py-indent-offset: 4 --
±-----------------------------------------------------------------+
| ____ _ _ __ __ _ __ |
| / _| | ___ ___| | __ | / | |/ / |
| | | | '_ \ / _ / __| |/ / | |/| | ’ / |
| | |___| | | | / (| < | | | | . \ |
| _|| ||_|_||___|| |||_\ |
| |
| Copyright Mathias Kettner 2013 mk@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_http_arguments(params):
description, settings = params
args = ‘’
if "vhost" in settings:
args += ' -H %s' % quote_shell_string(settings["vhost"])
if "virthost" in settings:
vhost, omit_ip = settings["virthost"]
args += ' -H %s' % quote_shell_string(vhost)
else:
omit_ip = False
if "uri" in settings:
args += ' -u %s' % quote_shell_string(settings["uri"])
if "port" in settings:
args += ' -p %d' % settings["port"]
if settings.get("ssl"):
args += ' --ssl'
if "cert_host" in settings:
omit_ip = True
args += ' -H $HOSTADDRESS$'
args += ' -I %s' % quote_shell_string(settings['cert_host'])
if "cert_days" in settings:
args += ' -C %d' % settings["cert_days"]
if settings.get("sni"):
args += ' --sni'
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 "user_agent" in settings:
args += ' -A %s' % quote_shell_string(settings["user_agent"])
for header in settings.get("add_headers", []):
args += ' -k %s' % quote_shell_string(header)
if "auth" in settings:
auth = settings["auth"]
args += ' -a %s:%s' % (quote_shell_string(auth[0]), quote_shell_string(auth[1]))
if "proxy_auth" in settings:
auth = settings["proxy_auth"]
args += ' -b %s:%s' % (quote_shell_string(auth[0]), quote_shell_string(auth[1]))
if "onredirect" in settings:
args += ' --onredirect=%s' % settings["onredirect"]
for s in settings.get("expect_response", []):
args += ' -e %s' % quote_shell_string(s)
if "expect_string" in settings:
args += ' -s %s' % quote_shell_string(settings["expect_string"])
if "expect_regex" in settings:
if len(settings['expect_regex']) >= 4 and settings['expect_regex'][3]:
args += ' -l '
if settings['expect_regex'][1]:
args += ' -R'
else:
args += ' -r'
args += ' %s' % quote_shell_string(settings['expect_regex'][0])
if settings['expect_regex'][2]:
args += ' --invert-regex'
if "post_data" in settings:
data, content_type = settings["post_data"]
args += ' -P %s -T %s' % \
(quote_shell_string(data),
quote_shell_string(content_type))
if "method" in settings:
args += ' -j %s' % settings["method"]
if settings.get("no_body"):
args += ' --no-body'
if "page_size" in settings:
args += ' -m %d:%d' % settings["page_size"]
if "max_age" in settings:
args += ' -M %d' % settings["max_age"]
if settings.get("urlize"):
args += ' -L'
#----------------------------------------------------------
DE 20151009: added parameter for performance data
#----------------------------------------------------------
if settings.get("extended_performance_data"):
args += ' -E'
#----------------------------------------------------------
DE 20151009: added parameters for client cert & keyfile
#----------------------------------------------------------
if not omit_ip:
args = " -I $HOSTADDRESS$" + args
if "client_certificate" in settings:
args += ' -J %s' % settings["client_certificate"]
if "private_keyfile" in settings:
args += ' -K %s' % settings["private_keyfile"]
return args
def check_http_desc(params):
if params[0].startswith("^"):
return params[0][1:]
#if params[1].get(“ssl”):
# return “HTTPS %s” % params[0]
return “HTTP %s” % params[0]
return "%s" % params[0]
active_check_info[‘http’] = {
“command_line” : ‘$USER1$/check_http $ARG1$’,
“argument_function” : check_http_arguments,
“service_description” : check_http_desc,
“has_perfdata” : True,
}