We have microservices and they require a set of configurations that are broadcasted to hosts by a separate system (say publisher) whenever there is an update in the configuration.
The receiving hosts are publishing the below metrics -
{
"host": "h1",
"configName": "c1",
"configNameVersion": "v1",
}
There could be a delay in pushing these configs to all the hosts and hosts can be in an inconsistent state for some time. We want to capture this inconsistent state as Yes/No in grafana.
This can easily be done using SQL query: (if the distinct count of configVersion across hosts for any configName is greater than 1 then inconsistent state)
select distinct count configNameVersion as "version_count"
from table_name
group by configName
having (distinct count configNameVersion)>1
How can I represent the same in Prometheus and show it in the grafana dashboard?
Assume the publisher system doesn't publish any metrics.
Any alternative idea to solve this (with minimum criticality) or pointer to the appropriate document/example would be really nice. Feel free to comment if I can add more information :)