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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...