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!

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

This is the sixth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Answers Content Calendar, July Edition I

Hello Community! Welcome to another month of Community Content Calendar series! For the month of July, we will ...