Grafana - Fix CPU calculation

This commit is contained in:
Mike Reeves
2018-11-30 14:33:59 -05:00
parent 0b5cb77086
commit e84dd52586
6 changed files with 528 additions and 7616 deletions

View File

@@ -12,12 +12,12 @@
}
]
},
"description": "This Dashboard provides a general overview of Sensors",
"description": "This Dashboard provides a general overview of Evaluation Mode",
"editable": true,
"gnetId": 2381,
"graphTooltip": 0,
"id": 9,
"iteration": 1543542047346,
"id": 3,
"iteration": 1543605737154,
"links": [],
"panels": [
{
@@ -1687,7 +1687,7 @@
"datasource": "InfluxDB",
"editable": true,
"error": false,
"format": "bits",
"format": "percent",
"gauge": {
"maxValue": 100,
"minValue": 0,
@@ -1753,7 +1753,8 @@
"type": "fill"
}
],
"measurement": "mem",
"measurement": "docker_container_cpu",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
@@ -1761,13 +1762,19 @@
[
{
"params": [
"active"
"usage_percent"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
" / {{ CPUS }}"
],
"type": "math"
}
]
],
@@ -1776,12 +1783,18 @@
"key": "host",
"operator": "=",
"value": "{{ SERVERNAME }}"
},
{
"condition": "AND",
"key": "container_name",
"operator": "=",
"value": "so-logstash"
}
]
}
],
"thresholds": "",
"title": "{{ SERVERNAME }} - Memory(Used)",
"title": "{{ SERVERNAME }} - Logstash CPU Usage",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
@@ -2432,6 +2445,494 @@
"alignLevel": null
}
},
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"datasource": "InfluxDB",
"editable": true,
"error": false,
"format": "percent",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 5,
"w": 4,
"x": 8,
"y": 15
},
"id": 35,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": true
},
"tableColumn": "",
"targets": [
{
"dsType": "influxdb",
"groupBy": [
{
"params": [
"$Interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "docker_container_cpu",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"usage_percent"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
" / {{ CPUS }}"
],
"type": "math"
}
]
],
"tags": [
{
"key": "host",
"operator": "=",
"value": "{{ SERVERNAME }}"
},
{
"condition": "AND",
"key": "container_name",
"operator": "=",
"value": "so-elasticsearch"
}
]
}
],
"thresholds": "",
"title": "{{ SERVERNAME }} - ES CPU Usage",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "current"
},
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"rgba(50, 172, 45, 0.97)",
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"datasource": "InfluxDB",
"editable": true,
"error": false,
"format": "none",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 5,
"w": 4,
"x": 12,
"y": 15
},
"id": 33,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": true,
"lineColor": "rgb(31, 120, 193)",
"show": true
},
"tableColumn": "",
"targets": [
{
"dsType": "influxdb",
"groupBy": [
{
"params": [
"$Interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "elasticsearch_indices",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"docs_count"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "host",
"operator": "=",
"value": "{{ SERVERNAME }}"
}
]
}
],
"thresholds": "",
"title": "{{ SERVERNAME }} - ES Documents",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "current"
},
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"rgba(50, 172, 45, 0.97)",
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"datasource": "InfluxDB",
"editable": true,
"error": false,
"format": "bytes",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 5,
"w": 4,
"x": 16,
"y": 15
},
"id": 34,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": true,
"lineColor": "rgb(31, 120, 193)",
"show": true
},
"tableColumn": "",
"targets": [
{
"dsType": "influxdb",
"groupBy": [
{
"params": [
"$Interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "elasticsearch_indices",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"store_size_in_bytes"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "host",
"operator": "=",
"value": "{{ SERVERNAME }}"
}
]
}
],
"thresholds": "",
"title": "{{ SERVERNAME }} - ES Store Size",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "current"
},
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"rgba(50, 172, 45, 0.97)",
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"datasource": "InfluxDB",
"editable": true,
"error": false,
"format": "none",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 5,
"w": 4,
"x": 20,
"y": 15
},
"id": 32,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": true,
"lineColor": "rgb(31, 120, 193)",
"show": true
},
"tableColumn": "",
"targets": [
{
"dsType": "influxdb",
"groupBy": [
{
"params": [
"$Interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "redisqueue",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"unparsed"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "host",
"operator": "=",
"value": "{{ SERVERNAME }}"
}
]
}
],
"thresholds": "",
"title": "{{ SERVERNAME }} - REDIS Queue Unparsed",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "current"
},
{
"aliasColors": {
"InBound": "#629E51",
@@ -2450,7 +2951,7 @@
"h": 7,
"w": 8,
"x": 8,
"y": 15
"y": 20
},
"id": 18,
"legend": {
@@ -2536,7 +3037,7 @@
"condition": "AND",
"key": "interface",
"operator": "=",
"value": "{{ MONINT }}"
"value": "{{ MANINT }}"
}
]
},
@@ -2600,7 +3101,7 @@
"condition": "AND",
"key": "interface",
"operator": "=",
"value": "{{ MONINT }}"
"value": "{{ MANINT }}"
}
]
}
@@ -2661,7 +3162,7 @@
"h": 6,
"w": 8,
"x": 16,
"y": 15
"y": 20
},
"id": 13,
"legend": {
@@ -3058,7 +3559,7 @@
"h": 8,
"w": 8,
"x": 16,
"y": 21
"y": 26
},
"id": 14,
"legend": {
@@ -3275,7 +3776,7 @@
"h": 7,
"w": 8,
"x": 8,
"y": 22
"y": 27
},
"id": 10,
"legend": {
@@ -3361,7 +3862,7 @@
"condition": "AND",
"key": "interface",
"operator": "=",
"value": "{{ MANINT }}"
"value": " {{ MANINT }}"
}
]
},
@@ -3597,221 +4098,6 @@
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {
"InBound": "#629E51",
"OutBound": "#5195CE",
"net.derivative": "#1F78C1"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "InfluxDB",
"editable": true,
"error": false,
"fill": 1,
"grid": {},
"gridPos": {
"h": 7,
"w": 8,
"x": 8,
"y": 29
},
"id": 29,
"legend": {
"alignAsTable": true,
"avg": true,
"current": true,
"max": true,
"min": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "InBound",
"dsType": "influxdb",
"groupBy": [
{
"params": [
"$Interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "docker_container_net",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT 8 * derivative(mean(\"bytes_recv\"),1s) FROM \"net\" WHERE \"host\" = 'JumpHost' AND \"interface\" = 'eth0' AND $timeFilter GROUP BY time($interval) fill(null)",
"rawQuery": false,
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"rx_bytes"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"1s"
],
"type": "derivative"
},
{
"params": [
"*8"
],
"type": "math"
}
]
],
"tags": [
{
"key": "host",
"operator": "=",
"value": "{{ SERVERNAME }}"
},
{
"condition": "AND",
"key": "container_name",
"operator": "=",
"value": "so-filebeat"
}
]
},
{
"alias": "OutBound",
"dsType": "influxdb",
"groupBy": [
{
"params": [
"$Interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "docker_container_net",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT 8 * derivative(mean(\"bytes_sent\"),1s) FROM \"net\" WHERE \"host\" = 'JumpHost' AND \"interface\" = 'eth0' AND $timeFilter GROUP BY time($interval) fill(null)",
"rawQuery": false,
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"tx_bytes"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"1s"
],
"type": "derivative"
},
{
"params": [
"*8"
],
"type": "math"
}
]
],
"tags": [
{
"key": "host",
"operator": "=",
"value": "{{ SERVERNAME }}"
},
{
"condition": "AND",
"key": "container_name",
"operator": "=",
"value": "so-filebeat"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "{{ SERVERNAME }} - Filebeat Traffic",
"tooltip": {
"msResolution": true,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "bps",
"label": "Bits/Sec",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
}
],
"refresh": false,
@@ -3930,7 +4216,7 @@
]
},
"timezone": "browser",
"title": "Forward Node - {{ SERVERNAME }} Overview",
"uid": "{{ UID }}",
"version": 12
"title": "Evaluation Mode - {{ SERVERNAME }} Overview",
"uid": "{{ GID }}",
"version": 3
}

