Skip to content
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

Split out guest cpu metrics on Linux. #744

Merged
merged 1 commit into from
Nov 23, 2017
Merged

Split out guest cpu metrics on Linux. #744

merged 1 commit into from
Nov 23, 2017

Conversation

SuperQ
Copy link
Member

@SuperQ SuperQ commented Nov 23, 2017

Linux "guest" metrics for VMs are already accounted for in node_cpu
user and nice metrics. Separate these into their own metric to
avoid duplication of data.

Closes: #737

@discordianfish
Copy link
Member

Oh! Good catch. LGTM

Copy link
Contributor

@brian-brazil brian-brazil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -57,6 +58,11 @@ func NewCPUCollector() (Collector, error) {
"Seconds the cpus spent in each mode.",
[]string{"cpu", "mode"}, nil,
),
cpuGuest: prometheus.NewDesc(
prometheus.BuildFQName(namespace, cpuCollectorSubsystem, "guest_seconds_total"),
"Seconds the cpus spent for guests (VMs) in each mode.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above metric uses "in" rather than "for"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about: Seconds the cpus spent in guests (VMs) for each mode.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

@rtreffer
Copy link
Contributor

Oh nice! 👍

Linux "guest" metrics for VMs are already accounted for in node_cpu
`user` and `nice` metrics.  Separate these into their own metric to
avoid duplication of data.
@SuperQ SuperQ merged commit 2a80537 into master Nov 23, 2017
@SuperQ SuperQ deleted the superq/guest_cpu branch November 23, 2017 14:04
oblitorum pushed a commit to shatteredsilicon/node_exporter that referenced this pull request Apr 9, 2024
Linux "guest" metrics for VMs are already accounted for in node_cpu
`user` and `nice` metrics.  Separate these into their own metric to
avoid duplication of data.
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.

4 participants