Skip to content

Commit

Permalink
chore(module): add d8_* prefix and fix lost namespce label
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Tishkov <[email protected]>
  • Loading branch information
fl64 committed Aug 19, 2024
1 parent 4694b5e commit 71ddbb5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
)

const (
MetricVirtualMachineStatusPhase = "virtualmachine_status_phase"
MetricVirtualMachineStatusPhase = "d8_virtualization_virtualmachine_status_phase"
)

var virtualMachineMetrics = map[string]*prometheus.Desc{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
)

const (
MetricVMBDAStatusPhase = "virtualmachineblockdeviceattachment_status_phase"
MetricVMBDAStatusPhase = "d8_virtualization_virtualmachineblockdeviceattachment_status_phase"
)

var vmbdaMetrics = map[string]*prometheus.Desc{
Expand Down
13 changes: 1 addition & 12 deletions templates/virtualization-controller/scrape-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,5 @@ spec:
- targets: ['virtualization-controller-metrics.d8-{{ .Chart.Name }}.svc.{{ .Values.global.discovery.clusterDomain }}.:8080']
relabelings:
- action: labeldrop
regex: (container|endpoint|job|service|pod|exported_namespace|uid)
metricRelabelings:
- sourceLabels: [__name__]
regex: "(.*)"
separator: ;
action: replace
targetLabel: __name__
replacement: d8_$1
- action: replace
sourceLabels:
- exported_namespace
targetLabel: namespace
regex: (job)
metricsPath: '/metrics'

0 comments on commit 71ddbb5

Please sign in to comment.