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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...