- nexus-postgresql.json: connections, transactions, cache hit, WAL, slow queries, table bloat - nexus-redis.json: memory, commands/sec, clients, cache hit, keyspace hits/misses, evicted keys - nexus-system.json: CPU, memory, disk, network, load average - nexus-gunicorn.json: request rate, response time, workers, 5xx errors, memory per worker - dashboards.yml: auto-provisioning config
150 lines
4.1 KiB
JSON
150 lines
4.1 KiB
JSON
{
|
|
"uid": "nexus-app",
|
|
"title": "Nexus — Application",
|
|
"tags": ["gunicorn", "flask"],
|
|
"timezone": "browser",
|
|
"schemaVersion": 36,
|
|
"refresh": "30s",
|
|
"time": {
|
|
"from": "now-1h",
|
|
"to": "now"
|
|
},
|
|
"templating": {
|
|
"list": [
|
|
{
|
|
"name": "datasource",
|
|
"type": "datasource",
|
|
"query": "prometheus",
|
|
"current": {
|
|
"selected": false,
|
|
"text": "Prometheus",
|
|
"value": "Prometheus"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"panels": [
|
|
{
|
|
"id": 1,
|
|
"title": "Request Rate (nginx)",
|
|
"type": "timeseries",
|
|
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 0},
|
|
"datasource": {"type": "prometheus", "uid": "${datasource}"},
|
|
"targets": [
|
|
{
|
|
"datasource": {"type": "prometheus", "uid": "${datasource}"},
|
|
"expr": "rate(nginx_http_requests_total[5m])",
|
|
"legendFormat": "Requests/sec",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {"drawStyle": "line", "lineWidth": 2, "fillOpacity": 10},
|
|
"unit": "reqps",
|
|
"min": 0
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 2,
|
|
"title": "Response Time (nginx)",
|
|
"type": "timeseries",
|
|
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 0},
|
|
"datasource": {"type": "prometheus", "uid": "${datasource}"},
|
|
"targets": [
|
|
{
|
|
"datasource": {"type": "prometheus", "uid": "${datasource}"},
|
|
"expr": "histogram_quantile(0.95, sum(rate(nginx_http_request_duration_seconds_bucket[5m])) by (le))",
|
|
"legendFormat": "p95",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"datasource": {"type": "prometheus", "uid": "${datasource}"},
|
|
"expr": "histogram_quantile(0.99, sum(rate(nginx_http_request_duration_seconds_bucket[5m])) by (le))",
|
|
"legendFormat": "p99",
|
|
"refId": "B"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {"drawStyle": "line", "lineWidth": 2, "fillOpacity": 10},
|
|
"unit": "s",
|
|
"min": 0
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 3,
|
|
"title": "Active Workers",
|
|
"type": "timeseries",
|
|
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 8},
|
|
"datasource": {"type": "prometheus", "uid": "${datasource}"},
|
|
"targets": [
|
|
{
|
|
"datasource": {"type": "prometheus", "uid": "${datasource}"},
|
|
"expr": "count by (instance) (node_processes_state{state=\"S\", cmdline=~\".*gunicorn.*\"})",
|
|
"legendFormat": "Workers {{instance}}",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {"drawStyle": "line", "lineWidth": 2, "fillOpacity": 10},
|
|
"unit": "short",
|
|
"min": 0
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 4,
|
|
"title": "5xx Errors",
|
|
"type": "timeseries",
|
|
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 8},
|
|
"datasource": {"type": "prometheus", "uid": "${datasource}"},
|
|
"targets": [
|
|
{
|
|
"datasource": {"type": "prometheus", "uid": "${datasource}"},
|
|
"expr": "rate(nginx_http_requests_total{status=~\"5..\"}[5m])",
|
|
"legendFormat": "5xx/sec",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {"drawStyle": "line", "lineWidth": 2, "fillOpacity": 10},
|
|
"unit": "reqps",
|
|
"min": 0
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 5,
|
|
"title": "Memory per Worker",
|
|
"type": "timeseries",
|
|
"gridPos": {"h": 8, "w": 24, "x": 0, "y": 16},
|
|
"datasource": {"type": "prometheus", "uid": "${datasource}"},
|
|
"targets": [
|
|
{
|
|
"datasource": {"type": "prometheus", "uid": "${datasource}"},
|
|
"expr": "process_resident_memory_bytes{cmdline=~\".*gunicorn.*\"} / 1024 / 1024",
|
|
"legendFormat": "{{cmdline}}",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {"drawStyle": "line", "lineWidth": 2, "fillOpacity": 10},
|
|
"unit": "mbytes",
|
|
"min": 0
|
|
},
|
|
"overrides": []
|
|
}
|
|
}
|
|
]
|
|
}
|