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
SplunkTrust
SplunkTrust

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
SplunkTrust
SplunkTrust

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!

Enterprise Security Content Update (ESCU) | New Releases

In the last month, the Splunk Threat Research Team (STRT) has had 2 releases of new security content via the ...

Announcing the 1st Round Champion’s Tribute Winners of the Great Resilience Quest

We are happy to announce the 20 lucky questers who are selected to be the first round of Champion's Tribute ...

We’ve Got Education Validation!

Are you feeling it? All the career-boosting benefits of up-skilling with Splunk? It’s not just a feeling, it's ...