Splunk Search

String validation in eval command

marellasunil
Communicator

Eval is not validating "string" proparly, means status=Normal is not validating. It is perfectly working for numaric values.
Ex : .. | eval AlertStatus=if(status="Normal", "Ok", "Not Ok")
for every Status it is displying OK.

Tags (2)
0 Karma

marellasunil
Communicator

Yes I have used it but still it did't work for me 😞

0 Karma

Ayn
Legend

You should use double equals signs.

... | eval AlertStatus=if(status=="Normal","Ok","Not Ok")
0 Karma

marellasunil
Communicator

Yes I have used it but still it did't work for me 😞

0 Karma
Get Updates on the Splunk Community!

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Spotting Financial Fraud in the Haystack: A Guide to Behavioral Analytics with Splunk

In today's digital financial ecosystem, security teams face an unprecedented challenge. The sheer volume of ...

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability As businesses scale ...