Splunk Dev

Search a string using Splunk C# SDK

harshal_chakran
Builder

I have been trying to search a string using "search" example in Splunk SDK for C#.When I run the app, it shows all the Events in Console. What I need is to search just a single string, for e.g."reject" which is available in my indexed file.
Can anybody help me with this.

Tags (3)
0 Karma
1 Solution

Damien_Dallimor
Ultra Champion

If you look at the C# program : https://github.com/splunk/splunk-sdk-csharp/blob/master/examples/search/Program.cs

You can see that you can pass the "--search" argument to the program to specify your search query

--search="search reject"

View solution in original post

Damien_Dallimor
Ultra Champion

If you look at the C# program : https://github.com/splunk/splunk-sdk-csharp/blob/master/examples/search/Program.cs

You can see that you can pass the "--search" argument to the program to specify your search query

--search="search reject"

harshal_chakran
Builder

Thanks for the help Damien!!!

0 Karma
Get Updates on the Splunk Community!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...