Getting Data In

How to configure Net4Log in .Net to send logs to the Splunk HTTP Event Collector?

agamboa
Engager

We are trying to configure our app to send log messages to our server using the HEC service in our Splunk server. It is already configured and receiving messages, if we send messages from our Unix machine we can see them, we are using curl to do it:

curl -k "http://ourSplunSrv:8088/services/collector" -H "Authorization: Splunk xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -d '{"event": "TESTING", "sourcetype": "http:LAB-APP"}'

So, the server is running and listening fine.

But how to configure the Log4Net to do the same?

s2_splunk
Splunk Employee
Splunk Employee

Can you please review Overview of Splunk logging for .NET and let us know what issues specifically you are running into, if any?

0 Karma

s2_splunk
Splunk Employee
Splunk Employee

I see. If the Splunk-provided TraceListener does not work for you, maybe this third-party software gets you closer to what you need.

0 Karma

agamboa
Engager

We want to use Log4net, which we are alredy using in our app.

ryan_gates
Explorer

Here's a nuget package. I haven't tried it yet though.

0 Karma
Get Updates on the Splunk Community!

Best Strategies to Optimize Observability Costs

 Join us on Tuesday, May 6, 2025, at 11 AM PDT / 2 PM EDT for an insightful session on optimizing ...

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...