Add monitoring stack: Prometheus, Alertmanager, Grafana
This commit is contained in:
35
monitoring/grafana/dashboards/webapp.json
Normal file
35
monitoring/grafana/dashboards/webapp.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"title": "Webapp Overview",
|
||||
"uid": "webapp-overview",
|
||||
"schemaVersion": 39,
|
||||
"refresh": "10s",
|
||||
"time": { "from": "now-15m", "to": "now" },
|
||||
"panels": [
|
||||
{
|
||||
"id": 1, "type": "stat", "title": "Webapp up (1 = yes)",
|
||||
"gridPos": { "x": 0, "y": 0, "w": 6, "h": 6 },
|
||||
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
||||
"targets": [ { "refId": "A", "expr": "up{job=\"webapp\"}" } ]
|
||||
},
|
||||
{
|
||||
"id": 2, "type": "timeseries", "title": "Request rate by path (req/s)",
|
||||
"gridPos": { "x": 6, "y": 0, "w": 18, "h": 6 },
|
||||
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
||||
"targets": [ { "refId": "A", "expr": "sum by (path) (rate(http_requests_total[1m]))", "legendFormat": "{{path}}" } ]
|
||||
},
|
||||
{
|
||||
"id": 3, "type": "timeseries", "title": "5xx error ratio",
|
||||
"gridPos": { "x": 0, "y": 6, "w": 12, "h": 8 },
|
||||
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
||||
"fieldConfig": { "defaults": { "unit": "percentunit" }, "overrides": [] },
|
||||
"targets": [ { "refId": "A", "expr": "sum(rate(http_requests_total{status=~\"5..\"}[1m])) / sum(rate(http_requests_total[1m]))", "legendFormat": "5xx ratio" } ]
|
||||
},
|
||||
{
|
||||
"id": 4, "type": "timeseries", "title": "p95 latency (s)",
|
||||
"gridPos": { "x": 12, "y": 6, "w": 12, "h": 8 },
|
||||
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
||||
"fieldConfig": { "defaults": { "unit": "s" }, "overrides": [] },
|
||||
"targets": [ { "refId": "A", "expr": "histogram_quantile(0.95, sum by (le) (rate(http_request_duration_seconds_bucket[5m])))", "legendFormat": "p95" } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
apiVersion: 1
|
||||
providers:
|
||||
- name: default
|
||||
folder: ""
|
||||
type: file
|
||||
options:
|
||||
path: /var/lib/grafana/dashboards
|
||||
@@ -0,0 +1,8 @@
|
||||
apiVersion: 1
|
||||
datasources:
|
||||
- name: Prometheus
|
||||
type: prometheus
|
||||
uid: prometheus
|
||||
access: proxy
|
||||
url: http://prometheus:9090
|
||||
isDefault: true
|
||||
Reference in New Issue
Block a user