Collection of CheckMK checks (see https://checkmk.com/). All checks and plugins are provided as is. Absolutely no warranty. Send any comments to thl-cmk[at]outlook[dot]com

Skip to content
Snippets Groups Projects
Commit ca4f75b0 authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

update project

parent d7113322
No related branches found
No related tags found
No related merge requests found
......@@ -62,37 +62,6 @@ bakery_version = '20220313.v0.0.5'
def get_curl_files(conf: Tuple[str, Dict[str, List[any]]]) -> FileGenerator:
# conf = (
# 'windows',
# {
# 'url_list': [
# {
# 'service_name': 'thl-cmk.hopto.org',
# 'url': 'https://thl-cmk.hopto.org',
# 'url_settings': {
# 'follow_redirects': '',
# 'ssl_no_verify': '',
# 'http_proxy': (
# 'http_proxy',
# {
# 'proxy_server': ('url.proxy.server', 80),
# 'proxy_auth': ('urluser', ('store', 'default_proxy'), '--proxy-digest')
# }
# )
# }
# }
# ],
# 'default_settings': {
# 'follow_redirects': '-L',
# 'ssl_no_verify': '-k',
# 'http_proxy': {
# 'proxy_server': ('default.proxy.intern', 3128),
# 'proxy_auth': ('defaultuser', ('password', 'defaultpassword'), '--proxy-digest')
# }
# }
# }
# )
if conf[0] == 'linux':
_os = OS.LINUX
_script = 'curl.sh'
......@@ -177,13 +146,12 @@ def get_curl_files(conf: Tuple[str, Dict[str, List[any]]]) -> FileGenerator:
for key in [
'expected_strings',
'header_strings',
'user_auth',
'user_agent',
'referer',
'request_headers',
]:
if type(url_settings.get(key)) == tuple:
url_settings.update({key: url_settings[key][1]})
for key in [
'limit_rate',
'max_file_size',
......@@ -192,6 +160,8 @@ def get_curl_files(conf: Tuple[str, Dict[str, List[any]]]) -> FileGenerator:
'speed_time',
'connect_timeout',
'api_key_header',
'user_auth',
]:
if type(url_settings.get(key)) == tuple:
if url_settings[key][0] == key:
......@@ -357,7 +327,7 @@ def get_curl_files(conf: Tuple[str, Dict[str, List[any]]]) -> FileGenerator:
include_header=False,
)
options_array.append(f'--data-binary @{_conf_path}curl/curl_item_{curl_item}.post_binary')
url_settings.pop('post_raw')
url_settings.pop('post_binary')
if url_settings.get('regex_response'):
regex_str, no_case, multi_line = url_settings['regex_response']
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment