canary-checker icon indicating copy to clipboard operation
canary-checker copied to clipboard

Add labels for the canary on the metrics tags

Open Kaitou786 opened this issue 3 years ago • 4 comments
trafficstars

Kaitou786 avatar Aug 23 '22 07:08 Kaitou786

I missed this feature as well. It would avoid to create custom metrics and instead of this just add labels to the existing prometheus metrics.

miry avatar Oct 10 '24 11:10 miry

Hi @miry

Part of the reason we don't do this currently is the potential for an explosion of labels keys and values - Would a whitelist of label keys that get added to canary_check_info work ?

moshloop avatar Oct 10 '24 13:10 moshloop

@moshloop I might be misunderstanding the title, but I’m aiming to add a limited number of custom tags to all metrics produced by Canarychecker's probes.

For example:

- http:
    ...
    metricsLabels:
      domain: example.com
- http:
    ...
    metricsLabels:
      domain: another.example.com

This would allow filtering probe statuses based on those labels:

canary_check{domain=another.example.com}
canary_check{domain=example.com}

Does this align with the intended functionality, or am I missing something?

I thought to reuse the field labels from https://canarychecker.io/reference/http , but it does not add those labels to the metrics.

miry avatar Oct 10 '24 14:10 miry

@miry - I have created a new issue for that: https://github.com/flanksource/canary-checker/issues/2227

This issue is more around kubernetes labels

metadata:
   labels:
       domain: example.com

moshloop avatar Oct 11 '24 07:10 moshloop