Splunk Search

How to edit my search to combine results to make multiple rows?

RogueMrSmith
Engager

Hello Everyone,

With my current search I am able to display results in three rows, however, I need two of the rows to combine as multiple rows with populated results. For example, here's what I am getting

Name - Type - AVG
1 - -------foo----3
1----------bar--0.2
1---------cake--0.2
2----------foo--7
2----------bar--2
2----------cake--6

But what I actually need is:

NAME FOO BAR CAKE
1---------3-----0.2----0.2
2---------7-----2------6

Is there anyway to do this? Here is my search.

| rename "(002) Device.FullyQualifiedDomainName.nvarchar" AS Name |rename "(003) PerformanceAnalysisDataDiskCounter.Value.float" AS val | rename "(001) PerformanceAnalysisCounter.CounterResourceName.nvarchar" AS type|stats avg(val) as ven by Name, type| stats list(ven) AS average by Name,type
0 Karma
1 Solution

somesoni2
SplunkTrust
SplunkTrust

You can replace your stats with chart command. Like this

| rename "(002) Device.FullyQualifiedDomainName.nvarchar" AS Name |rename "(003) PerformanceAnalysisDataDiskCounter.Value.float" AS val | rename "(001) PerformanceAnalysisCounter.CounterResourceName.nvarchar" AS type|stats avg(val) as ven by Name, type| chart list(ven) AS average by Name,type

View solution in original post

somesoni2
SplunkTrust
SplunkTrust

You can replace your stats with chart command. Like this

| rename "(002) Device.FullyQualifiedDomainName.nvarchar" AS Name |rename "(003) PerformanceAnalysisDataDiskCounter.Value.float" AS val | rename "(001) PerformanceAnalysisCounter.CounterResourceName.nvarchar" AS type|stats avg(val) as ven by Name, type| chart list(ven) AS average by Name,type

RogueMrSmith
Engager

Thanks! That did exactly what I needed!

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...