forked from mtusi2026/mtusi2026lab7
ЛР 7: Безопасность, mTLS и OpenBao
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"annotations": {"list": []},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 1,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "HTTP RPS",
|
||||
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 0},
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"targets": [{"expr": "sum(rate(messenger_http_requests_total[$__rate_interval]))","legendFormat":"requests/s","refId":"A"}]
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "HTTP 5xx ratio",
|
||||
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 0},
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"targets": [{"expr":"sum(rate(messenger_http_requests_total{status_class=\"5xx\"}[$__rate_interval])) / clamp_min(sum(rate(messenger_http_requests_total[$__rate_interval])), 1e-9)","legendFormat":"5xx ratio","refId":"A"}]
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "HTTP duration p95",
|
||||
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 8},
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"targets": [{"expr":"histogram_quantile(0.95, sum(rate(messenger_http_duration_seconds_bucket[$__rate_interval])) by (le))","legendFormat":"p95","refId":"A"}]
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Image jobs",
|
||||
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 8},
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"targets": [{"expr":"sum by (outcome) (rate(messenger_jobs_processed_total[$__rate_interval]))","legendFormat":"{{outcome}}","refId":"A"}]
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Worker duration p95",
|
||||
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 16},
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"targets": [{"expr":"histogram_quantile(0.95, sum(rate(messenger_job_duration_seconds_bucket[$__rate_interval])) by (le))","legendFormat":"p95","refId":"A"}]
|
||||
},
|
||||
{
|
||||
"type": "logs",
|
||||
"title": "API and worker logs",
|
||||
"gridPos": {"h": 10, "w": 12, "x": 12, "y": 16},
|
||||
"datasource": {"type": "loki", "uid": "loki"},
|
||||
"targets": [{"expr":"{service_name=~\"messenger-api|messenger-worker\"}","refId":"A"}]
|
||||
},
|
||||
{
|
||||
"type": "traces",
|
||||
"title": "Recent traces",
|
||||
"gridPos": {"h": 10, "w": 24, "x": 0, "y": 26},
|
||||
"datasource": {"type": "tempo", "uid": "tempo"},
|
||||
"targets": [{"queryType":"traceql","query":"{}","refId":"A","limit":20}]
|
||||
}
|
||||
],
|
||||
"refresh": "10s",
|
||||
"schemaVersion": 39,
|
||||
"style": "dark",
|
||||
"tags": ["lab6", "messenger", "otel"],
|
||||
"templating": {"list": []},
|
||||
"time": {"from": "now-15m", "to": "now"},
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "Messenger Observability",
|
||||
"uid": "messenger-lab6",
|
||||
"version": 1,
|
||||
"weekStart": ""
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: 1
|
||||
|
||||
providers:
|
||||
- name: Lab6
|
||||
orgId: 1
|
||||
folder: Lab6
|
||||
type: file
|
||||
disableDeletion: false
|
||||
updateIntervalSeconds: 10
|
||||
allowUiUpdates: true
|
||||
options:
|
||||
path: /var/lib/grafana/dashboards
|
||||
@@ -0,0 +1,35 @@
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: Prometheus
|
||||
uid: prometheus
|
||||
type: prometheus
|
||||
access: proxy
|
||||
url: https://prometheus:9090
|
||||
jsonData:
|
||||
tlsSkipVerify: false
|
||||
isDefault: true
|
||||
editable: false
|
||||
|
||||
- name: Loki
|
||||
uid: loki
|
||||
type: loki
|
||||
access: proxy
|
||||
url: https://loki:3100
|
||||
jsonData:
|
||||
tlsSkipVerify: false
|
||||
editable: false
|
||||
|
||||
- name: Tempo
|
||||
uid: tempo
|
||||
type: tempo
|
||||
access: proxy
|
||||
url: https://tempo:3200
|
||||
jsonData:
|
||||
tlsSkipVerify: false
|
||||
tracesToLogsV2:
|
||||
datasourceUid: loki
|
||||
filterByTraceID: true
|
||||
filterBySpanID: false
|
||||
tracesToMetrics:
|
||||
datasourceUid: prometheus
|
||||
Reference in New Issue
Block a user