Skip to content

Commit

Permalink
Add additional information to plan metrics.
Browse files Browse the repository at this point in the history
Signed-off-by: Bella Khizgiyaev <[email protected]>
  • Loading branch information
bkhizgiy committed Jun 17, 2024
1 parent 9201e1b commit 573167e
Show file tree
Hide file tree
Showing 2 changed files with 351 additions and 82 deletions.
37 changes: 18 additions & 19 deletions pkg/monitoring/metrics/forklift-controller/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import (
const (
Succeeded = "Succeeded"
Failed = "Failed"
Executing = "Executing"
Running = "Running"
Pending = "Pending"
Canceled = "Canceled"
Blocked = "Blocked"
Warm = "Warm"
Cold = "Cold"
Local = "Local"
Expand All @@ -21,40 +26,34 @@ var (
Name: "mtv_workload_migrations",
Help: "VM Migrations sorted by status and provider type",
},
[]string{"status", "provider"},
[]string{
"status",
"provider",
},
)
)

var (
// 'status' - [ succeeded, failed ]
// 'status' - [ succeeded, failed, Executing, Running, Pending, Canceled, Blocked]
// 'provider' - [oVirt, vSphere, Openstack, OVA, openshift]
// 'mode' - [Cold, Warm]
planStatusGauge = promauto.NewGaugeVec(prometheus.GaugeOpts{
Name: "mtv_workload_plans",
Help: "VM migration Plans sorted by status and provider type",
},
[]string{
"status",
"provider",
"mode",
},
)

// 'type' - [ cold, warm ]
planTypeGauge = promauto.NewGaugeVec(prometheus.GaugeOpts{
Name: "mtv_workload_plans_type",
Help: "VM migration Plans type",
// 'mode' - [ Remote, Local ]
planTargetGauge = promauto.NewGaugeVec(prometheus.GaugeOpts{
Name: "mtv_target_provider",
Help: "The target cluster of MTV",
},
[]string{
"type",
},
)

// 'destination' - [remote, local]
planDestinationGauge = promauto.NewGaugeVec(prometheus.GaugeOpts{
Name: "mtv_operator_destination",
Help: "MTV operator destination",
},
[]string{
"destination",
"target",
"provider",
},
)
)
Loading

0 comments on commit 573167e

Please sign in to comment.