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!

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had 3 releases of new security content via the Enterprise Security ...

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...