Use irate instead of rate in node exporter graphs

Graphs using `irate` show spikes better than `rate`. This changeset should specifically be helpful in detecting sudden CPU and network usage spikes.
This commit is contained in:
Mehran Kholdi 2019-04-07 12:16:07 +04:30
parent 59adbc888b
commit e523d086ea
3 changed files with 21 additions and 21 deletions

View file

@ -2555,7 +2555,7 @@
"steppedLine": false,
"targets": [
{
"expr": "rate(node_exec_forks_total{instance=~\"$node:$port\"}[5m])",
"expr": "irate(node_exec_forks_total{instance=~\"$node:$port\"}[5m])",
"format": "time_series",
"hide": false,
"intervalFactor": 2,

View file

@ -1100,7 +1100,7 @@
"steppedLine": false,
"targets": [
{
"expr": "sum by (instance)(rate(node_cpu{mode=\"system\",instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"expr": "sum by (instance)(irate(node_cpu{mode=\"system\",instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"format": "time_series",
"hide": false,
"intervalFactor": 2,
@ -1109,7 +1109,7 @@
"step": 240
},
{
"expr": "sum by (instance)(rate(node_cpu{mode='user',instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"expr": "sum by (instance)(irate(node_cpu{mode='user',instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"format": "time_series",
"hide": false,
"intervalFactor": 2,
@ -1118,7 +1118,7 @@
"step": 240
},
{
"expr": "sum by (instance)(rate(node_cpu{mode='iowait',instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"expr": "sum by (instance)(irate(node_cpu{mode='iowait',instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "Busy Iowait",
@ -1126,7 +1126,7 @@
"step": 240
},
{
"expr": "sum by (instance)(rate(node_cpu{mode=~\".*irq\",instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"expr": "sum by (instance)(irate(node_cpu{mode=~\".*irq\",instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "Busy IRQs",
@ -1134,7 +1134,7 @@
"step": 240
},
{
"expr": "sum (rate(node_cpu{mode!='idle',mode!='user',mode!='system',mode!='iowait',mode!='irq',mode!='softirq',instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"expr": "sum (irate(node_cpu{mode!='idle',mode!='user',mode!='system',mode!='iowait',mode!='irq',mode!='softirq',instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "Busy Other",
@ -1142,7 +1142,7 @@
"step": 240
},
{
"expr": "sum by (mode)(rate(node_cpu{mode='idle',instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"expr": "sum by (mode)(irate(node_cpu{mode='idle',instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "Idle",
@ -1452,7 +1452,7 @@
"steppedLine": false,
"targets": [
{
"expr": "rate(node_network_receive_bytes{instance=~\"$node:$port\",job=~\"$job\"}[5m])",
"expr": "irate(node_network_receive_bytes{instance=~\"$node:$port\",job=~\"$job\"}[5m])",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "recv {{device}}",
@ -1460,7 +1460,7 @@
"step": 240
},
{
"expr": "rate(node_network_transmit_bytes{instance=~\"$node:$port\",job=~\"$job\"}[5m])",
"expr": "irate(node_network_transmit_bytes{instance=~\"$node:$port\",job=~\"$job\"}[5m])",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "trans {{device}} ",
@ -9620,7 +9620,7 @@
"steppedLine": false,
"targets": [
{
"expr": "rate(node_forks{instance=~\"$node:$port\",job=~\"$job\"}[5m])",
"expr": "irate(node_forks{instance=~\"$node:$port\",job=~\"$job\"}[5m])",
"format": "time_series",
"hide": false,
"intervalFactor": 2,
@ -19723,4 +19723,4 @@
"timezone": "browser",
"title": "Node Exporter Full Old",
"version": 6
}
}

View file

@ -1100,7 +1100,7 @@
"steppedLine": false,
"targets": [
{
"expr": "sum by (instance)(rate(node_cpu_seconds_total{mode=\"system\",instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"expr": "sum by (instance)(irate(node_cpu_seconds_total{mode=\"system\",instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"format": "time_series",
"hide": false,
"intervalFactor": 2,
@ -1109,7 +1109,7 @@
"step": 240
},
{
"expr": "sum by (instance)(rate(node_cpu_seconds_total{mode='user',instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"expr": "sum by (instance)(irate(node_cpu_seconds_total{mode='user',instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"format": "time_series",
"hide": false,
"intervalFactor": 2,
@ -1118,7 +1118,7 @@
"step": 240
},
{
"expr": "sum by (instance)(rate(node_cpu_seconds_total{mode='iowait',instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"expr": "sum by (instance)(irate(node_cpu_seconds_total{mode='iowait',instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "Busy Iowait",
@ -1126,7 +1126,7 @@
"step": 240
},
{
"expr": "sum by (instance)(rate(node_cpu_seconds_total{mode=~\".*irq\",instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"expr": "sum by (instance)(irate(node_cpu_seconds_total{mode=~\".*irq\",instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "Busy IRQs",
@ -1134,7 +1134,7 @@
"step": 240
},
{
"expr": "sum (rate(node_cpu_seconds_total{mode!='idle',mode!='user',mode!='system',mode!='iowait',mode!='irq',mode!='softirq',instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"expr": "sum (irate(node_cpu_seconds_total{mode!='idle',mode!='user',mode!='system',mode!='iowait',mode!='irq',mode!='softirq',instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "Busy Other",
@ -1142,7 +1142,7 @@
"step": 240
},
{
"expr": "sum by (mode)(rate(node_cpu_seconds_total{mode='idle',instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"expr": "sum by (mode)(irate(node_cpu_seconds_total{mode='idle',instance=~\"$node:$port\",job=~\"$job\"}[5m])) * 100",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "Idle",
@ -1452,7 +1452,7 @@
"steppedLine": false,
"targets": [
{
"expr": "rate(node_network_receive_bytes_total{instance=~\"$node:$port\",job=~\"$job\"}[5m])",
"expr": "irate(node_network_receive_bytes_total{instance=~\"$node:$port\",job=~\"$job\"}[5m])",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "recv {{device}}",
@ -1460,7 +1460,7 @@
"step": 240
},
{
"expr": "rate(node_network_transmit_bytes_total{instance=~\"$node:$port\",job=~\"$job\"}[5m])",
"expr": "irate(node_network_transmit_bytes_total{instance=~\"$node:$port\",job=~\"$job\"}[5m])",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "trans {{device}} ",
@ -9709,7 +9709,7 @@
"steppedLine": false,
"targets": [
{
"expr": "rate(node_forks_total{instance=~\"$node:$port\",job=~\"$job\"}[5m])",
"expr": "irate(node_forks_total{instance=~\"$node:$port\",job=~\"$job\"}[5m])",
"format": "time_series",
"hide": false,
"intervalFactor": 2,
@ -20010,4 +20010,4 @@
"timezone": "browser",
"title": "Node Exporter Full",
"version": 62
}
}