Splunk Search

Do I have to turn count and if on like we have to do with delete?

BITSIntern
Path Finder

Hi guys,

I am having some trouble trying to do a search. I want to do a search that involves the tools count and if but it keeps giving me an error like: Unknown search command 'count'. When I wanted to delete a few things from my index, I had to go to my access controls and turn on the delete command but when I went back I did not see anything about other command functions.

Am I doing something wrong or do I need to turn the tools on?

Please let me know!

Tags (4)
0 Karma

alacercogitatus
SplunkTrust
SplunkTrust

count and if are not commands. Stats and eval are, and those use count and if.

so....

<your_search> | stats count by sourcetype

That will get you started.

http://docs.splunk.com/Documentation/Splunk/latest/SearchTutorial/WelcometotheSearchTutorial

0 Karma

BITSIntern
Path Finder

Sorry I did not know there was a search manual.

0 Karma
Get Updates on the Splunk Community!

Build Your First SPL2 App!

Watch the recording now!.Do you want to SPL™, too? SPL2, Splunk's next-generation data search and preparation ...

Exporting Splunk Apps

Join us on Monday, October 21 at 11 am PT | 2 pm ET!With the app export functionality, app developers and ...

[Coming Soon] Splunk Observability Cloud - Enhanced navigation with a modern look and ...

We are excited to introduce our enhanced UI that brings together AppDynamics and Splunk Observability. This is ...