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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...