summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Kochie <superq@gmail.com>2018-09-12 10:23:25 +0200
committerBen Kochie <superq@gmail.com>2018-09-12 10:23:25 +0200
commite91c7469ad0be5f429548d4142ca93c17ec9e71e (patch)
treecfb1154a29f72ba3a361c07e289f20fd47a13886
parenta3c3776b5c7fd5c3c6c7bc9ee846b4d105333b32 (diff)
downloadgitlab-ce-e91c7469ad0be5f429548d4142ca93c17ec9e71e.tar.gz
Update example Prometheus queries
* Update metric names to match current release. * Improve descriptions. * Improve examples to show more query language functionality. Memory: * Show use of `or` function. * Automatically select "MemAvailable" kernel metric if possible. CPU: * Show use of `avg without ...`. * Show CPU utilization per node. Network: * Show use of `!=` label matching. * Don't show "localhost" metrics.
-rw-r--r--doc/administration/monitoring/prometheus/index.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/administration/monitoring/prometheus/index.md b/doc/administration/monitoring/prometheus/index.md
index 9d525645952..b1b670c3b42 100644
--- a/doc/administration/monitoring/prometheus/index.md
+++ b/doc/administration/monitoring/prometheus/index.md
@@ -97,10 +97,10 @@ For a more fully featured dashboard, Grafana can be used and has
Sample Prometheus queries:
-- **% Memory used:** `(1 - ((node_memory_MemFree + node_memory_Cached) / node_memory_MemTotal)) * 100`
-- **% CPU load:** `1 - rate(node_cpu{mode="idle"}[5m])`
-- **Data transmitted:** `irate(node_network_transmit_bytes[5m])`
-- **Data received:** `irate(node_network_receive_bytes[5m])`
+- **% Memory available:** `((node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) or ((node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes) / node_memory_MemTotal_bytes)) * 100`
+- **% CPU utilization:** `1 - avg without (mode,cpu) (rate(node_cpu_seconds_total{mode="idle"}[5m]))`
+- **Data transmitted:** `rate(node_network_transmit_bytes_total{device!="lo"}[5m])`
+- **Data received:** `rate(node_network_receive_bytes_total{device!="lo"}[5m])`
## Configuring Prometheus to monitor Kubernetes