Splunk Search

Grouping result after stats

SplunkBaby
Explorer

Hi
I have a search like this
host=A |stats last("Status") by TaskId

I like to group the result of above query by Status and then display a pie chart.
I use transaction "Status" but doesn't work out.
Can anybody help me.

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

In addition to Rocket66's comment, try this: 'host=A | stats last("Status") as LastStatus by TaskId | chart LastStatus'.

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

View solution in original post

SplunkBaby
Explorer

Thanks it is solved

0 Karma

SplunkBaby
Explorer

I get the result.Result is based on TaskIds.
I want to group that result again based on Status.
for that i use like
host=A |stats last("Status") by TaskId | transaction "Status".
This is not working.How can i achieve this.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

In addition to Rocket66's comment, try this: 'host=A | stats last("Status") as LastStatus by TaskId | chart LastStatus'.

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

richgalloway
SplunkTrust
SplunkTrust

Please accept the answer if it is what got it worked out.

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

SplunkBaby
Explorer

This worked out .Thanks man

0 Karma

Rocket66
Communicator

Don't know, what the problem is ...

  • do you get no results (as a list)?
  • you get results but, the pie chart is rendered with wrong or no values?

Maybe your field "Status" is called "status" or "TaskId", "TaskID" or some (other) typo?

Greetz, Robert

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...