Spaces:
Sleeping
Sleeping
Melika Kheirieh
commited on
Commit
·
8103714
1
Parent(s):
5e6809d
fix(grafana): move nl2sql.json into provisioning folder and fix dashboard mount path
Browse files
docker-compose.prom.yml
CHANGED
|
@@ -1,5 +1,3 @@
|
|
| 1 |
-
version: "3.8"
|
| 2 |
-
|
| 3 |
services:
|
| 4 |
prometheus:
|
| 5 |
image: prom/prometheus:v2.55.0
|
|
@@ -10,16 +8,16 @@ services:
|
|
| 10 |
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
| 11 |
- ./prometheus/rules.yml:/etc/prometheus/rules.yml:ro
|
| 12 |
ports:
|
| 13 |
-
- "9090:9090"
|
| 14 |
networks:
|
| 15 |
-
- observability
|
| 16 |
restart: unless-stopped
|
| 17 |
|
| 18 |
grafana:
|
| 19 |
image: grafana/grafana:latest
|
| 20 |
container_name: nl2sql-grafana
|
| 21 |
ports:
|
| 22 |
-
- "3000:3000"
|
| 23 |
depends_on:
|
| 24 |
- prometheus
|
| 25 |
environment:
|
|
@@ -27,15 +25,16 @@ services:
|
|
| 27 |
- GF_SECURITY_ADMIN_PASSWORD=admin
|
| 28 |
- GF_USERS_ALLOW_SIGN_UP=false
|
| 29 |
- GF_AUTH_ANONYMOUS_ENABLED=false
|
| 30 |
-
# Optional
|
| 31 |
- GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/provisioning/dashboards/nl2sql.json
|
| 32 |
volumes:
|
| 33 |
-
# Provisioning (
|
| 34 |
- ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources:ro
|
| 35 |
- ./grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards:ro
|
| 36 |
-
|
| 37 |
-
# The actual dashboard JSON (mounted into the same dashboards dir)
|
| 38 |
-
- ./prometheus/grafana_dashboard.json:/etc/grafana/provisioning/dashboards/nl2sql.json:ro
|
| 39 |
networks:
|
| 40 |
- observability
|
| 41 |
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
services:
|
| 2 |
prometheus:
|
| 3 |
image: prom/prometheus:v2.55.0
|
|
|
|
| 8 |
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
| 9 |
- ./prometheus/rules.yml:/etc/prometheus/rules.yml:ro
|
| 10 |
ports:
|
| 11 |
+
- "9090:9090" # Prometheus UI
|
| 12 |
networks:
|
| 13 |
+
- observability # attach to custom network
|
| 14 |
restart: unless-stopped
|
| 15 |
|
| 16 |
grafana:
|
| 17 |
image: grafana/grafana:latest
|
| 18 |
container_name: nl2sql-grafana
|
| 19 |
ports:
|
| 20 |
+
- "3000:3000"
|
| 21 |
depends_on:
|
| 22 |
- prometheus
|
| 23 |
environment:
|
|
|
|
| 25 |
- GF_SECURITY_ADMIN_PASSWORD=admin
|
| 26 |
- GF_USERS_ALLOW_SIGN_UP=false
|
| 27 |
- GF_AUTH_ANONYMOUS_ENABLED=false
|
| 28 |
+
# Optional: set home dashboard to our JSON inside the mounted folder
|
| 29 |
- GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/provisioning/dashboards/nl2sql.json
|
| 30 |
volumes:
|
| 31 |
+
# Provisioning folders (read-only)
|
| 32 |
- ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources:ro
|
| 33 |
- ./grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards:ro
|
|
|
|
|
|
|
|
|
|
| 34 |
networks:
|
| 35 |
- observability
|
| 36 |
restart: unless-stopped
|
| 37 |
+
|
| 38 |
+
networks:
|
| 39 |
+
observability:
|
| 40 |
+
driver: bridge # define the custom network
|
grafana/provisioning/dashboards/nl2sql.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"title": "NL2SQL Copilot - Observability",
|
| 3 |
+
"editable": true,
|
| 4 |
+
"panels": [
|
| 5 |
+
{
|
| 6 |
+
"type": "timeseries",
|
| 7 |
+
"title": "Stage p95 Latency (ms)",
|
| 8 |
+
"targets": [
|
| 9 |
+
{
|
| 10 |
+
"expr": "nl2sql:stage_p95_ms",
|
| 11 |
+
"legendFormat": "{{stage}}",
|
| 12 |
+
"refId": "A"
|
| 13 |
+
}
|
| 14 |
+
],
|
| 15 |
+
"fieldConfig": {
|
| 16 |
+
"defaults": {
|
| 17 |
+
"unit": "milliseconds",
|
| 18 |
+
"decimals": 0
|
| 19 |
+
}
|
| 20 |
+
},
|
| 21 |
+
"id": 1
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"type": "timeseries",
|
| 25 |
+
"title": "Pipeline Success Ratio",
|
| 26 |
+
"targets": [
|
| 27 |
+
{
|
| 28 |
+
"expr": "nl2sql:pipeline_success_ratio",
|
| 29 |
+
"legendFormat": "success ratio",
|
| 30 |
+
"refId": "B"
|
| 31 |
+
}
|
| 32 |
+
],
|
| 33 |
+
"fieldConfig": {
|
| 34 |
+
"defaults": {
|
| 35 |
+
"min": 0,
|
| 36 |
+
"max": 1,
|
| 37 |
+
"decimals": 2
|
| 38 |
+
}
|
| 39 |
+
},
|
| 40 |
+
"id": 2
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"type": "timeseries",
|
| 44 |
+
"title": "Safety & Verifier Events",
|
| 45 |
+
"targets": [
|
| 46 |
+
{
|
| 47 |
+
"expr": "rate(safety_blocks_total[5m])",
|
| 48 |
+
"legendFormat": "safety blocks/min",
|
| 49 |
+
"refId": "C"
|
| 50 |
+
},
|
| 51 |
+
{
|
| 52 |
+
"expr": "rate(verifier_failures_total[5m])",
|
| 53 |
+
"legendFormat": "verifier failures/min",
|
| 54 |
+
"refId": "D"
|
| 55 |
+
}
|
| 56 |
+
],
|
| 57 |
+
"fieldConfig": {
|
| 58 |
+
"defaults": {
|
| 59 |
+
"min": 0
|
| 60 |
+
}
|
| 61 |
+
},
|
| 62 |
+
"id": 3
|
| 63 |
+
}
|
| 64 |
+
],
|
| 65 |
+
"schemaVersion": 38,
|
| 66 |
+
"version": 1,
|
| 67 |
+
"refresh": "30s"
|
| 68 |
+
}
|