commit
4dc5e3da7c
10 changed files with 1106 additions and 0 deletions
@ -0,0 +1,6 @@ |
|||||||
|
FROM flaviostutz/grafana |
||||||
|
|
||||||
|
ADD datasource-prometheus.yml /provisioning/datasources/ |
||||||
|
ADD dashboards.yml /provisioning/dashboards/ |
||||||
|
|
||||||
|
ADD dashboards /etc/grafana/dashboards/ |
||||||
@ -0,0 +1,11 @@ |
|||||||
|
apiVersion: 1 |
||||||
|
|
||||||
|
providers: |
||||||
|
- name: 'default' |
||||||
|
orgId: 1 |
||||||
|
folder: '' |
||||||
|
type: file |
||||||
|
disableDeletion: false |
||||||
|
editable: true |
||||||
|
options: |
||||||
|
path: /etc/grafana/dashboards |
||||||
@ -0,0 +1,650 @@ |
|||||||
|
{ |
||||||
|
"annotations": { |
||||||
|
"list": [ |
||||||
|
{ |
||||||
|
"builtIn": 1, |
||||||
|
"datasource": "-- Grafana --", |
||||||
|
"enable": true, |
||||||
|
"hide": true, |
||||||
|
"iconColor": "rgba(0, 211, 255, 1)", |
||||||
|
"name": "Annotations & Alerts", |
||||||
|
"type": "dashboard" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"description": "Example dashboard using prometheus", |
||||||
|
"editable": true, |
||||||
|
"gnetId": null, |
||||||
|
"graphTooltip": 0, |
||||||
|
"id": 1, |
||||||
|
"links": [], |
||||||
|
"panels": [ |
||||||
|
{ |
||||||
|
"cacheTimeout": null, |
||||||
|
"colorBackground": true, |
||||||
|
"colorValue": false, |
||||||
|
"colors": [ |
||||||
|
"#d44a3a", |
||||||
|
"#299c46", |
||||||
|
"#299c46" |
||||||
|
], |
||||||
|
"datasource": null, |
||||||
|
"format": "none", |
||||||
|
"gauge": { |
||||||
|
"maxValue": 100, |
||||||
|
"minValue": 0, |
||||||
|
"show": false, |
||||||
|
"thresholdLabels": false, |
||||||
|
"thresholdMarkers": true |
||||||
|
}, |
||||||
|
"gridPos": { |
||||||
|
"h": 4, |
||||||
|
"w": 3, |
||||||
|
"x": 0, |
||||||
|
"y": 0 |
||||||
|
}, |
||||||
|
"id": 10, |
||||||
|
"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": false |
||||||
|
}, |
||||||
|
"tableColumn": "", |
||||||
|
"targets": [ |
||||||
|
{ |
||||||
|
"expr": "up{instance=\"generator:3000\",job=\"generator\"}", |
||||||
|
"format": "time_series", |
||||||
|
"intervalFactor": 1, |
||||||
|
"legendFormat": "{{instance}}", |
||||||
|
"refId": "A" |
||||||
|
} |
||||||
|
], |
||||||
|
"thresholds": "1", |
||||||
|
"title": "Status", |
||||||
|
"type": "singlestat", |
||||||
|
"valueFontSize": "80%", |
||||||
|
"valueMaps": [ |
||||||
|
{ |
||||||
|
"op": "=", |
||||||
|
"text": "ALIVE", |
||||||
|
"value": "1" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"op": "=", |
||||||
|
"text": "DEAD", |
||||||
|
"value": "0" |
||||||
|
} |
||||||
|
], |
||||||
|
"valueName": "current" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"cacheTimeout": null, |
||||||
|
"colorBackground": false, |
||||||
|
"colorValue": false, |
||||||
|
"colors": [ |
||||||
|
"#299c46", |
||||||
|
"rgba(237, 129, 40, 0.89)", |
||||||
|
"#d44a3a" |
||||||
|
], |
||||||
|
"datasource": null, |
||||||
|
"format": "none", |
||||||
|
"gauge": { |
||||||
|
"maxValue": 100, |
||||||
|
"minValue": 0, |
||||||
|
"show": true, |
||||||
|
"thresholdLabels": false, |
||||||
|
"thresholdMarkers": true |
||||||
|
}, |
||||||
|
"gridPos": { |
||||||
|
"h": 7, |
||||||
|
"w": 4, |
||||||
|
"x": 3, |
||||||
|
"y": 0 |
||||||
|
}, |
||||||
|
"id": 16, |
||||||
|
"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": [ |
||||||
|
{ |
||||||
|
"expr": "rate( process_cpu_seconds_total{job=\"generator\"}[5m] ) * 100", |
||||||
|
"format": "time_series", |
||||||
|
"hide": false, |
||||||
|
"intervalFactor": 1, |
||||||
|
"legendFormat": "", |
||||||
|
"refId": "A" |
||||||
|
} |
||||||
|
], |
||||||
|
"thresholds": "40,60", |
||||||
|
"title": "CPU usage", |
||||||
|
"type": "singlestat", |
||||||
|
"valueFontSize": "80%", |
||||||
|
"valueMaps": [ |
||||||
|
{ |
||||||
|
"op": "=", |
||||||
|
"text": "N/A", |
||||||
|
"value": "null" |
||||||
|
} |
||||||
|
], |
||||||
|
"valueName": "current" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"cacheTimeout": null, |
||||||
|
"colorBackground": false, |
||||||
|
"colorValue": false, |
||||||
|
"colors": [ |
||||||
|
"#299c46", |
||||||
|
"rgba(237, 129, 40, 0.89)", |
||||||
|
"#d44a3a" |
||||||
|
], |
||||||
|
"datasource": null, |
||||||
|
"format": "none", |
||||||
|
"gauge": { |
||||||
|
"maxValue": 100, |
||||||
|
"minValue": 0, |
||||||
|
"show": true, |
||||||
|
"thresholdLabels": false, |
||||||
|
"thresholdMarkers": true |
||||||
|
}, |
||||||
|
"gridPos": { |
||||||
|
"h": 7, |
||||||
|
"w": 4, |
||||||
|
"x": 7, |
||||||
|
"y": 0 |
||||||
|
}, |
||||||
|
"id": 17, |
||||||
|
"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": "MB", |
||||||
|
"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": [ |
||||||
|
{ |
||||||
|
"expr": "( ( process_resident_memory_bytes{job=\"generator\"} ) / 1024 ) / 1024", |
||||||
|
"format": "time_series", |
||||||
|
"hide": false, |
||||||
|
"intervalFactor": 1, |
||||||
|
"legendFormat": "", |
||||||
|
"refId": "A" |
||||||
|
} |
||||||
|
], |
||||||
|
"thresholds": "50,80", |
||||||
|
"title": "Memory usage", |
||||||
|
"type": "singlestat", |
||||||
|
"valueFontSize": "80%", |
||||||
|
"valueMaps": [ |
||||||
|
{ |
||||||
|
"op": "=", |
||||||
|
"text": "N/A", |
||||||
|
"value": "null" |
||||||
|
} |
||||||
|
], |
||||||
|
"valueName": "current" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"cacheTimeout": null, |
||||||
|
"colorBackground": false, |
||||||
|
"colorValue": false, |
||||||
|
"colors": [ |
||||||
|
"#299c46", |
||||||
|
"rgba(237, 129, 40, 0.89)", |
||||||
|
"#d44a3a" |
||||||
|
], |
||||||
|
"datasource": null, |
||||||
|
"format": "none", |
||||||
|
"gauge": { |
||||||
|
"maxValue": 100, |
||||||
|
"minValue": 0, |
||||||
|
"show": true, |
||||||
|
"thresholdLabels": false, |
||||||
|
"thresholdMarkers": true |
||||||
|
}, |
||||||
|
"gridPos": { |
||||||
|
"h": 7, |
||||||
|
"w": 4, |
||||||
|
"x": 12, |
||||||
|
"y": 0 |
||||||
|
}, |
||||||
|
"id": 12, |
||||||
|
"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(137, 15, 2, 0.23)", |
||||||
|
"full": false, |
||||||
|
"lineColor": "#890f02", |
||||||
|
"show": true |
||||||
|
}, |
||||||
|
"tableColumn": "", |
||||||
|
"targets": [ |
||||||
|
{ |
||||||
|
"expr": "(\n sum( http_requests_duration_seconds_count{status=\"5xx\"} )\n /\n sum( http_requests_duration_seconds_count )\n) * 100", |
||||||
|
"format": "time_series", |
||||||
|
"hide": false, |
||||||
|
"intervalFactor": 1, |
||||||
|
"legendFormat": "", |
||||||
|
"refId": "A" |
||||||
|
} |
||||||
|
], |
||||||
|
"thresholds": "20,60", |
||||||
|
"title": "Total Request Errors (server)", |
||||||
|
"type": "singlestat", |
||||||
|
"valueFontSize": "80%", |
||||||
|
"valueMaps": [ |
||||||
|
{ |
||||||
|
"op": "=", |
||||||
|
"text": "N/A", |
||||||
|
"value": "null" |
||||||
|
} |
||||||
|
], |
||||||
|
"valueName": "current" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"cacheTimeout": null, |
||||||
|
"colorBackground": false, |
||||||
|
"colorValue": false, |
||||||
|
"colors": [ |
||||||
|
"#299c46", |
||||||
|
"rgba(237, 129, 40, 0.89)", |
||||||
|
"#d44a3a" |
||||||
|
], |
||||||
|
"datasource": null, |
||||||
|
"format": "none", |
||||||
|
"gauge": { |
||||||
|
"maxValue": 100, |
||||||
|
"minValue": 0, |
||||||
|
"show": true, |
||||||
|
"thresholdLabels": false, |
||||||
|
"thresholdMarkers": true |
||||||
|
}, |
||||||
|
"gridPos": { |
||||||
|
"h": 7, |
||||||
|
"w": 4, |
||||||
|
"x": 16, |
||||||
|
"y": 0 |
||||||
|
}, |
||||||
|
"id": 15, |
||||||
|
"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(137, 15, 2, 0.23)", |
||||||
|
"full": false, |
||||||
|
"lineColor": "#890f02", |
||||||
|
"show": true |
||||||
|
}, |
||||||
|
"tableColumn": "", |
||||||
|
"targets": [ |
||||||
|
{ |
||||||
|
"expr": "(\n sum( http_requests_duration_seconds_count{status=\"4xx\"} )\n /\n sum( http_requests_duration_seconds_count )\n) * 100", |
||||||
|
"format": "time_series", |
||||||
|
"hide": false, |
||||||
|
"intervalFactor": 1, |
||||||
|
"legendFormat": "", |
||||||
|
"refId": "A" |
||||||
|
} |
||||||
|
], |
||||||
|
"thresholds": "30,60", |
||||||
|
"title": "Total Request Errors (client)", |
||||||
|
"type": "singlestat", |
||||||
|
"valueFontSize": "80%", |
||||||
|
"valueMaps": [ |
||||||
|
{ |
||||||
|
"op": "=", |
||||||
|
"text": "N/A", |
||||||
|
"value": "null" |
||||||
|
} |
||||||
|
], |
||||||
|
"valueName": "current" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"aliasColors": {}, |
||||||
|
"bars": true, |
||||||
|
"dashLength": 10, |
||||||
|
"dashes": false, |
||||||
|
"datasource": null, |
||||||
|
"fill": 1, |
||||||
|
"gridPos": { |
||||||
|
"h": 9, |
||||||
|
"w": 12, |
||||||
|
"x": 0, |
||||||
|
"y": 7 |
||||||
|
}, |
||||||
|
"id": 14, |
||||||
|
"legend": { |
||||||
|
"alignAsTable": false, |
||||||
|
"avg": false, |
||||||
|
"current": false, |
||||||
|
"max": false, |
||||||
|
"min": false, |
||||||
|
"rightSide": true, |
||||||
|
"show": true, |
||||||
|
"sideWidth": 230, |
||||||
|
"total": false, |
||||||
|
"values": false |
||||||
|
}, |
||||||
|
"lines": false, |
||||||
|
"linewidth": 1, |
||||||
|
"links": [], |
||||||
|
"nullPointMode": "null", |
||||||
|
"percentage": false, |
||||||
|
"pointradius": 5, |
||||||
|
"points": false, |
||||||
|
"renderer": "flot", |
||||||
|
"seriesOverrides": [], |
||||||
|
"spaceLength": 10, |
||||||
|
"stack": false, |
||||||
|
"steppedLine": false, |
||||||
|
"targets": [ |
||||||
|
{ |
||||||
|
"expr": "(\n sum( increase( http_requests_duration_seconds_sum[10m] ) ) by (uri)\n /\n sum( increase( http_requests_duration_seconds_count[10m] ) ) by (uri)\n) > 2", |
||||||
|
"format": "time_series", |
||||||
|
"intervalFactor": 1, |
||||||
|
"legendFormat": "{{uri}}", |
||||||
|
"refId": "A" |
||||||
|
} |
||||||
|
], |
||||||
|
"thresholds": [], |
||||||
|
"timeFrom": null, |
||||||
|
"timeShift": null, |
||||||
|
"title": "Response time over 2 ms", |
||||||
|
"tooltip": { |
||||||
|
"shared": true, |
||||||
|
"sort": 0, |
||||||
|
"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 |
||||||
|
}, |
||||||
|
{ |
||||||
|
"decimals": null, |
||||||
|
"format": "short", |
||||||
|
"label": "", |
||||||
|
"logBase": 1, |
||||||
|
"max": null, |
||||||
|
"min": null, |
||||||
|
"show": true |
||||||
|
} |
||||||
|
], |
||||||
|
"yaxis": { |
||||||
|
"align": false, |
||||||
|
"alignLevel": null |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"aliasColors": {}, |
||||||
|
"bars": false, |
||||||
|
"dashLength": 10, |
||||||
|
"dashes": false, |
||||||
|
"datasource": "Prometheus", |
||||||
|
"fill": 1, |
||||||
|
"gridPos": { |
||||||
|
"h": 9, |
||||||
|
"w": 12, |
||||||
|
"x": 12, |
||||||
|
"y": 7 |
||||||
|
}, |
||||||
|
"id": 2, |
||||||
|
"legend": { |
||||||
|
"alignAsTable": true, |
||||||
|
"avg": false, |
||||||
|
"current": false, |
||||||
|
"max": false, |
||||||
|
"min": false, |
||||||
|
"rightSide": true, |
||||||
|
"show": true, |
||||||
|
"total": false, |
||||||
|
"values": false |
||||||
|
}, |
||||||
|
"lines": true, |
||||||
|
"linewidth": 1, |
||||||
|
"links": [], |
||||||
|
"nullPointMode": "null", |
||||||
|
"percentage": false, |
||||||
|
"pointradius": 5, |
||||||
|
"points": false, |
||||||
|
"renderer": "flot", |
||||||
|
"seriesOverrides": [], |
||||||
|
"spaceLength": 10, |
||||||
|
"stack": false, |
||||||
|
"steppedLine": false, |
||||||
|
"targets": [ |
||||||
|
{ |
||||||
|
"expr": "( (\n sum( http_requests_duration_seconds_count{status=\"5xx\"} ) by (uri)\n /\n sum( http_requests_duration_seconds_count ) by (uri)\n) * 100 ) > 7", |
||||||
|
"format": "time_series", |
||||||
|
"intervalFactor": 1, |
||||||
|
"legendFormat": "{{uri}}", |
||||||
|
"refId": "A" |
||||||
|
} |
||||||
|
], |
||||||
|
"thresholds": [], |
||||||
|
"timeFrom": null, |
||||||
|
"timeShift": null, |
||||||
|
"title": "Error Rate per URL (Above 7%)", |
||||||
|
"tooltip": { |
||||||
|
"shared": true, |
||||||
|
"sort": 0, |
||||||
|
"value_type": "individual" |
||||||
|
}, |
||||||
|
"type": "graph", |
||||||
|
"xaxis": { |
||||||
|
"buckets": null, |
||||||
|
"mode": "time", |
||||||
|
"name": null, |
||||||
|
"show": true, |
||||||
|
"values": [] |
||||||
|
}, |
||||||
|
"yaxes": [ |
||||||
|
{ |
||||||
|
"format": "short", |
||||||
|
"label": "", |
||||||
|
"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 |
||||||
|
} |
||||||
|
} |
||||||
|
], |
||||||
|
"schemaVersion": 16, |
||||||
|
"style": "dark", |
||||||
|
"tags": [], |
||||||
|
"templating": { |
||||||
|
"list": [] |
||||||
|
}, |
||||||
|
"time": { |
||||||
|
"from": "now-1h", |
||||||
|
"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": "Tabajara Dashboard", |
||||||
|
"uid": "WWl16mriz", |
||||||
|
"version": 8 |
||||||
|
} |
||||||
@ -0,0 +1,326 @@ |
|||||||
|
{ |
||||||
|
"annotations": { |
||||||
|
"list": [ |
||||||
|
{ |
||||||
|
"builtIn": 1, |
||||||
|
"datasource": "-- Grafana --", |
||||||
|
"enable": true, |
||||||
|
"hide": true, |
||||||
|
"iconColor": "rgba(0, 211, 255, 1)", |
||||||
|
"name": "Annotations & Alerts", |
||||||
|
"type": "dashboard" |
||||||
|
} |
||||||
|
] |
||||||
|
}, |
||||||
|
"description": "Grafana Variable with Repeatable Graphs", |
||||||
|
"editable": true, |
||||||
|
"gnetId": null, |
||||||
|
"graphTooltip": 0, |
||||||
|
"id": 2, |
||||||
|
"iteration": 1552482644952, |
||||||
|
"links": [], |
||||||
|
"panels": [ |
||||||
|
{ |
||||||
|
"aliasColors": { |
||||||
|
"Requests per second": "#0a50a1" |
||||||
|
}, |
||||||
|
"bars": false, |
||||||
|
"dashLength": 10, |
||||||
|
"dashes": false, |
||||||
|
"datasource": null, |
||||||
|
"fill": 1, |
||||||
|
"gridPos": { |
||||||
|
"h": 7, |
||||||
|
"w": 24, |
||||||
|
"x": 0, |
||||||
|
"y": 0 |
||||||
|
}, |
||||||
|
"id": 4, |
||||||
|
"legend": { |
||||||
|
"avg": false, |
||||||
|
"current": false, |
||||||
|
"max": false, |
||||||
|
"min": false, |
||||||
|
"show": true, |
||||||
|
"total": false, |
||||||
|
"values": false |
||||||
|
}, |
||||||
|
"lines": true, |
||||||
|
"linewidth": 1, |
||||||
|
"links": [], |
||||||
|
"nullPointMode": "null", |
||||||
|
"percentage": false, |
||||||
|
"pointradius": 5, |
||||||
|
"points": false, |
||||||
|
"renderer": "flot", |
||||||
|
"repeat": "uri", |
||||||
|
"repeatDirection": "h", |
||||||
|
"scopedVars": { |
||||||
|
"uri": { |
||||||
|
"selected": true, |
||||||
|
"text": "/resources/somegroup/item-0003", |
||||||
|
"value": "/resources/somegroup/item-0003" |
||||||
|
} |
||||||
|
}, |
||||||
|
"seriesOverrides": [], |
||||||
|
"spaceLength": 10, |
||||||
|
"stack": false, |
||||||
|
"steppedLine": false, |
||||||
|
"targets": [ |
||||||
|
{ |
||||||
|
"expr": "sum( rate( http_requests_duration_seconds_count{uri=\"[[uri]]\"} [5m] ) ) by (uri)", |
||||||
|
"format": "time_series", |
||||||
|
"intervalFactor": 1, |
||||||
|
"legendFormat": "Requests per second", |
||||||
|
"refId": "A" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"expr": "sum(\n rate( http_requests_duration_seconds_sum{uri=\"[[uri]]\"} [5m] ) \n / \n rate( http_requests_duration_seconds_count{uri=\"[[uri]]\"}[5m] ) \n) by (uri)", |
||||||
|
"format": "time_series", |
||||||
|
"intervalFactor": 1, |
||||||
|
"legendFormat": "Average Response Time", |
||||||
|
"refId": "B" |
||||||
|
} |
||||||
|
], |
||||||
|
"thresholds": [], |
||||||
|
"timeFrom": null, |
||||||
|
"timeShift": null, |
||||||
|
"title": "Usage data for URL [[uri]]", |
||||||
|
"tooltip": { |
||||||
|
"shared": true, |
||||||
|
"sort": 0, |
||||||
|
"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": true |
||||||
|
} |
||||||
|
], |
||||||
|
"yaxis": { |
||||||
|
"align": false, |
||||||
|
"alignLevel": null |
||||||
|
} |
||||||
|
} |
||||||
|
], |
||||||
|
"schemaVersion": 16, |
||||||
|
"style": "dark", |
||||||
|
"tags": [], |
||||||
|
"templating": { |
||||||
|
"list": [ |
||||||
|
{ |
||||||
|
"allValue": null, |
||||||
|
"current": { |
||||||
|
"tags": [], |
||||||
|
"text": "/resources/somegroup/item-0015", |
||||||
|
"value": "/resources/somegroup/item-0015" |
||||||
|
}, |
||||||
|
"datasource": "Prometheus", |
||||||
|
"hide": 0, |
||||||
|
"includeAll": false, |
||||||
|
"label": null, |
||||||
|
"multi": true, |
||||||
|
"name": "uri", |
||||||
|
"options": [ |
||||||
|
{ |
||||||
|
"selected": true, |
||||||
|
"text": "/resources/somegroup/item-0003", |
||||||
|
"value": "/resources/somegroup/item-0003" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0004", |
||||||
|
"value": "/resources/somegroup/item-0004" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0005", |
||||||
|
"value": "/resources/somegroup/item-0005" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0006", |
||||||
|
"value": "/resources/somegroup/item-0006" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0007", |
||||||
|
"value": "/resources/somegroup/item-0007" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0008", |
||||||
|
"value": "/resources/somegroup/item-0008" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0010", |
||||||
|
"value": "/resources/somegroup/item-0010" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0012", |
||||||
|
"value": "/resources/somegroup/item-0012" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0013", |
||||||
|
"value": "/resources/somegroup/item-0013" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0014", |
||||||
|
"value": "/resources/somegroup/item-0014" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0015", |
||||||
|
"value": "/resources/somegroup/item-0015" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0016", |
||||||
|
"value": "/resources/somegroup/item-0016" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0017", |
||||||
|
"value": "/resources/somegroup/item-0017" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0019", |
||||||
|
"value": "/resources/somegroup/item-0019" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0020", |
||||||
|
"value": "/resources/somegroup/item-0020" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0021", |
||||||
|
"value": "/resources/somegroup/item-0021" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0024", |
||||||
|
"value": "/resources/somegroup/item-0024" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0025", |
||||||
|
"value": "/resources/somegroup/item-0025" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0027", |
||||||
|
"value": "/resources/somegroup/item-0027" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0028", |
||||||
|
"value": "/resources/somegroup/item-0028" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0002", |
||||||
|
"value": "/resources/somegroup/item-0002" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0009", |
||||||
|
"value": "/resources/somegroup/item-0009" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0011", |
||||||
|
"value": "/resources/somegroup/item-0011" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0018", |
||||||
|
"value": "/resources/somegroup/item-0018" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0022", |
||||||
|
"value": "/resources/somegroup/item-0022" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0023", |
||||||
|
"value": "/resources/somegroup/item-0023" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"selected": false, |
||||||
|
"text": "/resources/somegroup/item-0026", |
||||||
|
"value": "/resources/somegroup/item-0026" |
||||||
|
} |
||||||
|
], |
||||||
|
"query": "http_requests_duration_seconds_count", |
||||||
|
"refresh": 0, |
||||||
|
"regex": "/uri=\\\"(.*?)\\\"/", |
||||||
|
"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": "Variable Repeats", |
||||||
|
"uid": "tEC2sXCiz", |
||||||
|
"version": 4 |
||||||
|
} |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
apiVersion: 1 |
||||||
|
|
||||||
|
deleteDatasources: |
||||||
|
- name: Prometheus |
||||||
|
|
||||||
|
datasources: |
||||||
|
- name: Prometheus |
||||||
|
type: prometheus |
||||||
|
access: proxy |
||||||
|
url: http://prometheus:9090 |
||||||
|
isDefault: true |
||||||
|
version: 1 |
||||||
|
editable: true |
||||||
@ -0,0 +1,63 @@ |
|||||||
|
version: '3.5' |
||||||
|
|
||||||
|
services: |
||||||
|
|
||||||
|
generator: |
||||||
|
# image: registry.labbs.com.br/barimetrics/metrics-generator-tabajara |
||||||
|
# build: . |
||||||
|
image: labbsr0x/metrics-generator-tabajara |
||||||
|
environment: |
||||||
|
- COMPONENT_NAME=testserver |
||||||
|
- COMPONENT_VERSION=1.0.0 |
||||||
|
- ACCIDENT_RESOURCE=transaction-080 |
||||||
|
- ACCIDENT_TYPE=latency |
||||||
|
- ACCIDENT_RATIO=100 |
||||||
|
ports: |
||||||
|
- 3000:3000 |
||||||
|
|
||||||
|
grafana: |
||||||
|
# image: flaviostutz/grafana |
||||||
|
build: . |
||||||
|
ports: |
||||||
|
- 4000:3000 |
||||||
|
volumes: |
||||||
|
- grafana:/data |
||||||
|
|
||||||
|
prometheus: |
||||||
|
image: flaviostutz/prometheus |
||||||
|
# ports: |
||||||
|
# - 9090:9090 |
||||||
|
environment: |
||||||
|
- STATIC_SCRAPE_TARGETS=generator@generator:3000 |
||||||
|
volumes: |
||||||
|
- prometheus:/prometheus |
||||||
|
|
||||||
|
# promfrom: |
||||||
|
# image: prom/prometheus:latest |
||||||
|
# ports: |
||||||
|
# - 9090:9090 |
||||||
|
# volumes: |
||||||
|
# - ./prometheus1.yml:/etc/prometheus/prometheus.yml |
||||||
|
# - promfrom:/prometheus |
||||||
|
|
||||||
|
finalprom: |
||||||
|
image: prom/prometheus:latest |
||||||
|
ports: |
||||||
|
- 9090:9090 |
||||||
|
volumes: |
||||||
|
- ./rules.yml:/etc/prometheus/rules.yml |
||||||
|
- ./prometheus2.yml:/etc/prometheus/prometheus.yml |
||||||
|
- finalprom:/prometheus |
||||||
|
|
||||||
|
networks: |
||||||
|
default: |
||||||
|
ipam: |
||||||
|
driver: default |
||||||
|
config: |
||||||
|
- subnet: 192.168.15.0/24 |
||||||
|
|
||||||
|
volumes: |
||||||
|
grafana: |
||||||
|
promfrom: |
||||||
|
prometheus: |
||||||
|
finalprom: |
||||||
@ -0,0 +1,14 @@ |
|||||||
|
global: |
||||||
|
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. |
||||||
|
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. |
||||||
|
scrape_configs: |
||||||
|
- job_name: 'federate' # Job name |
||||||
|
honor_labels: true |
||||||
|
metrics_path: /federate |
||||||
|
params: |
||||||
|
match[]: |
||||||
|
- '{__name__=~".+"}' |
||||||
|
static_configs: |
||||||
|
- targets: ['prometheus:9090'] # address and port |
||||||
|
labels: |
||||||
|
alias: 'federate' # alias name given to this instance |
||||||
@ -0,0 +1,18 @@ |
|||||||
|
global: |
||||||
|
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. |
||||||
|
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. |
||||||
|
rule_files: |
||||||
|
- '/etc/prometheus/rules.yml' |
||||||
|
scrape_configs: |
||||||
|
- job_name: 'federate' # Job name |
||||||
|
honor_labels: true |
||||||
|
metrics_path: /federate |
||||||
|
params: |
||||||
|
'match[]': |
||||||
|
# - '{job=~".+", job="generator"}' |
||||||
|
- '{component_name=~".+", component_name!="testserver"}' |
||||||
|
# - '{__name__=~".+", __name__="http_requests_app_total"}' |
||||||
|
static_configs: |
||||||
|
- targets: ['prometheus:9090'] # address and port |
||||||
|
labels: |
||||||
|
alias: 'federate' # alias name given to this instance |
||||||
Loading…
Reference in new issue