From 92b058419616e4af69bc758084dec9d959db0d55 Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Sun, 13 Jul 2025 06:36:13 -0400 Subject: [PATCH 1/2] add HTTP header to GDC requests (#138) (#197) --- scripts/generate-gdc-all-channels.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/generate-gdc-all-channels.py b/scripts/generate-gdc-all-channels.py index cdb40f6..ab079d3 100644 --- a/scripts/generate-gdc-all-channels.py +++ b/scripts/generate-gdc-all-channels.py @@ -43,9 +43,13 @@ 'limit': 100000 } +REQUEST_HEADERS = { + 'X-Client-Id': 'wis2-guide GitHub Action (https://github.com/wmo-im/wis2-guide/blob/main/.github/workflows/gdc-all-channels.yml)' # noqa +} + for gdc in GDCS: url = f'{gdc}/items' - response = requests.get(url, params=PARAMS).json() + response = requests.get(url, headers=REQUEST_HEADERS, params=PARAMS).json() for feature in response['features']: for link in feature['links']: From 9ab283505a97e8941f390df566ba283004da481b Mon Sep 17 00:00:00 2001 From: Remy Giraud Date: Sun, 13 Jul 2025 14:23:28 +0200 Subject: [PATCH 2/2] Update global-services.adoc Add implementation details of wmo_wis2_gb_connected_flag. --- guide/sections/part2/global-services.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/guide/sections/part2/global-services.adoc b/guide/sections/part2/global-services.adoc index 3dcaa00..de89309 100644 --- a/guide/sections/part2/global-services.adoc +++ b/guide/sections/part2/global-services.adoc @@ -83,6 +83,7 @@ In the following sections, and for each Global Service, a set of metrics is defi ** An off the shelf broker implementing both MQTT 3.1.1 and MQTT 5.0 in a highly available setup, typically in a cluster mode. Tools such as EMQX, HiveMQ, VerneMQ, RabbitMQ (in its latest versions) are compliant with these requirements. The open source version of Mosquitto cannot be clustered and therefore should not be used as part of a Global Broker. ** Additional features, including anti-loop detection, notification message format compliance, validation of the published topic, and metrics provision. +* When connected to a local WIS centre broker or a Global Service broker, the metric ``wmo_wis2_gb_connected_flag`` will be equal to 1. When the connection cannot be established or is later on interrupted the metric ``wmo_wis2_gb_connected_flag`` will be equal to 0. * When receiving a message from a local WIS centre broker or a Global Service broker, the metric ``wmo_wis2_gb_messages_received_total`` will be increased by 1. * A Global Broker will check if a discovery metadata record exists corresponding to the topic on which a message has been published. If there is no corresponding discovery metadata record, the Global Broker will discard non-compliant messages and will raise an alert. The metric ``wmo_wis2_gb_messages_no_metadata_total`` will be increased by 1. The Global Broker should not request information from a Global Discovery Catalogue for each notification message but should keep a cache of all valid topics for every ``centre-id``. * A Global Broker will check that the topic on which the message is received is valid. If the topic is invalid, the Global Broker will discard non-compliant messages and will raise an alert. The metric ``wmo_wis2_gb_invalid_topic_total`` will be increased by 1.