Prometheus is a very popular monitoring stack. Unfortunately, it doesn't support strings as values.
Use case:
being able to count the checksums of static and dynamic flags in a pre-defined flagset across many server.
The typical approach in Prometheus (e.g. for build labels) is to export a value 1 with the string inside a label. This allows for easy counting of servers that have that particular value.
The resulting Prometheus metrics would look as follows:
flagz_checksum{set="default",type="dynamic",checksum="9fa85e70"} 1
flagz_checksum{set="default",type="static",checksum="53fd4b02"} 1
These checksums would need to be calculated on-scrape. Prometheus already has support for it with GaugeFunc but it doesn't allow to set labels, and only outputs the value on scrape.
To achieve this, a custom Collector needs to be implemented.
Prometheus is a very popular monitoring stack. Unfortunately, it doesn't support strings as values.
Use case:
being able to count the checksums of
staticanddynamicflags in a pre-defined flagset across many server.The typical approach in Prometheus (e.g. for build labels) is to export a value
1with the string inside a label. This allows for easy counting of servers that have that particular value.The resulting Prometheus metrics would look as follows:
These checksums would need to be calculated on-scrape. Prometheus already has support for it with
GaugeFuncbut it doesn't allow to set labels, and only outputs the value on scrape.To achieve this, a custom Collector needs to be implemented.