Splunk Search

Use stats to show multiple values resulting from fields generated by eval command

christopheryu
Communicator

Sorry, for some reason I cannot post my code, so attaching photo instead (please post my code if you can).

Result shows "Active Links" which is the distinct count of Link with both PASS and FAIL KPI. I would also want to include distinct count of Link with FAILCOUNT.

Link is a subset of LINKREGION as shown below:

Link LINKREGION
Dallas-Tokyo USA-APAC
LosAngeles-Manila USA-APAC
Boston-Paris USA-EUR
Chicago-Frankfurt USA-EUR
Paris-Frankfurt EUR-EUR

Thank you in advance!

0 Karma
1 Solution

somesoni2
Revered Legend

Before Stats, add following eval command

| eval FailLINK=if(KPI="FAIL",LINK,null())

Now add following to your stats

dc(FailLINK) as "Failed Links"

View solution in original post

0 Karma

somesoni2
Revered Legend

Before Stats, add following eval command

| eval FailLINK=if(KPI="FAIL",LINK,null())

Now add following to your stats

dc(FailLINK) as "Failed Links"
0 Karma

christopheryu
Communicator

That worked (just changed LINK to Link) - thank you!

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...