
  extensions:
    health_check:
    file_storage/log_storage:
      directory: /var/lib/otelcol/logs_disk_queue
    file_storage/metric_storage:
      directory: /var/lib/otelcol/metrics_disk_queue

  receivers:
    otlp:
      protocols:
        grpc:
          endpoint: 0.0.0.0:4317
        http:

  processors:
    batch:
      send_batch_size: 100
      timeout: 10s

    filter/critical_logs:
      logs:
        include:
          match_type: strict
          resource_attributes:
            - key: "service.name"
              value: "stb-critical-service"

    filter/general_logs:
      logs:
        exclude:
          match_type: strict
          resource_attributes:
            - key: "service.name"
              value: "stb-critical-service"


  exporters:
    debug:
      verbosity: detailed

    otlphttp/local_logs:
      endpoint: "http://192.168.27.68:5000"
      compression: none
      headers:
        Content-Type: application/json


    splunk_hec:
      token: "<your-splunk-token>"
      endpoint: "https://splunk.example.com:8088"
      sending_queue:
        enabled: true
        storage: file_storage/log_storage
      retry_on_failure:
        enabled: true

    otlphttp/remote_metrics:
      endpoint: "http://myserver.com:4318/v1/metrics"
      sending_queue:
        enabled: true
        storage: file_storage/metric_storage
      retry_on_failure:
        enabled: true

  service:
    extensions: [health_check, file_storage/log_storage, file_storage/metric_storage]
    pipelines:
      logs/critical:
        receivers: [otlp]
        processors: [filter/critical_logs, batch]
        exporters: [otlphttp/local_logs, debug]

      logs/general:
        receivers: [otlp]
        processors: [filter/general_logs, batch]
        exporters: [otlphttp/local_logs, debug]

      metrics:
        receivers: [otlp]
        processors: [batch]
        exporters: [otlphttp/remote_metrics]

