Closed golfvert closed 1 year ago
+1 for using the same values for the "centre-id" in topic hierarchy and metrics
Shall we also include the 3-letter country name in front of the centre-id? So with the same example above:
wmo_wis2_gc_messagesreceived{centre-id=deu_globalcachedwd}
The centre-id might not be globally unique (especially for wis2 Nodes. It could mess up the metrics without the country...
I would suggest to have both. centre-id being the same as the one in the topics. And country being the 3-letter country code.
In case of data that could then become centre-id: The center that is reporting and country: The 3-letter code of the country from which the data (observations etc. ) are.
Spontaneously I don't like the mix to use the ISO country code as prefix, because then the values for centre-id are different to the topic values for centre-id. Should we adjust the hierarchy, e.g. "wmo_wis2_gc_centre-id_metric-name of group gc-metric-names" (for all Global Services as centre-id should be unique for them) and "wmo_wis2_node_iso-country-code node_centre-id node_metric-name of group node-metric-names" both using labels for originator information e.g. "The 3-letter code of the country from which the data (observations etc. ) are." if useful for specific metric. This would give us the metric publisher information in the metric name and the source information in the labels of the metric. But this is only first idea thought out loud...
Alternative... Two labels.
wmo_wis2_gc_messagesreceived{country=deu, centre-id=globalcachedwd}
So, in the name of the metric we have either gc gb, gdc, wis2node,... and in the labels country and centre-id.
Proposal sounds good for Global Services, how to handle not unique centre-ids for nodes? Should we require that no duplication is allowed in the center-id list? then the problem would be solved...
That is the other option... centre-id might be globally unique.
I would not like to have centre-id and country code in the metric name. That is the model case for labels.
As for centre-id i would use the same names as in the topic. So no globalcachedwd but dwd-offenbach
The centre-id discussion is here https://github.com/wmo-im/wis2-topic-hierarchy/issues/5
So, for the time being let's aim at having the centre-id globally unique. Reusing the same example and based on Kai's comment that would give:
wmo_wis2_gc_messagesreceived{centre-id=dwd-offenbach}
wmo_wis2_gb_activenodes{centre-id=meteo-france-toulouse}
With messagesreceived
and activenodes
two metrics to be discussed by the GC and the GB operators.
We should include for the metric wmo_wis2_gc_messagesreceived the additional label "country" as source/originator information as proposed from you, e.g. wmo_wis2_gc_messagesreceived{country=deu, centre-id=dwd-offenbach}
This would then allow a direct comparison between different GCs per country (same country-label value, different centre-id)
Just discovered, that centre-id is an invalid label name. How about centre_id
Well spotted :) "Label names may contain ASCII letters, numbers, as well as underscores. They must match the regex [a-zA-Z][a-zA-Z0-9]*. Label names beginning with __ are reserved for internal use."
So, centre_id...
We need to specify the meaning of centre_id and country in the metrics.
Currently my point of view was to have centre_id and country being the centre that provides the metric. So in our case dwd-offenbach and deu.
However how to we express the number of messages received from Sweden in Offenbach?
So Option 1: centre_id: Name of the centre for which the metric applies (not the one reporting the metric) country: Name of the country for which the metric applies (not the one reporting the metric) reporting: Name of the centre reporting the metric Example: centre_id: ESWI, country: swe, reporting dwd-offenbach
Option 2: centre_id: Name of the centre providing the metric country: Name of the country for centre_id Example: centre_id dwd-offenbach, country: deu (for all metrics provided by dwd-offenbach)
I'd go for option 1. We also have to remember that in prometheus we have endpoints. So, a Global Monitoring center fetching metrics from endpoints DWD GC or France GB or... will know where the metric is coming from. An extra label called job will be created by Prometheus. I think we do not require the "reporting" label.
Here are the metrics (tentatively) implemented on Météo-France Global Broker since April 9th :
The following labels have been defined:
for the country and centre_id corresponding to the WIS2 Node (See option 1 above)
job is automatically added by prometheus. It represents the "source" of the metric.
For filtering purposes, metric names and the labels (country, centre_id, report_by) should be sufficient.
At the moment on the main page of the repository the example says:
Example wmo_wis2_gc_messagesreceived{center=deu}
Two points:
So the example would read:
Example wmo_wis2_gc_messagesreceived{centre-id=globalcachedwd}
globalcachedwd being a tentative name for the time being...