Skip to content

fix pool agent metric value #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gamoutatsumi
Copy link
Contributor

Change a pool-gent metric values to enumerated container status for tracing container status in time series.

Summary (Generated)

This pull request to pool-agent includes changes to improve the collection and representation of LXD instance metrics. The most important changes include modifying the way instance statuses are handled and displayed, and updating the associated Prometheus metrics.

Improvements to metrics collection:

  • pool-agent/cmd/agent.go: Changed lxdInstances.WithLabelValues to set the status as a float value using containerStateFromString instead of incrementing a counter.

Enhancements to metrics representation:

  • pool-agent/cmd/metrics.go: Added a containerState type and constants to represent different container states numerically. Implemented String and containerStateFromString methods to convert between string and numeric representations of container states.
  • pool-agent/cmd/metrics.go: Updated the lxdInstances help description to include the enumeration of container states. Removed the status label from the lxdInstances metric.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant