Splunk Enterprise

How to get the data when conditions applied?

mahesh27
Communicator

Search:

index=xxxxx   host_ip IN(16.121.12.123 OR 16.121.12.124  OR 16.121.12.126 OR 16.121.12.128) 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

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

rafiki31
Engager

Hi,

This ?

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

 

Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...