Skip to content

How to make Host's CPU Utilization Metric? #23108

Closed Answered by techministrator
techministrator asked this question in Q&A
Discussion options

You must be logged in to vote

Your example does help me figuring out the right metric to use. Though the metric name is not consistent here and there, I'm not sure why. Your example is node_cpu_seconds_total. In the doc, it's host_cpu_seconds_total (ref). For my test with the Amazon EC2 instance, it's just vector.cpu_seconds_total (I defined custom namespace via remap transform) without host_ or node_ prefix after the namespace.

For my "CPU Utilization" metric that I try to have is more about this (Datadog queries)

100 - (sum:vector.cpu_seconds_total{mode:idle,host:my_vector}.as_count().rollup(avg, 60) / sum:vector.cpu_seconds_total{host:my_vector}.as_count().rollup(avg, 60) * 100)

The resulting time series points ar…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by techministrator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
domain: metrics Anything related to Vector's metrics events
2 participants