This repository has been archived by the owner on Jun 18, 2024. It is now read-only.
How to best visualize percent values with discrete thresholds #191
Unanswered
danieldides
asked this question in
Q&A
Replies: 1 comment
-
Hello! groups:
- name: stackdriver:cpu
rules:
- record: stackdriver:cpu:thresholds
expr: |
(stackdriver_cloudsql_database_cloudsql_googleapis_com_database_cpu_utilization > bool 0.5)
+
(stackdriver_cloudsql_database_cloudsql_googleapis_com_database_cpu_utilization > bool 0.75) And then use
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, thanks for the great plugin.
We're trying to use the plugin to create an at-a-glance visualization of server health (CPU, memory, etc). These metrics are being aggregated in Prometheus as "gauge" values and return a percent-value between 0 and 1. I'm trying to determine the best way using Prometheus or this plugin to manipulate the data in such a way that we can set discrete thresholds within which we can assign specific colors and states.
For example, I would like to be able to assign
Green
to a CPU value from <0.5,Yellow
to a returned value of 0.5 - 0.75, andRed
for anything that returns over 0.75.Right now, I think my solution is suboptimal. I've created two rules in Prometheus:
and then in Grafana, I've created this query:
stackdriver:cpu:high + stackdriver:cpu:critical
and mapped in the plugin 0 to green, 1 to yellow, and 2 to red.If anyone has any recommendations on a more graceful way to handle this, I'd love to hear it!
Beta Was this translation helpful? Give feedback.
All reactions