Skip to content

Commit

Permalink
fixing problematic metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
wejdross committed Dec 19, 2024
1 parent a15a221 commit baadcef
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkg/comp-functions/functions/vshnpostgres/postgresql_deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,12 @@ func createPodMonitor(comp *vshnv1.VSHNPostgreSQL, svc *runtime.ServiceRuntime)
if err != nil {
return fmt.Errorf("cannot unmarshall keepMetrics: %w", err)
}
/*
- action: replace
sourceLabels: [cluster_name]
targetLabel: stackgres_cluster_name
*/

podMonitor := &promv1.PodMonitor{
ObjectMeta: metav1.ObjectMeta{
Expand All @@ -561,6 +567,13 @@ func createPodMonitor(comp *vshnv1.VSHNPostgreSQL, svc *runtime.ServiceRuntime)
},
Regex: "(" + strings.Join(keepMetrics[:], "|") + ")",
},
{
Action: "replace",
SourceLabels: []promv1.LabelName{
"cluster_name",
},
TargetLabel: "stackgres_cluster_name",
},
},
},
},
Expand Down

0 comments on commit baadcef

Please sign in to comment.