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!

Now Available: Cisco Talos Threat Intelligence Integrations for Splunk Security Cloud ...

At .conf24, we shared that we were in the process of integrating Cisco Talos threat intelligence into Splunk ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Easily Improve Agent Saturation with the Splunk Add-on for OpenTelemetry Collector

Agent Saturation What and Whys In application performance monitoring, saturation is defined as the total load ...