9b95ecc89f
Gitea Branch PR & Ansible Deployment / Check and Create PR (push) Successful in 24s
Gitea Branch PR & Ansible Deployment / Ansible Dry Run (push) Successful in 4m12s
Gitea Branch PR & Ansible Deployment / PR Merge (push) Successful in 21s
Gitea Branch PR & Ansible Deployment / Ansible Config Deployment (push) Successful in 4m2s
223 lines
6.9 KiB
Django/Jinja
223 lines
6.9 KiB
Django/Jinja
receivers:
|
|
httplogreceiver/json:
|
|
endpoint: 0.0.0.0:8082
|
|
source: json
|
|
otlp:
|
|
protocols:
|
|
grpc:
|
|
endpoint: 0.0.0.0:4317
|
|
http:
|
|
endpoint: 0.0.0.0:4318
|
|
hostmetrics:
|
|
collection_interval: 60s # Frequency of metrics collection.
|
|
scrapers:
|
|
cpu: {}
|
|
load: {}
|
|
memory: {}
|
|
disk: {}
|
|
filesystem: {}
|
|
network: {}
|
|
docker_stats:
|
|
endpoint: unix:///var/run/docker.sock
|
|
collection_interval: 30s
|
|
timeout: 10s
|
|
api_version: "1.51"
|
|
metrics:
|
|
container.uptime:
|
|
enabled: true
|
|
container.restarts:
|
|
enabled: true
|
|
container.network.io.usage.rx_errors:
|
|
enabled: true
|
|
container.network.io.usage.tx_errors:
|
|
enabled: true
|
|
container.network.io.usage.rx_packets:
|
|
enabled: true
|
|
container.network.io.usage.tx_packets:
|
|
enabled: true
|
|
filelog/nginx-access-logs:
|
|
include: ["${env:NGINX_ACCESS_LOG_FILE}"]
|
|
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
|
|
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>.+?)"$'
|
|
parse_from: body
|
|
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:
|
|
parse_from: attributes.ts
|
|
layout: "02/Jan/2006:15:04:05 -0700"
|
|
layout_type: gotime
|
|
severity:
|
|
parse_from: attributes.status
|
|
overwrite_text: true
|
|
mapping:
|
|
debug: "1xx"
|
|
info:
|
|
- "2xx"
|
|
- "3xx"
|
|
warn: "4xx"
|
|
error: "5xx"
|
|
- type: remove
|
|
if: attributes.ts != nil
|
|
field: attributes.ts
|
|
- type: add
|
|
field: attributes.source
|
|
value: nginx
|
|
|
|
filelog/nginx-error-logs:
|
|
include: ["${env:NGINX_ERROR_LOG_FILE}"]
|
|
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
|
|
if: body matches '^(?P<ts>.+?) \\[(?P<log_level>\\w+)\\] (?P<pid>\\d+)#(?P<tid>\\d+). \\*(?P<cid>\\d+) (?P<message>.+)$'
|
|
parse_from: body
|
|
parse_to: attributes
|
|
regex: '^(?P<ts>.+?) \[(?P<log_level>\w+)\] (?P<pid>\d+)#(?P<tid>\d+). \*(?P<cid>\d+) (?P<message>.+)$'
|
|
timestamp:
|
|
parse_from: attributes.ts
|
|
layout: "2006/01/02 15:04:05"
|
|
layout_type: gotime
|
|
severity:
|
|
parse_from: attributes.log_level
|
|
overwrite_text: true
|
|
mapping:
|
|
debug: "debug"
|
|
info:
|
|
- "info"
|
|
- "notice"
|
|
warn: "warn"
|
|
error:
|
|
- "error"
|
|
- "crit"
|
|
- "alert"
|
|
fatal: "emerg"
|
|
- type: remove
|
|
if: attributes.ts != nil
|
|
field: attributes.ts
|
|
- type: move
|
|
if: attributes.message != nil
|
|
from: attributes.message
|
|
to: body
|
|
- type: add
|
|
field: attributes.source
|
|
value: nginx
|
|
prometheus:
|
|
config:
|
|
global:
|
|
scrape_interval: 60s
|
|
scrape_configs:
|
|
- job_name: otel-collector
|
|
static_configs:
|
|
- targets:
|
|
- localhost:8888
|
|
labels:
|
|
job_name: otel-collector
|
|
processors:
|
|
batch:
|
|
send_batch_size: 10000
|
|
send_batch_max_size: 11000
|
|
timeout: 10s
|
|
resourcedetection:
|
|
detectors: [env, system]
|
|
system:
|
|
hostname_sources: [os]
|
|
resourcedetection/env:
|
|
detectors: [env]
|
|
timeout: 2s
|
|
override: false
|
|
resourcedetection/system:
|
|
detectors: ["system"]
|
|
system:
|
|
hostname_sources: ["dns", "os"]
|
|
resourcedetection/docker:
|
|
detectors: [env, docker]
|
|
timeout: 2s
|
|
override: false
|
|
signozspanmetrics/delta:
|
|
metrics_exporter: clickhousemetricswrite, signozclickhousemetrics
|
|
metrics_flush_interval: 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
|
|
aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
|
|
enable_exp_histogram: true
|
|
dimensions:
|
|
- name: service.namespace
|
|
default: default
|
|
- name: deployment.environment
|
|
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: service.version
|
|
- name: browser.platform
|
|
- name: browser.mobile
|
|
- name: k8s.cluster.name
|
|
- name: k8s.node.name
|
|
- name: k8s.namespace.name
|
|
- name: host.name
|
|
- name: host.type
|
|
- name: container.name
|
|
extensions:
|
|
health_check:
|
|
endpoint: 0.0.0.0:13133
|
|
pprof:
|
|
endpoint: 0.0.0.0:1777
|
|
exporters:
|
|
clickhousetraces:
|
|
datasource: tcp://clickhouse:9000/signoz_traces
|
|
low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
|
|
use_new_schema: true
|
|
clickhousemetricswrite:
|
|
endpoint: tcp://clickhouse:9000/signoz_metrics
|
|
disable_v2: true
|
|
resource_to_telemetry_conversion:
|
|
enabled: true
|
|
clickhousemetricswrite/prometheus:
|
|
endpoint: tcp://clickhouse:9000/signoz_metrics
|
|
disable_v2: true
|
|
signozclickhousemetrics:
|
|
dsn: tcp://clickhouse:9000/signoz_metrics
|
|
clickhouselogsexporter:
|
|
dsn: tcp://clickhouse:9000/signoz_logs
|
|
timeout: 10s
|
|
use_new_schema: true
|
|
# debug: {}
|
|
otlp/nginx-logs:
|
|
endpoint: "localhost:4317"
|
|
tls:
|
|
insecure: true
|
|
service:
|
|
telemetry:
|
|
logs:
|
|
encoding: json
|
|
extensions:
|
|
- health_check
|
|
- pprof
|
|
pipelines:
|
|
traces:
|
|
receivers: [otlp]
|
|
processors: [signozspanmetrics/delta, batch]
|
|
exporters: [clickhousetraces]
|
|
metrics:
|
|
receivers: [otlp]
|
|
processors: [batch]
|
|
exporters: [clickhousemetricswrite, signozclickhousemetrics, resourcedetection/docker, resourcedetection/system]
|
|
metrics/hostmetrics:
|
|
receivers: [hostmetrics]
|
|
processors: [resourcedetection, resource/env]
|
|
exporters: [otlp]
|
|
metrics/prometheus:
|
|
receivers: [prometheus]
|
|
processors: [batch]
|
|
exporters: [clickhousemetricswrite/prometheus, signozclickhousemetrics]
|
|
logs:
|
|
receivers: [otlp, tcplog/docker, httplogreceiver/json]
|
|
processors: [batch]
|
|
exporters: [clickhouselogsexporter]
|