Closed shashankram closed 3 months ago
Hello @shashankram
You should keep complexity on the Prometheus side an manage to create kind of UID label in the Prometheus Rule. The annotatons should only use that rule and use the UID as a single workload selector.
ex. in Kubernetes the UID can be a combination of
Hi, Yes, please replace the delimiter to something, that does not interfere with the PromQL Syntax. Greetings, Josef
Thanks Josef,
Could you spin up a Pull Request for this fix and we can review and merge it for a new release?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
As per https://roadie.io/backstage/plugins/prometheus/#graphs, the
prometheus.io/rule
annotation does not allow specifying query strings such asfoo_bar{foo='foo',baz='baz'}
because the comma character is used to delimit multiple rules within a single annotation. It suggests using recording rules for more complex queries, however it may not be feasible to use recording rules for queries that are dynamic in nature, e.g. a query determined at runtime after the Prometheus instance has been deployed.I would like to be able to specify multiple queries such that the query may contain a comma to specify multiple labels, e.g.
prometheus.io/rule: "foo_bar{foo='foo',bar='bar'}; foo_baz{foo='foo',baz='baz'}"
. This should be feasible if there's an additional annotation to provide a custom delimiter for the queries,;
in this case.