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!

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...

State of Splunk Careers 2024: Maximizing Career Outcomes and the Continued Value of ...

For the past four years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...

Data-Driven Success: Splunk & Financial Services

Splunk streamlines the process of extracting insights from large volumes of data. In this fast-paced world, ...