diff --git a/README.md b/README.md index 57d5c53bda2d961bd5888fae6b13907d6d6581bb..8f94bd6ea0b32019c8142a2331a66974e0dd775c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[PACKAGE]: ../../raw/master/mkp/agent_ssllabs-2.0.2-20240504.mkp "agent_ssllabs-2.0.2-20240504.mkp" +[PACKAGE]: ../../raw/master/mkp/agent_ssllabs-2.0.3-20240506.mkp "agent_ssllabs-2.0.3-20240506.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-20240506.mkp b/mkp/agent_ssllabs-2.0.3-20240506.mkp new file mode 100644 index 0000000000000000000000000000000000000000..17a451697311f24e8902c2aeb8387697310e6fc9 Binary files /dev/null and b/mkp/agent_ssllabs-2.0.3-20240506.mkp differ diff --git a/source/agent_based/ssllabs_grade.py b/source/agent_based/ssllabs_grade.py index 4355f1f2c4ef8cecdb0b70d828d897693a620e6a..01c3fb84c2ac6f0555469f6d82edb02a3706a43c 100644 --- a/source/agent_based/ssllabs_grade.py +++ b/source/agent_based/ssllabs_grade.py @@ -12,8 +12,7 @@ # based on the ssllabs plugin from Karsten Schoeke karsten.schoeke@geobasis-bb.de # see https://exchange.checkmk.com/p/ssllabs -# 2021-05-15: rewritten for CMK 2.0 by thl-cmk[at]outlook[dot]com -# moved to ~/local/lib/check_mk/base/plugins/agent_based +# 2024-05-06: added pending to ok states for end points # sample string_table: @@ -22,7 +21,7 @@ # "host": "thl-cmk.hopto.org", # "port": 443, # "protocol": "http", -# "isPublic": false, +# "isPublic": False, # "status": "READY", # "startTime": 1714559152230, # "testTime": 1714559237958, @@ -35,8 +34,8 @@ # "statusMessage": "Ready", # "grade": "A+", # "gradeTrustIgnored": "A+", -# "hasWarnings": false, -# "isExceptional": true, +# "hasWarnings": False, +# "isExceptional": True, # "progress": 100, # "duration": 85530, # "delegation": 1 @@ -47,7 +46,7 @@ # "host": "checkmk.com", # "port": 443, # "protocol": "http", -# "isPublic": false, +# "isPublic": False, # "status": "IN_PROGRESS", # "startTime": 1714563744895, # "engineVersion": "2.3.0", @@ -59,8 +58,8 @@ # "statusMessage": "Ready", # "grade": "A+", # "gradeTrustIgnored": "A+", -# "hasWarnings": false, -# "isExceptional": true, +# "hasWarnings": False, +# "isExceptional": True, # "progress": 100, # "duration": 72254, # "delegation": 1 @@ -296,7 +295,7 @@ def check_status(params: Mapping[str: any], end_points: Sequence[SSLLabsEndpoint for end_point in end_points: name = f'{end_point.server_name}/{end_point.ip_address}' - if end_point.status_message.lower() not in ['ready', 'in progress']: + if end_point.status_message.lower() not in ['ready', 'in progress', 'pending']: yield Result(state=State.WARN, notice=f'Status {name}: {end_point.status_message}') @@ -304,6 +303,7 @@ def check_ssllabs_grade(item: str, params: Mapping[str: any], section: SECTION) try: ssl_host: SSLLabsHost = section[item] except KeyError: + yield Result(state=State.UNKNOWN, summary=f'Item not found in monitoring data. ({str(section)})') return None value_store = get_value_store() diff --git a/source/packages/agent_ssllabs b/source/packages/agent_ssllabs index 408362c27a373faebdf92a38ca2ee4e220745b8e..f61ea8a0f55ffcc89ec29a9106cb31127721479e 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.2-20240504', + 'version': '2.0.3-20240506', 'version.min_required': '2.2.0b1', 'version.packaged': '2.2.0p24', 'version.usable_until': None}