diff --git a/README.md b/README.md index 8f52d5169b77d4cfe45fdb8f88a2229b59fd3326..2ecf442442e5c54bd0620f3002a27fbfd7eec3e9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[PACKAGE]: ../../raw/master/mkp/agent_ssllabs-2.0.3-20240507.mkp "agent_ssllabs-2.0.3-20240507.mkp" +[PACKAGE]: ../../raw/master/mkp/agent_ssllabs-2.0.3-20240516.mkp "agent_ssllabs-2.0.3-20240516.mkp" # Qualys SSL Labs REST API special agent This Agent uses die Qualys SSL Labs REST API to scan a list of servers for there SSL status. The plugin will check the given server and all end points reported by the SSL Labs scan. diff --git a/mkp/agent_ssllabs-2.0.3-20240516.mkp b/mkp/agent_ssllabs-2.0.3-20240516.mkp new file mode 100644 index 0000000000000000000000000000000000000000..e30950af4ab5dc7918b6670bfcdff9a96201c30e Binary files /dev/null and b/mkp/agent_ssllabs-2.0.3-20240516.mkp differ diff --git a/source/lib/python3/cmk/special_agents/agent_ssllabs.py b/source/lib/python3/cmk/special_agents/agent_ssllabs.py old mode 100644 new mode 100755 index 25f68fa377e05987ffa5bd8c83517e6f1a273973..b0709eba89a27b5b78a74ed41caa746c994cfa24 --- a/source/lib/python3/cmk/special_agents/agent_ssllabs.py +++ b/source/lib/python3/cmk/special_agents/agent_ssllabs.py @@ -18,6 +18,8 @@ # 2021-05-16: changed arguments to argparse # added options for publish results and max cache age # 2024-05-01: refactoring +# 2024-05-16: fixed proxy usage +# removed check_mk section -> no way to differentiate from checkmk agent section check_mk # sample agent output (formatted) # <<<check_mk>>> @@ -174,8 +176,7 @@ def connect_ssllabs_api(ssl_host_address: str, host_cache: str, args: Args, ) -> ) proxies = {} if args.proxy is not None: - proxies = {'https': args.proxy.split('/')[-1]} # remove 'https://' from proxy string - + proxies = {'https': args.proxy} try: response = get( url=url, @@ -215,9 +216,9 @@ def agent_ssllsbs_main(args: Args) -> int: ssl_hosts = args.ssl_hosts.split(',') # Output general information about the agent - sys_stdout.write('<<<check_mk>>>\n') - sys_stdout.write(f'Version: {VERSION}\n') - sys_stdout.write('AgentOS: linux\n') + # sys_stdout.write('<<<check_mk>>>\n') + # sys_stdout.write(f'Version: {VERSION}\n') + # sys_stdout.write('AgentOS: linux\n') # create cache directory, if it not exists Path(cache_dir).mkdir(parents=True, exist_ok=True) diff --git a/source/packages/agent_ssllabs b/source/packages/agent_ssllabs index 4695af89125f221b3c085c3045f397a8fb205ed8..8568e6654d078600f1e93e1caf077fd6b39a45d4 100644 --- a/source/packages/agent_ssllabs +++ b/source/packages/agent_ssllabs @@ -15,7 +15,7 @@ 'web': ['plugins/wato/agent_ssllabs.py']}, 'name': 'agent_ssllabs', 'title': 'ssllabs api check', - 'version': '2.0.3-20240507', + 'version': '2.0.3-20240516', 'version.min_required': '2.2.0b1', 'version.packaged': '2.2.0p24', 'version.usable_until': '2.3.0b1'} diff --git a/source/web/plugins/wato/agent_ssllabs.py b/source/web/plugins/wato/agent_ssllabs.py index 26739950510cd39f2063255839d737e4cb43d876..8132e903745ccec58868f53bb722e6eb092b6da9 100644 --- a/source/web/plugins/wato/agent_ssllabs.py +++ b/source/web/plugins/wato/agent_ssllabs.py @@ -59,8 +59,11 @@ def _valuespec_special_agents_ssllabs(): )), ('proxy', TextAscii( - title=_('proxy server, if required'), - help=_('proxy in the format: https://ip-addres|servername:port'), + title=_('proxy server'), + size=100, + help=_( + 'proxy in the format: <protocol>://<ip-address|server-name>:<port>, i.e.: http://192.168.10.10:3128' + ), )), ('publish_results', FixedValue(