[+] add project
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
2026-12-05 22:05:31 +03:00
parent 20afc2c790
commit 1d146756d7
63 changed files with 3501 additions and 149 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
# Конфигурация наблюдаемости — реализовать
Добавьте `collector.yaml` с OTLP receivers, processors и exporters выбранной версии Collector. Укажите явные bind endpoints, внутренние сети, memory limits/batch и поведение при backpressure по уровню. Сопоставьте все три pipeline с реально развёрнутыми backend.
Добавьте `collector.yaml` с OTLP receivers, processors и exporters выбранной версии Collector. Укажите явные bind endpoints, внутренние сети, memory limits/batch и поведение при backpressure. Сопоставьте все три pipeline с реально развёрнутыми backend.
Добавьте конфигурации storage, Grafana provisioning/datasources, provisioning/dashboards и импортируемые dashboard JSON. На 4 — alert rules и runbooks. Пустой dashboard или debug exporter, который только печатает данные в stdout, не заменяют хранилища/доказательства из `contracts/observability.md`.
Добавьте конфигурации storage, Grafana provisioning/datasources, provisioning/dashboards и импортируемые dashboard JSON. Пустой dashboard или debug exporter, который только печатает данные в stdout, не заменяют хранилища/доказательства из `contracts/observability.md`.
Не публикуйте OTLP/metrics/административные ports в общую сеть без необходимости. В lab7 реализуйте TLS/mTLS по trust matrix; экспорт Authorization и message bodies запрещён.
+62
View File
@@ -0,0 +1,62 @@
extensions:
health_check:
endpoint: 0.0.0.0:13133
tls:
cert_file: /run/certs/server.crt
key_file: /run/certs/server.key
client_ca_file: /run/certs/ca.crt
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
tls:
cert_file: /run/certs/server.crt
key_file: /run/certs/server.key
client_ca_file: /run/certs/ca.crt
http:
endpoint: 0.0.0.0:4318
tls:
cert_file: /run/certs/server.crt
key_file: /run/certs/server.key
client_ca_file: /run/certs/ca.crt
processors:
memory_limiter:
check_interval: 1s
limit_mib: 256
spike_limit_mib: 64
batch:
send_batch_size: 512
timeout: 5s
exporters:
otlp/tempo:
endpoint: tempo:4317
tls:
ca_file: /run/certs/ca.crt
otlphttp/loki:
endpoint: https://loki:3100/otlp
tls:
ca_file: /run/certs/ca.crt
prometheusremotewrite:
endpoint: https://prometheus:9090/api/v1/write
tls:
ca_file: /run/certs/ca.crt
service:
extensions: [health_check]
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [otlp/tempo]
metrics:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [prometheusremotewrite]
logs:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [otlphttp/loki]
+68
View File
@@ -0,0 +1,68 @@
{
"id": null,
"uid": "lab7-stack-health",
"title": "Lab 7 stack health",
"tags": ["lab7"],
"timezone": "browser",
"schemaVersion": 39,
"version": 1,
"refresh": "30s",
"time": {
"from": "now-1h",
"to": "now"
},
"panels": [
{
"id": 1,
"type": "stat",
"title": "Prometheus targets up",
"datasource": {
"type": "prometheus",
"uid": "prom-lab7"
},
"targets": [
{
"refId": "A",
"expr": "sum(up)",
"instant": true
}
],
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"options": {
"reduceOptions": {
"values": false,
"calcs": ["lastNotNull"],
"fields": ""
},
"orientation": "auto",
"textMode": "auto",
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto"
},
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 1
}
]
}
},
"overrides": []
}
}
]
}
+10
View File
@@ -0,0 +1,10 @@
apiVersion: 1
providers:
- name: lab7
orgId: 1
folder: Lab 7
type: file
disableDeletion: true
editable: false
options:
path: /var/lib/grafana/dashboards
+39
View File
@@ -0,0 +1,39 @@
apiVersion: 1
datasources:
- name: Prometheus
uid: prom-lab7
type: prometheus
access: proxy
url: https://prometheus:9090
isDefault: true
editable: false
jsonData:
tlsAuthWithCACert: true
tlsSkipVerify: false
serverName: prometheus
secureJsonData:
tlsCACert: "$__file{/run/certs/ca.crt}"
- name: Loki
uid: loki-lab7
type: loki
access: proxy
url: https://loki:3100
editable: false
jsonData:
tlsAuthWithCACert: true
tlsSkipVerify: false
serverName: loki
secureJsonData:
tlsCACert: "$__file{/run/certs/ca.crt}"
- name: Tempo
uid: tempo-lab7
type: tempo
access: proxy
url: https://tempo:3200
editable: false
jsonData:
tlsAuthWithCACert: true
tlsSkipVerify: false
serverName: tempo
secureJsonData:
tlsCACert: "$__file{/run/certs/ca.crt}"
+39
View File
@@ -0,0 +1,39 @@
auth_enabled: false
server:
http_listen_address: 0.0.0.0
http_listen_port: 3100
http_tls_config:
cert_file: /run/certs/server.crt
key_file: /run/certs/server.key
grpc_listen_port: 9096
grpc_tls_config:
cert_file: /run/certs/server.crt
key_file: /run/certs/server.key
common:
path_prefix: /loki
replication_factor: 1
ring:
kvstore:
store: inmemory
storage:
filesystem:
chunks_directory: /loki/chunks
rules_directory: /loki/rules
schema_config:
configs:
- from: 2024-01-01
store: tsdb
object_store: filesystem
schema: v13
index:
prefix: index_
period: 24h
limits_config:
allow_structured_metadata: true
analytics:
reporting_enabled: false
+3
View File
@@ -0,0 +1,3 @@
tls_server_config:
cert_file: /run/certs/server.crt
key_file: /run/certs/server.key
+13
View File
@@ -0,0 +1,13 @@
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: prometheus
scheme: https
static_configs:
- targets: ["prometheus:9090"]
tls_config:
ca_file: /run/certs/ca.crt
server_name: prometheus
+36
View File
@@ -0,0 +1,36 @@
server:
http_listen_port: 3200
http_tls_config:
cert_file: /run/certs/server.crt
key_file: /run/certs/server.key
distributor:
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
tls:
cert_file: /run/certs/server.crt
key_file: /run/certs/server.key
http:
endpoint: 0.0.0.0:4318
tls:
cert_file: /run/certs/server.crt
key_file: /run/certs/server.key
ingester:
max_block_duration: 5m
trace_idle_period: 10s
compactor:
compaction:
block_retention: 24h
storage:
trace:
backend: local
wal:
path: /var/tempo/wal
local:
path: /var/tempo/blocks