Skip to content

Commit

Permalink
fix gauge metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
gamoutatsumi committed Apr 16, 2024
1 parent 29c4551 commit 0edc793
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pool-agent/cmd/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func (a *Agent) checkInstances() error {
lxdInstances.Reset()
for _, i := range s {
l := slog.With("instance", i.Name)
lxdInstances.WithLabelValues(i.Name, i.Status, i.Config[configKeyResourceType]).Set(1)
lxdInstances.WithLabelValues(i.Status, i.Config[configKeyResourceType]).Inc()
if _, ok := a.ResourceTypesCounts[i.Config[configKeyResourceType]]; !ok {
toDelete = append(toDelete, i.Config[configKeyResourceType])
}
Expand Down
2 changes: 1 addition & 1 deletion pool-agent/cmd/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ var (
Subsystem: "lxd",
Namespace: "pool_agent",
},
[]string{"instance_name", "status", "flavor"},
[]string{"status", "flavor"},
)
)

0 comments on commit 0edc793

Please sign in to comment.