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!

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

This is the sixth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Answers Content Calendar, July Edition I

Hello Community! Welcome to another month of Community Content Calendar series! For the month of July, we will ...