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
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"
Same error. In essence, it doesn't recognise splunk_hec as a possible exporter. I'm on the latest version of Opentelemetry collector.