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 Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...