Splunk Dev

Why am I getting error "The remote server returned an error: (400) Bad Request." trying to send data via C# SDK to the Splunk Cloud Trial Sandbox?

malkiz_walkme
Explorer

Hi,
I want to send data from the C# SDK to my Splunk Cloud Trial Sandbox.
This is what I have so far:

            var service = new Service("localhost", 8089, "https");

            // Log in
            service.Login("admin", "changeme");

            var args = new ReceiverSubmitArgs
            {
                Source = "splunk-sdk-tests",
                SourceType = "splunk-sdk-test-event",
            };

            var receiver = new Receiver(service);

            // Submit to default index
            receiver.Submit("default", args, "Hello World.");

But I'm getting an error:

"The remote server returned an error: (400) Bad Request."

Why does this happen?

I realize there is also another option of sending data to TCP input.
How can I configure it in the sandbox?

Tags (5)
0 Karma

yannK
Splunk Employee
Splunk Employee
0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...