Skip to content

Commit

Permalink
chore(RHTAPWATCH-741): Add recording rules for exporter
Browse files Browse the repository at this point in the history
Add recording rules to translate the components existing
metrics to expose availability.

Signed-off-by: Homaja Marisetty <[email protected]>
  • Loading branch information
hmariset committed Feb 15, 2024
1 parent 503921a commit 9c20dbc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion exporters/dsexporter/dsexporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type CustomCollector struct {
func NewCustomCollector() *CustomCollector {
return &CustomCollector{
konfluxUp: prometheus.NewGaugeVec(prometheus.GaugeOpts{
Name: "konflux_up",
Name: "grafana_ds_up",
Help: "Availability of the Konflux default grafana datasource",
},
[]string{"service", "check"}),
Expand Down
5 changes: 5 additions & 0 deletions rhobs/recording/exporter_recording_rules.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
groups:
- name: exporter
rules:
- record: konflux_up
expr: label_replace(grafana_ds_up, "service", "grafana_copy", "__name__", "(.+)")

0 comments on commit 9c20dbc

Please sign in to comment.