diff --git a/files/dashboards/overview.json b/files/dashboards/overview.json index f32584d..0c3281d 100644 --- a/files/dashboards/overview.json +++ b/files/dashboards/overview.json @@ -24,125 +24,10 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 25, + "id": 2, "links": [], "liveNow": false, "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "yPhvsDP7k" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "hue", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 28, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "9.4.0-90864pre", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "yPhvsDP7k" - }, - "editorMode": "code", - "expr": "sum(rate(cloudflare_zone_requests_total{}[$__interval]))", - "interval": "", - "intervalFactor": 10, - "legendFormat": "total", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "yPhvsDP7k" - }, - "editorMode": "code", - "expr": "sum(rate(cloudflare_zone_requests_cached{}[$__interval]))", - "interval": "", - "intervalFactor": 10, - "legendFormat": "cached", - "range": true, - "refId": "B" - } - ], - "title": "Cloudflare Requests / second", - "type": "timeseries" - }, { "columns": [], "datasource": { @@ -152,10 +37,10 @@ "description": "\n\nCurrEstab: The number of TCP connections whose current status is ESTABLISHED or CLOSE-WAIT.", "fontSize": "80%", "gridPos": { - "h": 24, + "h": 31, "w": 24, "x": 0, - "y": 8 + "y": 0 }, "id": 24, "showHeader": true, @@ -654,6 +539,7 @@ ], "title": "Resource Overview", "transform": "table", + "transparent": true, "type": "table-old" } ], @@ -716,6 +602,6 @@ "timezone": "", "title": "Overview", "uid": "HHYqp7T4z", - "version": 6, + "version": 1, "weekStart": "" } diff --git a/files/dashboards/overview_cf.json b/files/dashboards/overview_cf.json new file mode 100644 index 0000000..f32584d --- /dev/null +++ b/files/dashboards/overview_cf.json @@ -0,0 +1,721 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 25, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 30, + "gradientMode": "hue", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 28, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.4.0-90864pre", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "sum(rate(cloudflare_zone_requests_total{}[$__interval]))", + "interval": "", + "intervalFactor": 10, + "legendFormat": "total", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "sum(rate(cloudflare_zone_requests_cached{}[$__interval]))", + "interval": "", + "intervalFactor": 10, + "legendFormat": "cached", + "range": true, + "refId": "B" + } + ], + "title": "Cloudflare Requests / second", + "type": "timeseries" + }, + { + "columns": [], + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "description": "\n\nCurrEstab: The number of TCP connections whose current status is ESTABLISHED or CLOSE-WAIT.", + "fontSize": "80%", + "gridPos": { + "h": 24, + "w": 24, + "x": 0, + "y": 8 + }, + "id": 24, + "showHeader": true, + "sort": { + "col": 31, + "desc": false + }, + "styles": [ + { + "$$hashKey": "object:1600", + "alias": "Hostname", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 1, + "link": false, + "linkTooltip": "", + "linkUrl": "", + "mappingType": 1, + "pattern": "nodename", + "thresholds": [], + "type": "string", + "unit": "bytes" + }, + { + "$$hashKey": "object:1602", + "alias": "Memory", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "mappingType": 1, + "pattern": "Value #B", + "thresholds": [], + "type": "number", + "unit": "bytes" + }, + { + "$$hashKey": "object:1603", + "alias": "CPU Cores", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "mappingType": 1, + "pattern": "Value #C", + "thresholds": [], + "type": "number", + "unit": "short" + }, + { + "$$hashKey": "object:1604", + "alias": " Uptime", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #D", + "thresholds": [], + "type": "number", + "unit": "s" + }, + { + "$$hashKey": "object:1605", + "alias": "Partition used%*", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #E", + "thresholds": [ + "70", + "85" + ], + "type": "number", + "unit": "percent" + }, + { + "$$hashKey": "object:1606", + "alias": "CPU used%", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #F", + "thresholds": [ + "70", + "85" + ], + "type": "number", + "unit": "percent" + }, + { + "$$hashKey": "object:1607", + "alias": "Memory used%", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #G", + "thresholds": [ + "70", + "85" + ], + "type": "number", + "unit": "percent" + }, + { + "$$hashKey": "object:1608", + "alias": "Disk read*", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #H", + "thresholds": [ + "10485760", + "20485760" + ], + "type": "number", + "unit": "Bps" + }, + { + "$$hashKey": "object:1609", + "alias": "Disk write*", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #I", + "thresholds": [ + "10485760", + "20485760" + ], + "type": "number", + "unit": "Bps" + }, + { + "$$hashKey": "object:1610", + "alias": "Download*", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #J", + "thresholds": [ + "30485760", + "104857600" + ], + "type": "number", + "unit": "bps" + }, + { + "$$hashKey": "object:1611", + "alias": "Upload*", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #K", + "thresholds": [ + "30485760", + "104857600" + ], + "type": "number", + "unit": "bps" + }, + { + "$$hashKey": "object:1612", + "alias": "5m load", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #L", + "thresholds": [], + "type": "number", + "unit": "short" + }, + { + "$$hashKey": "object:1613", + "alias": "CurrEstab", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #M", + "thresholds": [ + "1000", + "1500" + ], + "type": "string", + "unit": "short" + }, + { + "$$hashKey": "object:1614", + "alias": "TCP_tw", + "align": "center", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "mappingType": 1, + "pattern": "Value #N", + "thresholds": [ + "5000", + "20000" + ], + "type": "number", + "unit": "short" + }, + { + "$$hashKey": "object:1615", + "alias": "", + "align": "right", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "hidden", + "unit": "short" + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "node_uname_info{job=~\"$job\"} - 0", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "主机名", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "sum(time() - node_boot_time_seconds{job=~\"$job\"})by(instance)", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "运行时间", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "node_memory_MemTotal_bytes{job=~\"$job\"} - 0", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "总内存", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "count(node_cpu_seconds_total{job=~\"$job\",mode='system'}) by (instance)", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "总核数", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "node_load5{job=~\"$job\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "5分钟负载", + "refId": "L" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "(1 - avg(rate(node_cpu_seconds_total{job=~\"$job\",mode=\"idle\"}[$__rate_interval])) by (instance)) * 100", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "CPU使用率", + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "(1 - (node_memory_MemAvailable_bytes{job=~\"$job\"} / (node_memory_MemTotal_bytes{job=~\"$job\"})))* 100", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "内存使用率", + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "max((node_filesystem_size_bytes{job=~\"$job\",fstype=~\"ext.?|xfs\"}-node_filesystem_free_bytes{job=~\"$job\",fstype=~\"ext.?|xfs\"}) *100/(node_filesystem_avail_bytes {job=~\"$job\",fstype=~\"ext.?|xfs\"}+(node_filesystem_size_bytes{job=~\"$job\",fstype=~\"ext.?|xfs\"}-node_filesystem_free_bytes{job=~\"$job\",fstype=~\"ext.?|xfs\"})))by(instance)", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "分区使用率", + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "max(rate(node_disk_read_bytes_total{job=~\"$job\"}[$__rate_interval])) by (instance)", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "最大读取", + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "max(rate(node_disk_written_bytes_total{job=~\"$job\"}[$__rate_interval])) by (instance)", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "最大写入", + "refId": "I" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "node_netstat_Tcp_CurrEstab{job=~\"$job\"} - 0", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "连接数", + "refId": "M" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "node_sockstat_TCP_tw{job=~\"$job\"} - 0", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "TIME_WAIT", + "refId": "N" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "max(rate(node_network_receive_bytes_total{job=~\"$job\"}[$__rate_interval])*8) by (instance)", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "下载带宽", + "refId": "J" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "max(rate(node_network_transmit_bytes_total{job=~\"$job\"}[$__rate_interval])*8) by (instance)", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "上传带宽", + "refId": "K" + } + ], + "title": "Resource Overview", + "transform": "table", + "type": "table-old" + } + ], + "refresh": "1m", + "revision": 1, + "schemaVersion": 38, + "style": "dark", + "tags": [ + "system" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "node", + "value": "node" + }, + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "definition": "label_values(node_uname_info, job)", + "hide": 2, + "includeAll": false, + "label": "Job", + "multi": false, + "name": "job", + "options": [], + "query": { + "query": "label_values(node_uname_info, job)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + } + ] + }, + "time": { + "from": "now-24h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Overview", + "uid": "HHYqp7T4z", + "version": 6, + "weekStart": "" +} diff --git a/files/dashboards/plateform-overview-cf.json b/files/dashboards/plateform-overview-cf.json new file mode 100644 index 0000000..49f436f --- /dev/null +++ b/files/dashboards/plateform-overview-cf.json @@ -0,0 +1,2074 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 5, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 3600 + } + ] + }, + "unit": "dtdurations" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.0-102000pre", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "exemplar": false, + "expr": "min(node_time_seconds{instance=~\"$host\",job=\"$job\"} - node_boot_time_seconds{instance=~\"$host\",job=\"$job\"})", + "instant": true, + "legendFormat": "Uptime", + "range": false, + "refId": "A" + } + ], + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [], + "max": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 80 + }, + { + "color": "red", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 3, + "y": 0 + }, + "id": 3, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.0-102000pre", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(100 - (avg(rate(node_cpu_seconds_total{instance=~\"$host\",mode=\"idle\"}[$__rate_interval])) * 100))", + "hide": false, + "instant": true, + "legendFormat": "CPU Usage", + "range": false, + "refId": "A" + } + ], + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [], + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 80 + }, + { + "color": "red", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 6, + "y": 0 + }, + "id": 5, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.0-102000pre", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(100 - ((node_memory_MemAvailable_bytes{instance=~\"$host\",job=\"$job\"} * 100) / node_memory_MemTotal_bytes{instance=~\"$host\",job=\"$job\"}))", + "instant": true, + "legendFormat": "Memory Usage", + "range": false, + "refId": "A" + } + ], + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "index": 0, + "text": "VM" + } + }, + "type": "special" + } + ], + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 85 + }, + { + "color": "red", + "value": 95 + } + ] + }, + "unit": "celsius" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 9, + "y": 0 + }, + "id": 4, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.0-102000pre", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(node_hwmon_temp_celsius{instance=~\"$host\",job=\"$job\"})", + "instant": true, + "legendFormat": "Temperature", + "range": false, + "refId": "A" + } + ], + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" + }, + "decimals": 1, + "mappings": [], + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "binBps" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 12, + "y": 0 + }, + "id": 6, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.0-102000pre", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(node_network_receive_bytes_total{instance=~\"$host\",job=\"$job\",device=~\"$nic\"}[1m]))", + "instant": true, + "legendFormat": "Current download", + "range": false, + "refId": "A" + } + ], + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" + }, + "decimals": 1, + "mappings": [], + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 15, + "y": 0 + }, + "id": 7, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.0-102000pre", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(increase(node_network_receive_bytes_total{instance=~\"$host\",device=~\"$nic\"}[$__range]))", + "instant": true, + "legendFormat": "Total download", + "range": false, + "refId": "A" + } + ], + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "purple", + "mode": "fixed" + }, + "decimals": 1, + "mappings": [], + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "binBps" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 18, + "y": 0 + }, + "id": 8, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.0-102000pre", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(node_network_transmit_bytes_total{instance=~\"$host\",job=\"$job\",device=~\"$nic\"}[1m]))", + "instant": true, + "legendFormat": "Current upload", + "range": false, + "refId": "A" + } + ], + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "purple", + "mode": "fixed" + }, + "decimals": 1, + "mappings": [], + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 21, + "y": 0 + }, + "id": 9, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.0-102000pre", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(increase(node_network_transmit_bytes_total{instance=~\"$host\",device=~\"$nic\"}[$__range]))", + "instant": true, + "legendFormat": "Total upload", + "range": false, + "refId": "A" + } + ], + "transparent": true, + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 20, + "panels": [], + "title": "Server", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 50, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 80 + }, + { + "color": "red", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Memory usage" + }, + "properties": [ + { + "id": "custom.lineStyle", + "value": { + "dash": [ + 10, + 10 + ], + "fill": "dash" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 4 + }, + "id": 11, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "avg(100 - (avg(rate(node_cpu_seconds_total{instance=~\"$host\",mode=\"idle\"}[$__rate_interval])) * 100))", + "legendFormat": "CPU usage", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "avg(node_load5{instance=~\"$host\",job=\"$job\"})", + "hide": false, + "legendFormat": "Load Average", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "avg(100 - ((node_memory_MemAvailable_bytes{instance=~\"$host\",job=\"$job\"} * 100) / node_memory_MemTotal_bytes{instance=~\"$host\",job=\"$job\"}))", + "hide": false, + "legendFormat": "Memory usage", + "range": true, + "refId": "C" + } + ], + "title": "CPU & Memory Usage", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "transmit (-) / receive (+)", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 30, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/^transmit$/" + }, + "properties": [ + { + "id": "custom.transform", + "value": "negative-Y" + }, + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 4 + }, + "id": 13, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "sum(increase(node_network_receive_bytes_total{instance=~\"$host\",device=~\"$nic\"}[60m]))", + "interval": "60m", + "legendFormat": "receive", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "sum(increase(node_network_transmit_bytes_total{instance=~\"$host\",device=~\"$nic\"}[60m]))", + "hide": false, + "interval": "60m", + "legendFormat": "transmit", + "range": true, + "refId": "B" + } + ], + "title": "Internet traffic per hour", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 40, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bps" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Recv_bytes_eth2" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#7EB26D", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Recv_bytes_lo" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#0A50A1", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Recv_drop_eth2" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#6ED0E0", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Recv_drop_lo" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#E0F9D7", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Recv_errs_eth2" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#BF1B00", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Recv_errs_lo" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#CCA300", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Trans_bytes_eth2" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#7EB26D", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Trans_bytes_lo" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#0A50A1", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Trans_drop_eth2" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#6ED0E0", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Trans_drop_lo" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#E0F9D7", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Trans_errs_eth2" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#BF1B00", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Trans_errs_lo" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#CCA300", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "recv_bytes_lo" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#0A50A1", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "recv_drop_eth0" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#99440A", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "recv_drop_lo" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#967302", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "recv_errs_eth0" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#BF1B00", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "recv_errs_lo" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#890F02", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "trans_bytes_eth0" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#7EB26D", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "trans_bytes_lo" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#0A50A1", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "trans_drop_eth0" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#99440A", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "trans_drop_lo" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#967302", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "trans_errs_eth0" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#BF1B00", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "trans_errs_lo" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#890F02", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "/.*trans.*/" + }, + "properties": [ + { + "id": "custom.transform", + "value": "negative-Y" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 10 + }, + "id": 30, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.4.0-90864pre", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "sum(rate(node_network_receive_bytes_total{instance=~\"$host\",job=\"$job\"}[$__rate_interval])*8)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "recv {{device}}", + "range": true, + "refId": "A", + "step": 240 + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "sum(rate(node_network_transmit_bytes_total{instance=~\"$host\",job=\"$job\"}[$__rate_interval])*8)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "trans {{device}} ", + "range": true, + "refId": "B", + "step": 240 + } + ], + "title": "Network Traffic", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic", + "seriesBy": "last" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 50, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "mappings": [], + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 10 + }, + "id": 15, + "options": { + "legend": { + "calcs": [ + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Max", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "avg(100 - ((node_filesystem_avail_bytes{instance=~\"$host\",mountpoint=~\"$mountpoints\"} * 100) / node_filesystem_size_bytes{instance=~\"$host\",mountpoint=~\"$mountpoints\"})) by (mountpoint)", + "legendFormat": "{{instance}} {{mountpoint}}", + "range": true, + "refId": "A" + } + ], + "title": "Disk Space Used", + "transparent": true, + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 17 + }, + "id": 22, + "panels": [], + "title": "Production", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 50, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 18 + }, + "id": 14, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max", + "mean" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "sum(rate(haproxy_frontend_http_responses_total{instance=~\"$production\"}[$__rate_interval])) by (code)", + "legendFormat": "{{ code }}", + "range": true, + "refId": "A" + } + ], + "title": "HAproxy responses rate", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "orange", + "mode": "fixed" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 50, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "noValue": "No MySQL on this server", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 18 + }, + "id": 18, + "options": { + "legend": { + "calcs": [ + "last", + "max", + "mean" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "max(max_over_time(mysql_global_status_threads_connected{instance=~\"$production\"}[$__rate_interval]) or mysql_global_status_threads_connected{instance=~\"$production\"})", + "interval": "", + "legendFormat": "Connections", + "range": true, + "refId": "A" + } + ], + "title": "MySQL connections", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 30, + "gradientMode": "hue", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 24 + }, + "id": 28, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.4.0-90864pre", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "sum(rate(cloudflare_zone_requests_total{}[$__interval]))", + "interval": "", + "intervalFactor": 10, + "legendFormat": "total", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "sum(rate(cloudflare_zone_requests_cached{}[$__interval]))", + "interval": "", + "intervalFactor": 10, + "legendFormat": "cached", + "range": true, + "refId": "B" + } + ], + "title": "Cloudflare Requests / second", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "orange", + "mode": "fixed" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 50, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "noValue": "No MySQL on this server", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "orange", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 24 + }, + "id": 17, + "options": { + "legend": { + "calcs": [ + "last", + "max", + "mean" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "editorMode": "code", + "expr": "avg(rate(mysql_global_status_queries{instance=~\"$production\"}[$__rate_interval]) or irate(mysql_global_status_queries{instance=~\"$production\"}[5m]))", + "legendFormat": "QPS", + "range": true, + "refId": "A" + } + ], + "title": "MySQL querries per second", + "transparent": true, + "type": "timeseries" + } + ], + "refresh": "1m", + "revision": 1, + "schemaVersion": 38, + "style": "dark", + "tags": [ + "system" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "node", + "value": "node" + }, + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "definition": "label_values(node_uname_info, job)", + "hide": 2, + "includeAll": false, + "label": "Job", + "multi": false, + "name": "job", + "options": [], + "query": { + "query": "label_values(node_uname_info, job)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": { + "selected": true, + "text": [ + "emzhyp03", + "emzhyp04", + "emzhyp05" + ], + "value": [ + "emzhyp03", + "emzhyp04", + "emzhyp05" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "definition": "label_values(node_uname_info{job=\"$job\"}, instance)", + "hide": 0, + "includeAll": false, + "label": "Server", + "multi": true, + "name": "host", + "options": [], + "query": { + "query": "label_values(node_uname_info{job=\"$job\"}, instance)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": { + "selected": true, + "text": [ + "/VMs", + "/VMs_SSD", + "/home", + "/var/log" + ], + "value": [ + "/VMs", + "/VMs_SSD", + "/home", + "/var/log" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "definition": "label_values(node_filesystem_avail_bytes{instance=~\"$host\",fstype!=\"nfs\"}, mountpoint)", + "hide": 0, + "includeAll": false, + "label": "Mountpoints", + "multi": true, + "name": "mountpoints", + "options": [], + "query": { + "query": "label_values(node_filesystem_avail_bytes{instance=~\"$host\",fstype!=\"nfs\"}, mountpoint)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/^(?!/run|/boot).*/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "definition": "label_values(node_network_up{instance=~\"$host\",job=\"$job\"}, device)", + "hide": 2, + "includeAll": true, + "label": "Net Interface", + "multi": true, + "name": "nic", + "options": [], + "query": { + "query": "label_values(node_network_up{instance=~\"$host\",job=\"$job\"}, device)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/^(?!br|veth|lo|docker|fw|tap).*/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "yPhvsDP7k" + }, + "definition": "label_values(node_uname_info{job=\"$job\"}, instance)", + "hide": 0, + "includeAll": true, + "label": "Production", + "multi": false, + "name": "production", + "options": [], + "query": { + "query": "label_values(node_uname_info{job=\"$job\"}, instance)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/.*prd.*/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-24h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Plateform Overview", + "uid": "pyphZNNVz", + "version": 18, + "weekStart": "" +} diff --git a/files/dashboards/plateform-overview.json b/files/dashboards/plateform-overview.json index 49f436f..c310366 100644 --- a/files/dashboards/plateform-overview.json +++ b/files/dashboards/plateform-overview.json @@ -24,7 +24,7 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 5, + "id": 4, "links": [], "liveNow": false, "panels": [ @@ -77,7 +77,7 @@ }, "textMode": "auto" }, - "pluginVersion": "9.4.0-102000pre", + "pluginVersion": "10.1.0-124838pre", "targets": [ { "datasource": { @@ -151,7 +151,7 @@ }, "textMode": "auto" }, - "pluginVersion": "9.4.0-102000pre", + "pluginVersion": "10.1.0-124838pre", "targets": [ { "datasource": { @@ -226,7 +226,7 @@ }, "textMode": "auto" }, - "pluginVersion": "9.4.0-102000pre", + "pluginVersion": "10.1.0-124838pre", "targets": [ { "datasource": { @@ -311,7 +311,7 @@ }, "textMode": "auto" }, - "pluginVersion": "9.4.0-102000pre", + "pluginVersion": "10.1.0-124838pre", "targets": [ { "datasource": { @@ -378,7 +378,7 @@ }, "textMode": "auto" }, - "pluginVersion": "9.4.0-102000pre", + "pluginVersion": "10.1.0-124838pre", "targets": [ { "datasource": { @@ -445,7 +445,7 @@ }, "textMode": "auto" }, - "pluginVersion": "9.4.0-102000pre", + "pluginVersion": "10.1.0-124838pre", "targets": [ { "datasource": { @@ -512,7 +512,7 @@ }, "textMode": "auto" }, - "pluginVersion": "9.4.0-102000pre", + "pluginVersion": "10.1.0-124838pre", "targets": [ { "datasource": { @@ -579,7 +579,7 @@ }, "textMode": "auto" }, - "pluginVersion": "9.4.0-102000pre", + "pluginVersion": "10.1.0-124838pre", "targets": [ { "datasource": { @@ -635,6 +635,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -782,6 +783,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineStyle": { "fill": "solid" @@ -914,6 +916,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -1387,6 +1390,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -1497,6 +1501,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -1537,13 +1542,9 @@ "id": 14, "options": { "legend": { - "calcs": [ - "lastNotNull", - "max", - "mean" - ], - "displayMode": "table", - "placement": "right", + "calcs": [], + "displayMode": "list", + "placement": "bottom", "showLegend": true, "sortBy": "Mean", "sortDesc": true @@ -1595,6 +1596,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -1683,7 +1685,7 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, - "drawStyle": "line", + "drawStyle": "bars", "fillOpacity": 30, "gradientMode": "hue", "hideFrom": { @@ -1691,6 +1693,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -1735,18 +1738,15 @@ "id": 28, "options": { "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false, + "sortBy": "Mean", + "sortDesc": true }, "tooltip": { - "mode": "multi", + "mode": "single", "sort": "none" } }, @@ -1758,28 +1758,15 @@ "uid": "yPhvsDP7k" }, "editorMode": "code", - "expr": "sum(rate(cloudflare_zone_requests_total{}[$__interval]))", + "expr": "sum by (socket_path) (rate(php_fpm_slow_requests{instance=~\"$production\"} [$__rate_interval]))", "interval": "", "intervalFactor": 10, - "legendFormat": "total", + "legendFormat": "{{ socket_path }} ", "range": true, "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "yPhvsDP7k" - }, - "editorMode": "code", - "expr": "sum(rate(cloudflare_zone_requests_cached{}[$__interval]))", - "interval": "", - "intervalFactor": 10, - "legendFormat": "cached", - "range": true, - "refId": "B" } ], - "title": "Cloudflare Requests / second", + "title": "PHP-FPM Slow Requests Rate", "transparent": true, "type": "timeseries" }, @@ -1808,6 +1795,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, @@ -1920,14 +1908,12 @@ "current": { "selected": true, "text": [ - "emzhyp03", - "emzhyp04", - "emzhyp05" + "cprprdcache1", + "cprprdcache2" ], "value": [ - "emzhyp03", - "emzhyp04", - "emzhyp05" + "cprprdcache1", + "cprprdcache2" ] }, "datasource": { @@ -1955,14 +1941,10 @@ "current": { "selected": true, "text": [ - "/VMs", - "/VMs_SSD", "/home", "/var/log" ], "value": [ - "/VMs", - "/VMs_SSD", "/home", "/var/log" ] @@ -2069,6 +2051,6 @@ "timezone": "", "title": "Plateform Overview", "uid": "pyphZNNVz", - "version": 18, + "version": 1, "weekStart": "" } diff --git a/tasks/server/grafana-provisioning.yml b/tasks/server/grafana-provisioning.yml index 2014240..9b510b1 100644 --- a/tasks/server/grafana-provisioning.yml +++ b/tasks/server/grafana-provisioning.yml @@ -162,7 +162,21 @@ owner: '1000' group: '1000' mode: '0750' - when: prometheus_node_exporter_targets is defined + when: > + prometheus_node_exporter_targets is defined and + prometheus_cloudflare_exporter_targets is not defined + notify: "grafana-prometheus-restart" + +- name: "grafana-prometheus | import grafana overview-cf dashboard" + copy: + src: dashboards/overview-cf.json + dest: /opt/docker-compose/grafana-prometheus/dashboards/overview.json + owner: '1000' + group: '1000' + mode: '0750' + when: > + prometheus_node_exporter_targets is defined and + prometheus_cloudflare_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana plateform-overview dashboard" @@ -172,7 +186,21 @@ owner: '1000' group: '1000' mode: '0750' - when: prometheus_node_exporter_targets is defined + when: > + prometheus_node_exporter_targets is defined and + prometheus_cloudflare_exporter_targets is not defined + notify: "grafana-prometheus-restart" + +- name: "grafana-prometheus | import grafana plateform-overview-cf dashboard" + copy: + src: dashboards/plateform-overview-cf.json + dest: /opt/docker-compose/grafana-prometheus/dashboards/plateform-overview.json + owner: '1000' + group: '1000' + mode: '0750' + when: > + prometheus_node_exporter_targets is defined and + prometheus_cloudflare_exporter_targets is defined notify: "grafana-prometheus-restart" - name: "grafana-prometheus | import grafana phpfpm dashboard"