Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions guide/sections/part2/global-services.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 5 additions & 1 deletion scripts/generate-gdc-all-channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']:
Expand Down