Splunk Enterprise

Need help to sum up the field values

Santosh2
Path Finder
ApplicationSuccessFailedTotalpercentage
IPL1521711.764
IPL1021216.666
IPL41520.000
WWV32540.000
WWV1010.000
PIP2052520.000
IPL1010.0000
WWV30154533.333
PIP20103033.333

 

From the above table, we want to calculate  application wise data.
Expected output:

ApplicationSuccessFailedTotalpercentage
IPL3053514.285
WWV34175133.333
PIP40155527.272

 

How can we do this???

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

That is what the stats command does. Use the by keyword to group results based on the values of certain fields.

| stats sum(Success) as Success, sum(Failed) as Failed by Application
| eval Total=Success + Failed
| eval percentage=round(Failed*100/Total, 3)

 

---
If this reply helps you, Karma would be appreciated.

Santosh2
Path Finder

Thankyou @richgalloway  it was pretty simple.

richgalloway
SplunkTrust
SplunkTrust

If your problem is resolved, then please click the "Accept as Solution" button to help future readers.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Expert Tips from Splunk Professional Services, Ensuring Compliance, and More New ...

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

Observability Release Update: AI Assistant, AppD + Observability Cloud Integrations & ...

This month’s releases across the Splunk Observability portfolio deliver earlier detection and faster ...

Stay Connected: Your Guide to February Tech Talks, Office Hours, and Webinars!

💌Keep the new year’s momentum going with our February lineup of Community Office Hours, Tech Talks, ...