View File

@@ -1379,7 +1379,7 @@
},
{
"params": [
" / 8"
" / {{ CPUS }}"
],
"type": "math"
}
@@ -1510,7 +1510,7 @@
},
{
"params": [
" / 8"
" / {{ CPUS }}"
],
"type": "math"
}
@@ -1641,7 +1641,7 @@
},
{
"params": [
" / 8"
" / {{ CPUS }}"
],
"type": "math"
}

View File

@@ -366,7 +366,7 @@
},
{
"params": [
" / 4"
" / {{ CPUS }}"
],
"type": "math"
}
@@ -497,7 +497,7 @@
},
{
"params": [
" / 4"
" / {{ CPUS }}"
],
"type": "math"
}
@@ -1118,7 +1118,7 @@
},
{
"params": [
" / 4"
" / {{ CPUS }}"
],
"type": "math"
}
@@ -1249,7 +1249,7 @@
},
{
"params": [
" / 4"
" / {{ CPUS }}"
],
"type": "math"
}
@@ -1380,7 +1380,7 @@
},
{
"params": [
" / 4"
" / {{ CPUS }}"
],
"type": "math"
}

View File

@@ -367,7 +367,7 @@
},
{
"params": [
" / 4"
" / {{ CPUS }}"
],
"type": "math"
}
@@ -498,7 +498,7 @@
},
{
"params": [
" / 4"
" / {{ CPUS }}"
],
"type": "math"
}