Configuration

global:
  file_watch_config:
    min_poll_frequency: 250ms
    max_poll_frequency: 250ms
server:
  http_listen_network: tcp
  http_listen_address: ""
  http_listen_port: 9080
  http_listen_conn_limit: 0
  grpc_listen_network: tcp
  grpc_listen_address: ""
  grpc_listen_port: 9081
  grpc_listen_conn_limit: 0
  tls_cipher_suites: ""
  tls_min_version: ""
  http_tls_config:
    cert_file: ""
    key_file: ""
    client_auth_type: ""
    client_ca_file: ""
  grpc_tls_config:
    cert_file: ""
    key_file: ""
    client_auth_type: ""
    client_ca_file: ""
  register_instrumentation: true
  graceful_shutdown_timeout: 30s
  http_server_read_timeout: 30s
  http_server_write_timeout: 30s
  http_server_idle_timeout: 2m0s
  grpc_server_max_recv_msg_size: 4194304
  grpc_server_max_send_msg_size: 4194304
  grpc_server_max_concurrent_streams: 100
  grpc_server_max_connection_idle: 2562047h47m16.854775807s
  grpc_server_max_connection_age: 2562047h47m16.854775807s
  grpc_server_max_connection_age_grace: 2562047h47m16.854775807s
  grpc_server_keepalive_time: 2h0m0s
  grpc_server_keepalive_timeout: 20s
  grpc_server_min_time_between_pings: 5m0s
  grpc_server_ping_without_stream_allowed: false
  log_format: logfmt
  log_level: info
  log_source_ips_enabled: false
  log_source_ips_header: ""
  log_source_ips_regex: ""
  log_request_headers: false
  log_request_at_info_level_enabled: false
  log_request_exclude_headers_list: ""
  http_path_prefix: ""
  external_url: ""
  health_check_target: null
  disable: false
  profiling_enabled: false
  enable_runtime_reload: false
client:
  url: ""
  batchwait: 1s
  batchsize: 1048576
  follow_redirects: false
  enable_http2: false
  backoff_config:
    min_period: 500ms
    max_period: 5m0s
    max_retries: 10
  timeout: 10s
  tenant_id: ""
  drop_rate_limited_batches: false
  stream_lag_labels: ""
clients:
- url: http://10.20.3.8:3100/loki/api/v1/push
  batchwait: 1s
  batchsize: 1048576
  follow_redirects: true
  enable_http2: true
  backoff_config:
    min_period: 500ms
    max_period: 5m0s
    max_retries: 10
  external_labels: |
    node_name: elka2024-nginx-ok4
    platform: ok
  timeout: 10s
  tenant_id: ""
  drop_rate_limited_batches: false
  stream_lag_labels: ""
positions:
  sync_period: 1m0s
  filename: /var/lib/promtail/positions.yaml
  ignore_invalid_yaml: false
scrape_configs:
- job_name: journald-auth
  journal:
    max_age: ""
    json: false
    labels:
      job: auth
    path: /var/log/journal
    matches: SYSLOG_FACILITY=4
  relabel_configs:
  - source_labels: [__journal_syslog_identifier]
    separator: ;
    regex: (.*)
    target_label: syslog_identifier
    replacement: $1
    action: replace
  static_configs: []
- job_name: consul
  pipeline_stages:
  - regex:
      expression: ^(?P<tstamp>\d+-\d+-\d+T\d+:\d+:\d+.\d+Z) \[(?P<level>\w+)\]  (?P<msg>.*)$
  - timestamp:
      format: RFC3339
      source: tstamp
  - template:
      source: out_msg
      template: '[{{ .level }}] {{ .msg }}'
  - output:
      source: out_msg
  journal:
    max_age: ""
    json: false
    labels:
      job: consul
    path: /var/log/journal
    matches: _SYSTEMD_UNIT=consul.service
  static_configs: []
- job_name: nginx-error
  pipeline_stages:
  - regex:
      expression: '^(?P<tstamp>\d+/\d+/\d+ \d+:\d+:\d+) \[(?P<level>\w+)\] (?P<pid>\d+)#(?P<tid>\d+):
        \*?(?P<cid>\d*) (?P<msg>.*)$'
  - timestamp:
      format: 2023/11/21 07:25:16
      source: tstamp
  - labeldrop:
    - filename
  - template:
      source: out_msg
      template: '[{{ .level }}] [{{ .pid }}#{{ .tid }}]: {{ .cid }} {{ .msg }}'
  - output:
      source: out_msg
  static_configs:
  - targets:
    - localhost
    labels:
      __path__: /home/www-data/logs/error.log
      job: nginx-error
- job_name: nginx-access
  pipeline_stages:
  - json:
      drop_malformed: true
      expressions:
        body_bytes_sent: body_bytes_sent
        bytes_sent: bytes_sent
        host: host
        http_user_agent: http_user_agent
        method: method
        path: path
        protocol: request_proto
        query: request_query
        remote_addr: remote_addr
        request_time: request_time
        status: status
        time_local: time
        upstream_time: upstream_time
  - labels:
      host: null
      method: null
      path: null
      status: null
  - labeldrop:
    - filename
  - template:
      source: out_msg
      template: '{{ .remote_addr }} {{ .protocol }} {{ .method }} {{ .host }}{{ .path
        }}{{ if ne .query "-" }}?{{ .query }}{{ end }} {{ .status }} {{ .body_bytes_sent
        }} {{ .upstream_time }} {{ .request_time }} {{ .http_user_agent }}'
  - timestamp:
      format: RFC3339
      source: time_local
  - output:
      source: out_msg
  static_configs:
  - targets:
    - localhost
    labels:
      __path__: /home/www-data/logs/access-*.log
      job: nginx-access
target_config:
  sync_period: 10s
  stdin: false
limits_config:
  readline_rate: 10000
  readline_burst: 10000
  readline_rate_drop: true
  max_streams: 0
  max_line_size: 0B
  max_line_size_truncate: false
tracing:
  enabled: true
wal:
  enabled: false
  dir: ""
  cleanSegmentsOlderThan: 0s
  watchConfig:
    minReadFrequency: 0s
    maxReadFrequency: 0s