All Apps and Add-ons

Prometheus 415 Unsupported Media Type

djmcint
Explorer

 

@luke_monahan 

Followed you Prometheus app setup.

On Heavy forwarder its up and listening on 8098

on Prometheus side seems ok to

However in Prometheus Im been thrown errors on "Unsupported Media Type"

 

msg="non-recoverable error" count=9 exemplarCount=0 err="server returned HTTP status 415 Unsupported Media Type: <!doctype html><html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\"><title>415 Unsupported Media Type</title></head><body><h1>Unsupported Media Type</h1><p>The requested URL does not support the media type sent.</p></body></html>"

 

IN prometheus.yml in remote_writes

 

 - url: "https://myhost.mydomain.com:8089"
   authorization:
     credentials: "ABC123"
   tls_config:
     insecure_skip_verify: true
   write_relabel_configs:
   - source_labels: [__name__]
     regex: expensive.*
     action: drop

 

 in Splunk HF:

 

[prometheusrw]
port = 8098
maxClients = 10
disabled = 0

[prometheusrw://http_status]
bearerToken = ABC123
index = prometheus
whitelist = *
sourcetype = prometheus:metric
disabled = 0

 

 

Help Appreciated

 

Labels (1)
Tags (1)
0 Karma

djmcint
Explorer

@luke_monahan   effectively a typo . Thanks again, works like a charm

0 Karma

luke_monahan
Path Finder

Your Prometheus config is sending the data to port 8089 -- the main Splunkd port, rather than the prometheusrw port.

The prometheusrw input opens up a new port (8098) that can handle the content-type that Prometheus will send. You need to update your Prometheus configuration to use port 8098 and (in this case) use http and not https.

 

0 Karma
Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...