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!

Manage Edge Processor pipelines end to end with APIs

This guide uses the Data Management APIs to create an Edge Processor, onboard one instance, deploy a pipeline ...

Splunk Brings Proof of Control to Digital Asset Transfers

Digital assets now sit inside the core of financial services. HSBC launched its Tokenized Deposit Service in ...

Manage Ingest Processor pipelines end to end with APIs

This guide uses the Data Management APIs to create an Ingest Processor pipeline, deploy it to the ...