Fixing Signoz OTEL collector config.
Gitea Branch PR & Ansible Deployment / Check and Create PR (push) Successful in 27s
Gitea Branch PR & Ansible Deployment / Ansible Dry Run (rikku) (push) Successful in 5m11s
Gitea Branch PR & Ansible Deployment / Ansible Dry Run (benedikta) (push) Successful in 5m32s
Gitea Branch PR & Ansible Deployment / Ansible Dry Run (rinoa) (push) Successful in 7m35s
Gitea Branch PR & Ansible Deployment / PR Merge (push) Successful in 39s
Gitea Branch PR & Ansible Deployment / Ansible Config Deployment (rikku) (push) Successful in 3m45s
Gitea Branch PR & Ansible Deployment / Ansible Config Deployment (benedikta) (push) Successful in 4m6s
Gitea Branch PR & Ansible Deployment / Ansible Config Deployment (rinoa) (push) Failing after 4m12s

This commit is contained in:
2025-10-05 11:03:47 -04:00
parent 3a3795a6fc
commit ecf663a4bd
@@ -2,14 +2,16 @@ receivers:
httplogreceiver/json: httplogreceiver/json:
endpoint: 0.0.0.0:8082 endpoint: 0.0.0.0:8082
source: json source: json
otlp: otlp:
protocols: protocols:
grpc: grpc:
endpoint: 0.0.0.0:4317 endpoint: 0.0.0.0:4317
http: http:
endpoint: 0.0.0.0:4318 endpoint: 0.0.0.0:4318
hostmetrics: hostmetrics:
collection_interval: 60s # Frequency of metrics collection. collection_interval: 60s
scrapers: scrapers:
cpu: {} cpu: {}
load: {} load: {}
@@ -17,6 +19,7 @@ receivers:
disk: {} disk: {}
filesystem: {} filesystem: {}
network: {} network: {}
docker_stats: docker_stats:
endpoint: unix:///var/run/docker.sock endpoint: unix:///var/run/docker.sock
collection_interval: 30s collection_interval: 30s
@@ -35,17 +38,14 @@ receivers:
enabled: true enabled: true
container.network.io.usage.tx_packets: container.network.io.usage.tx_packets:
enabled: true enabled: true
filelog/nginx-access-logs: filelog/nginx-access-logs:
include: ["${env:NGINX_ACCESS_LOG_FILE}"] include: ["${env:NGINX_ACCESS_LOG_FILE}"]
operators: operators:
# Parse the default nginx access log format. Nginx defaults to the "combined" log format
# $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"
# For more details, see https://nginx.org/en/docs/http/ngx_http_log_module.html
- type: regex_parser - type: regex_parser
if: body matches '^(?P<remote_addr>[0-9\\.]+) - (?P<remote_user>[^\\s]+) \\[(?P<ts>.+)\\] "(?P<request_method>\\w+?) (?P<request_path>.+?)" (?P<status>[0-9]+) (?P<body_bytes_sent>[0-9]+) "(?P<http_referrer>.+?)" "(?P<http_user_agent>.+?)"$' regex: '^(?P<remote_addr>[0-9\.]+) - (?P<remote_user>[^\s]+) \[(?P<ts>.+)\] "(?P<request_method>\w+?) (?P<request_path>.+?)" (?P<status>[0-9]+) (?P<body_bytes_sent>[0-9]+) "(?P<http_referrer>.+?)" "(?P<http_user_agent>.+?)"$'
parse_from: body parse_from: body
parse_to: attributes parse_to: attributes
regex: '^(?P<remote_addr>[0-9\.]+) - (?P<remote_user>[^\s]+) \[(?P<ts>.+)\] "(?P<request_method>\w+?) (?P<request_path>.+?)" (?P<status>[0-9]+) (?P<body_bytes_sent>[0-9]+) "(?P<http_referrer>.+?)" "(?P<http_user_agent>.+?)"$'
timestamp: timestamp:
parse_from: attributes.ts parse_from: attributes.ts
layout: "02/Jan/2006:15:04:05 -0700" layout: "02/Jan/2006:15:04:05 -0700"
@@ -55,13 +55,10 @@ receivers:
overwrite_text: true overwrite_text: true
mapping: mapping:
debug: "1xx" debug: "1xx"
info: info: ["2xx", "3xx"]
- "2xx"
- "3xx"
warn: "4xx" warn: "4xx"
error: "5xx" error: "5xx"
- type: remove - type: remove
if: attributes.ts != nil
field: attributes.ts field: attributes.ts
- type: add - type: add
field: attributes.source field: attributes.source
@@ -70,14 +67,10 @@ receivers:
filelog/nginx-error-logs: filelog/nginx-error-logs:
include: ["${env:NGINX_ERROR_LOG_FILE}"] include: ["${env:NGINX_ERROR_LOG_FILE}"]
operators: operators:
# Parse the default nginx error log format.
# YYYY/MM/DD HH:MM:SS [LEVEL] PID#TID: *CID MESSAGE
# For more details, see https://github.com/phusion/nginx/blob/master/src/core/ngx_log.c
- type: regex_parser - type: regex_parser
if: body matches '^(?P<ts>.+?) \\[(?P<log_level>\\w+)\\] (?P<pid>\\d+)#(?P<tid>\\d+). \\*(?P<cid>\\d+) (?P<message>.+)$' regex: '^(?P<ts>.+?) \[(?P<log_level>\w+)\] (?P<pid>\d+)#(?P<tid>\d+). \*(?P<cid>\d+) (?P<message>.+)$'
parse_from: body parse_from: body
parse_to: attributes parse_to: attributes
regex: '^(?P<ts>.+?) \[(?P<log_level>\w+)\] (?P<pid>\d+)#(?P<tid>\d+). \*(?P<cid>\d+) (?P<message>.+)$'
timestamp: timestamp:
parse_from: attributes.ts parse_from: attributes.ts
layout: "2006/01/02 15:04:05" layout: "2006/01/02 15:04:05"
@@ -87,25 +80,19 @@ receivers:
overwrite_text: true overwrite_text: true
mapping: mapping:
debug: "debug" debug: "debug"
info: info: ["info", "notice"]
- "info"
- "notice"
warn: "warn" warn: "warn"
error: error: ["error", "crit", "alert"]
- "error"
- "crit"
- "alert"
fatal: "emerg" fatal: "emerg"
- type: remove - type: remove
if: attributes.ts != nil
field: attributes.ts field: attributes.ts
- type: move - type: move
if: attributes.message != nil
from: attributes.message from: attributes.message
to: body to: body
- type: add - type: add
field: attributes.source field: attributes.source
value: nginx value: nginx
prometheus: prometheus:
config: config:
global: global:
@@ -113,35 +100,31 @@ receivers:
scrape_configs: scrape_configs:
- job_name: otel-collector - job_name: otel-collector
static_configs: static_configs:
- targets: - targets: ["localhost:8888"]
- localhost:8888 labels:
labels: job_name: otel-collector
job_name: otel-collector
processors: processors:
batch: batch:
send_batch_size: 10000 send_batch_size: 10000
send_batch_max_size: 11000 send_batch_max_size: 11000
timeout: 10s timeout: 10s
resourcedetection: resourcedetection:
detectors: [env, system] detectors: [env, system]
system:
hostname_sources: [os]
resourcedetection/env:
detectors: [env]
timeout: 2s timeout: 2s
override: false
resourcedetection/system:
detectors: ["system"]
system: system:
hostname_sources: ["dns", "os"] hostname_sources: ["dns", "os"]
resourcedetection/docker: resourcedetection/docker:
detectors: [env, docker] detectors: [env, docker]
timeout: 2s timeout: 2s
override: false override: false
signozspanmetrics/delta: signozspanmetrics/delta:
metrics_exporter: signozclickhousemetrics metrics_exporter: signozclickhousemetrics
metrics_flush_interval: 60s metrics_flush_interval: 60s
latency_histogram_buckets: [100us, 1ms, 2ms, 6ms, 10ms, 50ms, 100ms, 250ms, 500ms, 1000ms, 1400ms, 2000ms, 5s, 10s, 20s, 40s, 60s ] latency_histogram_buckets: [100us, 1ms, 2ms, 6ms, 10ms, 50ms, 100ms, 250ms, 500ms, 1000ms, 1400ms, 2000ms, 5s, 10s, 20s, 40s, 60s]
dimensions_cache_size: 100000 dimensions_cache_size: 100000
aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
enable_exp_histogram: true enable_exp_histogram: true
@@ -150,9 +133,6 @@ processors:
default: default default: default
- name: deployment.environment - name: deployment.environment
default: default default: default
# This is added to ensure the uniqueness of the timeseries
# Otherwise, identical timeseries produced by multiple replicas of
# collectors result in incorrect APM metrics
- name: signoz.collector.id - name: signoz.collector.id
- name: service.version - name: service.version
- name: browser.platform - name: browser.platform
@@ -163,27 +143,32 @@ processors:
- name: host.name - name: host.name
- name: host.type - name: host.type
- name: container.name - name: container.name
extensions: extensions:
health_check: health_check:
endpoint: 0.0.0.0:13133 endpoint: 0.0.0.0:13133
pprof: pprof:
endpoint: 0.0.0.0:1777 endpoint: 0.0.0.0:1777
exporters: exporters:
clickhousetraces: clickhousetraces:
datasource: tcp://clickhouse:9000/signoz_traces datasource: tcp://clickhouse:9000/signoz_traces
low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING} low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
use_new_schema: true use_new_schema: true
signozclickhousemetrics: signozclickhousemetrics:
dsn: tcp://clickhouse:9000/signoz_metrics dsn: tcp://clickhouse:9000/signoz_metrics
clickhouselogsexporter: clickhouselogsexporter:
dsn: tcp://clickhouse:9000/signoz_logs dsn: tcp://clickhouse:9000/signoz_logs
timeout: 10s timeout: 10s
use_new_schema: true use_new_schema: true
# debug: {}
otlp/nginx-logs: otlp/nginx-logs:
endpoint: "localhost:4317" endpoint: "localhost:4317"
tls: tls:
insecure: true insecure: true
service: service:
telemetry: telemetry:
logs: logs:
@@ -196,19 +181,23 @@ service:
receivers: [otlp] receivers: [otlp]
processors: [signozspanmetrics/delta, batch] processors: [signozspanmetrics/delta, batch]
exporters: [clickhousetraces] exporters: [clickhousetraces]
metrics: metrics:
receivers: [otlp] receivers: [otlp]
processors: [batch] processors: [batch]
exporters: [signozclickhousemetrics, resourcedetection/docker, resourcedetection/system] exporters: [signozclickhousemetrics]
metrics/hostmetrics: metrics/hostmetrics:
receivers: [hostmetrics] receivers: [hostmetrics]
processors: [resourcedetection, resource/env] processors: [resourcedetection]
exporters: [otlp] exporters: [otlp]
metrics/prometheus: metrics/prometheus:
receivers: [prometheus] receivers: [prometheus]
processors: [batch] processors: [batch]
exporters: [signozclickhousemetrics] exporters: [signozclickhousemetrics]
logs: logs:
receivers: [otlp, tcplog/docker, httplogreceiver/json] receivers: [otlp, httplogreceiver/json, filelog/nginx-access-logs, filelog/nginx-error-logs]
processors: [batch] processors: [batch]
exporters: [clickhouselogsexporter] exporters: [clickhouselogsexporter]