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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...