Splunk Search

How to create a table?

ko1
Engager

Can we aggregate the data in the specified column?

example SPL A)
index=pan_logs  | stats count by signature,src,dest

example SPL A Result)

signature_namesrcdestcount
signature-A10.1.1.110.0.0.11
signature-B10.1.1.210.0.0.22
signature-A10.1.1.310.0.0.32
signature-B10.1.1.410.0.0.42


Want to creat table)

signature_namesrcdestcount
signature-A10.1.1.110.0.0.13
 10.1.1.310.0.0.3 
signature-B10.1.1.210.0.0.24
 10.1.1.410.0.0.4 



We want to aggregate by signature_name without changing  src<->dest combination.

Labels (2)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @ko1,

it's not possible to display results in the format you want, Splunk isn't Excel!

but you can do something like this:

index=pan_logs  
| eval col="src=".src." dest=".dest
| stats values(col) AS "src dest" count BY signature

Ciao.

Giuseppe

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| stats list(src) as src list(dest) as dest sum(count) as count by signature_name
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @ko1,

it's not possible to display results in the format you want, Splunk isn't Excel!

but you can do something like this:

index=pan_logs  
| eval col="src=".src." dest=".dest
| stats values(col) AS "src dest" count BY signature

Ciao.

Giuseppe

ko1
Engager

Hi, @gcusello .
I will use this.
Thanks a lot!

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @ko1 ,

if one answer solves your need, please accept this one for the other people of Community or tell us how we can help you.

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated by all the Contributors;-)

0 Karma
Get Updates on the Splunk Community!

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...