Getting Data In

How to resolve error: Log to Splunk with Log4j2- 401 Unauthorized ?

prawinsplunk
Observer

Hi 

I am trying to integrate log4j with splunk as shown below and I am getting error - Log4j2-TF-1-AsyncLoggerConfig-1 ERROR Unable to send HTTP in appender [httptest] java.io.IOException: 401 Unauthorized.

<Http name="httptest" url="https://prd-p-xtpce.splunkcloud.com:8088/services/collector/raw">
<Property name="Authorization" value="Splunk xxxxxxx-998c-4547-beea-xxxxxx"/>
<Property name="disableCertificateValidation" value="true"/>
<JsonLayout properties="true"/>
</Http>

 

The token is valid and able to post data from postman.

 

Thanks

Labels (1)
Tags (1)
0 Karma
Get Updates on the Splunk Community!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...