From 3aad5e8758048cae3fe239d4b7f8872e9c6869b6 Mon Sep 17 00:00:00 2001 From: Eneli Reimets Date: Fri, 6 Dec 2024 11:21:41 +0200 Subject: [PATCH] docs: Add endpoint level statistics gathering support (#2465) * docs: Add endpoint level statistics gathering support Refs: XRDDEV-2786 * docs: minor fixes Refs: XRDDEV-2786 * docs: minor fix Refs: XRDDEV-2786 --- ...monitoring_daemon_architecture_Y-1096-1.md | 39 +++++++++++++++++-- ...perational_monitoring_protocol_Y-1096-2.md | 15 ++++++- ...rational_data_response_payload_schema.yaml | 20 +++++++--- 3 files changed, 63 insertions(+), 11 deletions(-) diff --git a/doc/OperationalMonitoring/Architecture/arc-opmond_x-road_operational_monitoring_daemon_architecture_Y-1096-1.md b/doc/OperationalMonitoring/Architecture/arc-opmond_x-road_operational_monitoring_daemon_architecture_Y-1096-1.md index 6916b11b07..c4d62946fb 100644 --- a/doc/OperationalMonitoring/Architecture/arc-opmond_x-road_operational_monitoring_daemon_architecture_Y-1096-1.md +++ b/doc/OperationalMonitoring/Architecture/arc-opmond_x-road_operational_monitoring_daemon_architecture_Y-1096-1.md @@ -1,6 +1,6 @@ # X-Road: Operational Monitoring Daemon Architecture -Version: 1.3 +Version: 1.4 Document ID: ARC-OPMOND | Date | Version | Description | Author | @@ -14,6 +14,7 @@ Document ID: ARC-OPMOND | 25.06.2020 | 1.1 | Update section 3.3 with the instructions how to enable JMX | Petteri Kivimäki | | 01.06.2023 | 1.2 | Update references | Petteri Kivimäki | | 02.10.2024 | 1.3 | Update schema file locations | Justas Samuolis | +| 05.12.2024 | 1.4 | Add endpoint level statistics gathering support | Eneli Reimets | ## Table of Contents @@ -49,7 +50,7 @@ This document is licensed under the Creative Commons Attribution-ShareAlike 3.0 ## 1 Introduction -The X-Road monitoring solution is conceptually split into two parts: environmental and operational monitoring. The operational monitoring processes operational statistics (such as which services have been called, how many times, what was the size of the response, etc.) of the security servers. +The X-Road monitoring solution is conceptually split into two parts: environmental and operational monitoring. The operational monitoring processes operational statistics (such as which services or endpoints have been called, how many times, what was the size of the response, etc.) of the security servers. This document describes the architecture of the X-Road operational monitoring daemon. It presents an overview of the components of the monitoring daemon and its interfaces. @@ -169,7 +170,7 @@ The schema is located in the file *src/op-monitor-daemon/core/src/main/resources ### A.2 Example Store Operational Monitoring Data Request -The first record of the store request reflects successfully mediated request, the second one unsuccessfully mediated request. +The first record of the store request reflects successfully mediated SOAP request, the second one successfully mediated REST request and the third one unsuccessfully mediated request. ```json { @@ -206,6 +207,38 @@ The first record of the store request reflects successfully mediated request, th "xRequestId": "d4490e7f-305e-44c3-b869-beaaeda694e7", "serviceType": "WSDL" }, + { + "monitoringDataTs": 1733404603, + "securityServerInternalIp": "fd42:2642:2cb3:31ac:216:3eff:fedf:85c%eth0", + "securityServerType": "Client", + "requestInTs": 1733404602876, + "requestOutTs": 1733404602884, + "responseInTs": 1733404602970, + "responseOutTs": 1733404603005, + "clientXRoadInstance": "FI", + "clientMemberClass": "COM", + "clientMemberCode": "111", + "clientSubsystemCode": "CLIENT", + "serviceXRoadInstance": "FI", + "serviceMemberClass": "COM", + "serviceMemberCode": "111", + "serviceSubsystemCode": "SERVICE", + "serviceCode": "pets", + "restMethod": "GET", + "restPath": "/cat", + "messageId": "1234", + "messageProtocolVersion": "1", + "clientSecurityServerAddress": "ss1", + "serviceSecurityServerAddress": "ss1", + "requestSize": 214, + "responseSize": 462, + "requestAttachmentCount": 0, + "responseAttachmentCount": 0, + "succeeded": true, + "statusCode": 200, + "xRequestId": "1244d018-9300-4f1b-8c2b-9b7f2bc4e933", + "serviceType": "REST" + }, { "monitoringDataTs": 1576134508, "securityServerInternalIp": "fd42:2642:2cb3:31ac:216:3eff:fedf:85c%eth0", diff --git a/doc/OperationalMonitoring/Protocols/pr-opmon_x-road_operational_monitoring_protocol_Y-1096-2.md b/doc/OperationalMonitoring/Protocols/pr-opmon_x-road_operational_monitoring_protocol_Y-1096-2.md index ac200085ce..fc65544354 100644 --- a/doc/OperationalMonitoring/Protocols/pr-opmon_x-road_operational_monitoring_protocol_Y-1096-2.md +++ b/doc/OperationalMonitoring/Protocols/pr-opmon_x-road_operational_monitoring_protocol_Y-1096-2.md @@ -2,7 +2,7 @@ **Technical Specification** -Version: 1.3 +Version: 1.4 Doc. ID: PR-OPMON | Date | Version | Description | Author | @@ -17,6 +17,7 @@ Doc. ID: PR-OPMON | 10.05.2023 | 1.1 | Security Categories removed. | Justas Samuolis | | 01.06.2023 | 1.2 | Update references | Petteri Kivimäki | | 02.10.2024 | 1.3 | Update schema file locations | Justas Samuolis | +| 05.12.2024 | 1.4 | Add endpoint level statistics gathering support | Eneli Reimets | ## Table of Contents @@ -45,7 +46,7 @@ This document is licensed under the Creative Commons Attribution-ShareAlike 3.0 # 1 Introduction -This specification describes services that can be used by X-Road participants to gather operational monitoring information of the security servers. The operational monitoring information contains data about request exchange (such as which services have been called, how many times, what was the size of the response, etc.) of the security servers. The X-Road operational monitoring protocol is intended to support external monitoring systems and other software that can monitor service level agreements, make service statistics, etc. +This specification describes services that can be used by X-Road participants to gather operational monitoring information of the security servers. The operational monitoring information contains data about request exchange (such as which services or endpoints have been called, how many times, what was the size of the response, etc.) of the security servers. The X-Road operational monitoring protocol is intended to support external monitoring systems and other software that can monitor service level agreements, make service statistics, etc. The operational monitoring services are the following: * *getSecurityServerOperationalData* - downloading operational data of the specified time period of the security server. @@ -105,6 +106,8 @@ The body of the request MUST contain an XML element *getSecurityServerOperationa * *serviceMemberCode* * *serviceSubsystemCode* * *serviceCode* + * *restMethod* + * *restPath* * *serviceVersion* * *representedPartyClass* * *representedPartyCode* @@ -1028,6 +1031,14 @@ properties: description: Code of the service type: string maxLength: 255 + restMethod: + description: Method of the rest + type: string + maxLength: 255 + restPath: + description: Path of the rest + type: string + maxLength: 255 serviceVersion: description: Version of the service type: string diff --git a/src/op-monitor-daemon/core/src/main/resources/query_operational_data_response_payload_schema.yaml b/src/op-monitor-daemon/core/src/main/resources/query_operational_data_response_payload_schema.yaml index 18b47c3baa..be6b67ec2e 100644 --- a/src/op-monitor-daemon/core/src/main/resources/query_operational_data_response_payload_schema.yaml +++ b/src/op-monitor-daemon/core/src/main/resources/query_operational_data_response_payload_schema.yaml @@ -20,8 +20,8 @@ properties: description: Type of the security server type: string enum: - - Client - - Producer + - Client + - Producer requestInTs: description: 'In the client''s security server: the Unix timestamp in milliseconds when the request was received by the client''s security server. In the service provider''s security server: the Unix timestamp in milliseconds when the request was received by the service provider''s security server. In both cases, the timestamp is taken just before received payload byte array is decoded and processed' type: integer @@ -74,6 +74,14 @@ properties: description: Code of the service type: string maxLength: 255 + restMethod: + description: Method of the rest + type: string + maxLength: 255 + restPath: + description: Path of the rest + type: string + maxLength: 255 serviceVersion: description: Version of the service type: string @@ -150,8 +158,8 @@ properties: type: integer minimum: 0 serviceType: - description: Type of the service WSDL, REST or OPENAPI3 - type: string - minimum: 0 + description: Type of the service WSDL, REST or OPENAPI3 + type: string + minimum: 0 required: -- records + - records