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!

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, ...