40 lines
985 B
Plaintext
40 lines
985 B
Plaintext
events {}
|
|
|
|
http {
|
|
map $ssl_client_s_dn $ingest_allowed {
|
|
default 0;
|
|
CN=otel-api 1;
|
|
CN=otel-worker 1;
|
|
CN=otel-publisher 1;
|
|
}
|
|
|
|
server {
|
|
listen 4318 ssl;
|
|
ssl_certificate /run/tls/server.crt;
|
|
ssl_certificate_key /run/tls/server.key;
|
|
ssl_client_certificate /run/tls/otel-ingest-ca.crt;
|
|
ssl_verify_client on;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
|
|
location ~ ^/v1/(logs|metrics|traces)$ {
|
|
if ($ingest_allowed = 0) { return 403; }
|
|
proxy_pass http://127.0.0.1:14318;
|
|
}
|
|
|
|
location / { return 404; }
|
|
}
|
|
|
|
server {
|
|
listen 8888 ssl;
|
|
ssl_certificate /run/tls/server.crt;
|
|
ssl_certificate_key /run/tls/server.key;
|
|
ssl_client_certificate /run/tls/otel-scrape-ca.crt;
|
|
ssl_verify_client on;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
|
|
location = /metrics {
|
|
proxy_pass http://127.0.0.1:8887;
|
|
}
|
|
}
|
|
}
|