Reporting

Use a Special characters

Ant3xes
Engager

Hello,

I want to use the eval search command but i have a little problem.

 

 

 

 

index=* host="*" source="/applis" legs{}.status=* | eval error = if(legs{}.status == 200, "OK", "Problem") | chart count by error

 

 

 

 

When i use legs{}.status field it don't work, i think it's cause of my quotes.

Someone who know how to use that field ?

Thank you and sorry for my bad english

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

You need to put your field name in single quotes if it has a dot in. Try: 

index=* host="*" source="/applis" 'legs{}.status'=* | eval error = if('legs{}.status' == 200, "OK", "Problem") | chart count by error

 

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You need to put your field name in single quotes if it has a dot in. Try: 

index=* host="*" source="/applis" 'legs{}.status'=* | eval error = if('legs{}.status' == 200, "OK", "Problem") | chart count by error

 

0 Karma

Ant3xes
Engager

Thank you ! I only tried with double quotes 😅

0 Karma
Get Updates on the Splunk Community!

Splunk Security Content for Threat Detection & Response, Q1 Roundup

Join Principal Threat Researcher, Michael Haag, as he walks through:An introduction to the Splunk Threat ...

Splunk Life | Happy Pride Month!

Happy Pride Month, Splunk Community! 🌈 In the United States, as well as many countries around the ...

SplunkTrust | Where Are They Now - Michael Uschmann

The Background Five years ago, Splunk published several videos showcasing members of the SplunkTrust to share ...