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!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...