Splunk Enterprise

How to get the data when conditions applied?

Path Finder


index=xxxxx   host_ip IN( OR  OR OR sourcetype=xxxxxxx
|search "activity_status"=done
|eval results=if((like(response, "200"), "success", "failure")
|stats count(eval(result="success")) AS Overall_Success, count(response) as total
|eval Success_per=(Overall_Success/total)*100.0
|stats avg(Success_per) as SuccessPer

how can i write the condition like when my SuccessPer is <40  i need to see message like "The application is less thank 40 %, please check."
If the SuccessPer is >40 then SuccessPer value should display.

How can i do this???

Labels (1)
0 Karma

| eval message=if(Success_per < 40,"The application is less thank 40 %, please check.", null())



This ?

| eval Success_per=if(Success_per<40, "The application is less thank 40 %, please check.", Success_per)


Get Updates on the Splunk Community!

User Groups | Upcoming Events!

If by chance you weren't already aware, the Splunk Community is host to numerous User Groups, organized ...

Splunk Lantern | Spotlight on Security: Adoption Motions, War Stories, and More

Splunk Lantern is a customer success center that provides advice from Splunk experts on valuable data ...

Splunk Cloud | Empowering Splunk Administrators with Admin Config Service (ACS)

Greetings, Splunk Cloud Admins and Splunk enthusiasts! The Admin Configuration Service (ACS) team is excited ...