Implement lab6 observability stack

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-11-16 21:14:03 +03:00
co-authored by Copilot
parent 470d9d6f1e
commit 3fffaa9966
26 changed files with 1887 additions and 31 deletions
+11
View File
@@ -0,0 +1,11 @@
{
"title": "Messenger lab6",
"schemaVersion": 39,
"panels": [
{"type":"timeseries","title":"HTTP requests","targets":[{"expr":"sum(rate(messenger_http_requests_total[1m]))","legendFormat":"RPS"}]},
{"type":"timeseries","title":"HTTP errors","targets":[{"expr":"sum(rate(messenger_http_errors_total[1m]))","legendFormat":"5xx"}]},
{"type":"stat","title":"Requests seen","targets":[{"expr":"messenger_http_requests_seen_total"}]}
],
"templating": {"list":[]},
"time": {"from":"now-15m","to":"now"}
}
@@ -0,0 +1,6 @@
apiVersion: 1
providers:
- name: messenger
type: file
options:
path: /var/lib/grafana/dashboards
+7
View File
@@ -0,0 +1,7 @@
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
url: http://prometheus:9090
isDefault: true
+29
View File
@@ -0,0 +1,29 @@
receivers:
otlp:
protocols:
grpc:
http:
processors:
memory_limiter:
check_interval: 1s
limit_mib: 128
batch:
exporters:
prometheus:
endpoint: "0.0.0.0:9464"
debug:
verbosity: basic
service:
pipelines:
metrics:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [prometheus]
traces:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [debug]
logs:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [debug]
+10
View File
@@ -0,0 +1,10 @@
global:
scrape_interval: 5s
scrape_configs:
- job_name: messenger-api
metrics_path: /metrics
static_configs:
- targets: ["api1:8080", "api2:8080"]
- job_name: otel-collector
static_configs:
- targets: ["otel-collector:9464"]