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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...