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!

Splunk Add-on for Microsoft Windows 11.0.3: Parse Once, Search Faster

The updated Splunk Add-on for Microsoft Windows helps customers search Windows events faster by reducing ...

What's New in Splunk Enterprise Security 8.8 and Beyond

Threats move at machine speed. Keeping up should not depend on having the biggest budget, the largest team, or ...

A Four-Part Event Series: State of Observability - Where AI Meets Performance

As AI agents take on more complex tasks, teams need greater visibility into how they behave, what they cost, ...