0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2024-12-30 22:34:01 -05:00

Fixed CPU Usage chart in grafana dashboard (#21568)

ref
https://linear.app/ghost/issue/ENG-1505/start-monitoring-ghosts-constraints-and-our-3-goals-using-prometheus

- Using `irate` for aggregating CPU usage was resulting in some strange
behavior — the CPU Usage chart would zero out after a few mins of
running. Switching to regular `rate` seems to have fixed the issue
completely.
This commit is contained in:
Chris Raible 2024-11-07 10:18:41 -08:00 committed by GitHub
parent 5138ef8ed3
commit 8aba92e444
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -312,19 +312,19 @@
"steppedLine": false,
"targets": [
{
"expr": "irate(ghost_process_cpu_user_seconds_total{job=~\"$job\"}[1m]) * 100",
"expr": "rate(ghost_process_cpu_user_seconds_total{job=~\"$job\"}[1m]) * 100",
"interval": "",
"legendFormat": "User CPU - {{job}}",
"refId": "A"
},
{
"expr": "irate(ghost_process_cpu_system_seconds_total{job=~\"$job\"}[1m]) * 100",
"expr": "rate(ghost_process_cpu_system_seconds_total{job=~\"$job\"}[1m]) * 100",
"interval": "",
"legendFormat": "System CPU - {{job}}",
"refId": "B"
},
{
"expr": "irate(ghost_process_cpu_seconds_total{job=~\"$job\"}[1m]) * 100",
"expr": "rate(ghost_process_cpu_seconds_total{job=~\"$job\"}[1m]) * 100",
"interval": "",
"legendFormat": "Total CPU - {{job}}",
"refId": "C"