Getting Data In

Issue with accepting splunk_hec as exporter for OpenTelemetry Collector

slipinski
Path Finder

Hello.

I'm trying to transfer metric collected from Prometheus to my cloud instance. 

According to https://docs.splunk.com/observability/en/gdi/opentelemetry/components/splunk-hec-exporter.html  should use splunk_hec exporter. 

Configurtion for OpenTelemetry looks like 

 

 

receivers:
  prometheus:
    config:
      scrape_configs:
        - job_name: 'prometheus'
          scrape_interval: 10s
          static_configs:
            - targets: ['localhost:9090']

exporters:
  splunk_hec:
    token: "xxxxxxxx"
    endpoint: "https://http-inputs-xxxx.splunkcloud.com/services/collector"
    source: "lab"
    sourcetype: "lab"

service:
  pipelines:
    metrics:
      receivers: [prometheus]
      exporters: [splunk_hec]

 

 

but I'm receiving error that splunk_hec is not accepted as an exporter. 

error decoding 'exporters': unknown type: "splunk_hec" for id: "splunk_hec" (valid values: [nop otlp kafka zipkin debug otlphttp file opencensus prometheus prometheusremotewrite])

 

Do you have to use any intermittent solution to achieve this goal? 

Thank.

Sz

 

Labels (1)
Tags (2)
0 Karma

dural_yyz
Motivator

Your services and receivers according to documentation seem more designed for logs an not metrics.  Here is another sample from the documentation that seems more suited for metrics.

pipelines:
  metrics:
      receivers: [prometheus]
      processors: [batch]
      exporters: [splunk_hec/metrics]

receivers:
  prometheus:
    config:
      scrape_configs:
        - job_name: 'otel-collector'
          scrape_interval: 5s
          static_configs:
            - targets: ['<container_name>:<container_port>']
exporters:
    splunk_hec/metrics:
        # Splunk HTTP Event Collector token.
        token: "00000000-0000-0000-0000-0000000000000"
        # URL to a Splunk instance to send data to.
        endpoint: "https://splunk:8088/services/collector"
        # Optional Splunk source: https://docs.splunk.com/Splexicon:Source
        source: "app"
        # Optional Splunk source type: https://docs.splunk.com/Splexicon:Sourcetype
        sourcetype: "jvm_metrics"
        # Splunk index, optional name of the Splunk index targeted.
        index: "metrics"
0 Karma

slipinski
Path Finder

Same error. In essence, it doesn't recognise splunk_hec as a possible exporter. I'm on the latest version of Opentelemetry collector. 

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Persistent Queue at TcpOut — One of Splunk's Most Practical Features

Splunk introduced persistent queueing at the tcpout layer as one of the most practical resilience features in ...

Skip the Awkward Silence: Have a .conf-ersation at .conf26

Picture this. You arrive at .conf26 already having your socializing and networking plans mapped out. No ...

Rethinking Zero Trust: From Product Purchases to Logical Control Evidence

Implementing Zero Trust (ZT) across complex environments often falters at the very beginning due to a ...