Splunk Search

Why is the SPL is not removing the 'status' from the output while the below one is ?

SumanPalisetty
Path Finder

Hi,

I have a question on 'fields' please. 

 

sourcetype=* status IN ("200", "400","500")
| fields -status
| stats count by status

 

The SPL is not removing the 'status' from the output while the below one is removing. Why isn't the first working?

 

sourcetype=* status IN ("200", "400","500")
| fields - status
| stats count by status

 

Regards

Suman P.

Labels (1)
Tags (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @SumanPalisetty,

because this is the sintax of this command that differs from other commands e.g. sort.

More information at https://docs.splunk.com/Documentation/SCS/current/SearchReference/FieldsCommandOverview

ciao.

Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi @SumanPalisetty,

because this is the sintax of this command that differs from other commands e.g. sort.

More information at https://docs.splunk.com/Documentation/SCS/current/SearchReference/FieldsCommandOverview

ciao.

Giuseppe

SumanPalisetty
Path Finder

Hi Sir,

Actually there was a mistake in the training. So was confused.

training.png

Regards

Suman P.

0 Karma
Get Updates on the Splunk Community!

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had 3 releases of new security content via the Enterprise Security ...

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...