Skip to content

Instantly share code, notes, and snippets.

@w1ndy
Last active March 2, 2019 08:29
Show Gist options
  • Save w1ndy/11fa536d9312c1b1911c394a48690880 to your computer and use it in GitHub Desktop.
Save w1ndy/11fa536d9312c1b1911c394a48690880 to your computer and use it in GitHub Desktop.
Grafana Dashboards
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 1,
"iteration": 1551514869647,
"links": [],
"panels": [
{
"columns": [],
"fontSize": "100%",
"gridPos": {
"h": 12,
"w": 5,
"x": 0,
"y": 0
},
"id": 12,
"links": [],
"pageSize": null,
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"styles": [
{
"alias": "Time",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "Time",
"type": "hidden"
},
{
"alias": "",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"decimals": 2,
"pattern": "Value",
"thresholds": [],
"type": "number",
"unit": "bytes"
}
],
"targets": [
{
"expr": "sort(sum by (remote) (delta(nginx_transferred_bytes{host=~\"$host\"}[24h])))",
"format": "table",
"hide": false,
"instant": true,
"intervalFactor": 1,
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Last 24h",
"transform": "table",
"type": "table"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"fill": 1,
"gridPos": {
"h": 12,
"w": 8,
"x": 5,
"y": 0
},
"id": 4,
"legend": {
"alignAsTable": false,
"avg": false,
"current": false,
"hideZero": true,
"max": false,
"min": false,
"rightSide": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"paceLength": 10,
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum by (host, code) (label_replace(label_replace(rate(nginx_http_requests_total{host=~\"$host\"}[5m]), \"code\", \"$1\", \"status\", \".+\"), \"code\", \"${1}xx\", \"status\", \"([0-9]).*\"))",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
"legendFormat": "{{host}} - {{code}}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Requests Per Second",
"tooltip": {
"shared": true,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"fill": 0,
"gridPos": {
"h": 12,
"w": 7,
"x": 13,
"y": 0
},
"id": 6,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null as zero",
"paceLength": 10,
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum(rate(nginx_http_requests_duration_seconds_bucket{host=~\"$host\"}[5m])) by (host)",
"format": "time_series",
"hide": false,
"instant": false,
"interval": "",
"intervalFactor": 1,
"legendFormat": "{{host}}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Latency",
"tooltip": {
"shared": true,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "ms",
"label": null,
"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
}
},
{
"description": "",
"gridPos": {
"h": 8,
"w": 4,
"x": 20,
"y": 0
},
"id": 8,
"links": [],
"options": {
"maxValue": "100",
"minValue": 0,
"showThresholdLabels": false,
"showThresholdMarkers": true,
"thresholds": [
{
"color": "#7EB26D",
"index": 0,
"value": null
},
{
"color": "#6ED0E0",
"index": 1,
"value": 50
},
{
"color": "#EF843C",
"index": 2,
"value": 75
},
{
"color": "#E24D42",
"index": 3,
"value": 87.5
}
],
"valueMappings": [],
"valueOptions": {
"decimals": null,
"prefix": "",
"stat": "avg",
"suffix": "",
"unit": "none"
}
},
"targets": [
{
"expr": "nginx_http_connections{state=\"reading\"}",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
"legendFormat": "",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Connection (Reading)",
"type": "gauge"
},
{
"description": "",
"gridPos": {
"h": 8,
"w": 4,
"x": 20,
"y": 8
},
"id": 9,
"links": [],
"options": {
"maxValue": "100",
"minValue": 0,
"showThresholdLabels": false,
"showThresholdMarkers": true,
"thresholds": [
{
"color": "#7EB26D",
"index": 0,
"value": null
},
{
"color": "#6ED0E0",
"index": 1,
"value": 50
},
{
"color": "#EF843C",
"index": 2,
"value": 75
},
{
"color": "#E24D42",
"index": 3,
"value": 87.5
}
],
"valueMappings": [],
"valueOptions": {
"decimals": null,
"prefix": "",
"stat": "avg",
"suffix": "",
"unit": "none"
}
},
"targets": [
{
"expr": "nginx_http_connections{state=\"waiting\"}",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
"legendFormat": "",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Connection (Waiting)",
"type": "gauge"
},
{
"aliasColors": {},
"bars": true,
"dashLength": 10,
"dashes": false,
"fill": 1,
"gridPos": {
"h": 12,
"w": 20,
"x": 0,
"y": 12
},
"id": 2,
"legend": {
"avg": false,
"current": false,
"hideZero": true,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": false,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"paceLength": 10,
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"stack": true,
"steppedLine": false,
"targets": [
{
"expr": "sum by (remote) (increase(nginx_transferred_bytes{host=~\"$host\"}[5m]))",
"format": "time_series",
"hide": false,
"instant": false,
"intervalFactor": 1,
"legendFormat": "{{remote}}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Transferred Bytes [5m]",
"tooltip": {
"shared": true,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "decbytes",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"description": "",
"gridPos": {
"h": 8,
"w": 4,
"x": 20,
"y": 16
},
"id": 10,
"links": [],
"options": {
"maxValue": "100",
"minValue": 0,
"showThresholdLabels": false,
"showThresholdMarkers": true,
"thresholds": [
{
"color": "#7EB26D",
"index": 0,
"value": null
},
{
"color": "#6ED0E0",
"index": 1,
"value": 50
},
{
"color": "#EF843C",
"index": 2,
"value": 75
},
{
"color": "#E24D42",
"index": 3,
"value": 87.5
}
],
"valueMappings": [],
"valueOptions": {
"decimals": null,
"prefix": "",
"stat": "avg",
"suffix": "",
"unit": "none"
}
},
"targets": [
{
"expr": "nginx_http_connections{state=\"writing\"}",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
"legendFormat": "",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Connection (Writing)",
"type": "gauge"
}
],
"schemaVersion": 18,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"allValue": null,
"current": {
"text": "cf.zjuvis.org + cloud.zjuvis.org + git.zjuvis.org + grafana.zjuvis.org + registry.zjuvis.org + status.zjuvis.org",
"value": [
"cf.zjuvis.org",
"cloud.zjuvis.org",
"git.zjuvis.org",
"grafana.zjuvis.org",
"registry.zjuvis.org",
"status.zjuvis.org"
]
},
"datasource": "Prometheus",
"definition": "nginx_transferred_bytes",
"hide": 0,
"includeAll": false,
"label": "Host",
"multi": true,
"name": "host",
"options": [],
"query": "nginx_transferred_bytes",
"refresh": 1,
"regex": "/.*host=\"([^\"]*).*/",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "",
"title": "OpenResty",
"uid": "RnM7_e9mz",
"version": 4
}
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 2,
"links": [],
"panels": [
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": true,
"colors": [
"#d44a3a",
"rgba(237, 129, 40, 0.89)",
"#299c46"
],
"format": "none",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 5,
"w": 5,
"x": 0,
"y": 0
},
"id": 11,
"interval": null,
"links": [],
"mappingType": 2,
"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": "0.6",
"text": "UP",
"to": "1"
},
{
"from": "0",
"text": "DOWN",
"to": "0.6"
}
],
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": false
},
"tableColumn": "",
"targets": [
{
"expr": "probe_success[5m]",
"format": "time_series",
"instant": true,
"intervalFactor": 1,
"refId": "A"
}
],
"thresholds": "0.6,0.8",
"timeFrom": null,
"timeShift": null,
"title": "Status",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "UP",
"value": "1"
},
{
"op": "=",
"text": "DOWN",
"value": "0"
}
],
"valueName": "avg"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"fill": 1,
"gridPos": {
"h": 13,
"w": 19,
"x": 5,
"y": 0
},
"id": 5,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": false,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"paceLength": 10,
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum(irate(promacct_packet_size_bytes_all[5m]))",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Speed",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "bytes",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"fill": 1,
"gridPos": {
"h": 7,
"w": 5,
"x": 0,
"y": 5
},
"id": 9,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": false,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"paceLength": 10,
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "probe_duration_seconds{instance=\"http://google.com\"}",
"format": "time_series",
"intervalFactor": 1,
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "HTTP Latency",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "s",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"columns": [],
"fontSize": "100%",
"gridPos": {
"h": 13,
"w": 5,
"x": 0,
"y": 12
},
"id": 7,
"links": [],
"pageSize": null,
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"styles": [
{
"alias": "Time",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "Time",
"type": "hidden"
},
{
"alias": "",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"decimals": 2,
"pattern": "Value",
"thresholds": [],
"type": "number",
"unit": "bytes"
}
],
"targets": [
{
"expr": "sort(sum by (ip) (delta(promacct_packet_size_bytes_rx{ip!=\"10.76.6.179\"}[24h]) + delta(promacct_packet_size_bytes_tx{ip!=\"10.76.6.179\"}[24h])))",
"format": "table",
"instant": true,
"intervalFactor": 1,
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Last 24h",
"transform": "table",
"type": "table"
},
{
"aliasColors": {},
"bars": true,
"dashLength": 10,
"dashes": false,
"fill": 1,
"gridPos": {
"h": 12,
"w": 10,
"x": 5,
"y": 13
},
"id": 2,
"legend": {
"avg": false,
"current": false,
"hideZero": true,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"paceLength": 10,
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"stack": true,
"steppedLine": false,
"targets": [
{
"expr": "increase(promacct_packet_size_bytes_rx{interface=\"em1\",ip!=\"10.76.6.179\"}[5m]) + increase(promacct_packet_size_bytes_tx{interface=\"em1\",ip!=\"10.76.6.179\"}[5m])",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
"legendFormat": "{{ip}}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Traffic (Internal)",
"tooltip": {
"shared": true,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "bytes",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": true,
"dashLength": 10,
"dashes": false,
"fill": 1,
"gridPos": {
"h": 12,
"w": 9,
"x": 15,
"y": 13
},
"id": 3,
"legend": {
"avg": false,
"current": false,
"hideZero": true,
"max": false,
"min": false,
"show": false,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"paceLength": 10,
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"stack": true,
"steppedLine": false,
"targets": [
{
"expr": "increase(promacct_packet_size_bytes_all{interface=\"lo\"}[5m])",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
"legendFormat": "{{ip}}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Traffic (Public)",
"tooltip": {
"shared": true,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "bytes",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
}
],
"refresh": false,
"schemaVersion": 18,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now/d",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "",
"title": "Shadowsocks",
"uid": "cji5SRjmz",
"version": 6
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment