Splunk Search

transpose and xyseries

mbasharat
Builder

Hi,

I have search results in below format in screenshot1. I need that to be the way in screenshot 2. I used transpose and xyseries but no results populate. Compared to screenshots, I do have additional fields in this table. I only need the Severity fields and its counts to be divided in multiple columns as shown in screenshot 2. Rest of the fields will stay as is. I am missing something. How to do this? Thanks in-advance!!!

Now:

1.png

 

 

 

Need to be:

2.png

Labels (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Something like this

| makeresults count=1 | eval _raw="abc.sample.com,Low,2|abc.sample.com,Medium,5|abc.sample.com,High,6|abc.sample.com,Critical,10"
| eval events=split(_raw,"|")
| mvexpand events
| eval events=split(events,",")
| eval DNS=mvindex(events,0), Severity=mvindex(events,1), Count=mvindex(events,2)
| fields DNS, Severity, Count
| fields - _*
---- above just recreates your data
| xyseries DNS, Severity, Count
| addtotals
0 Karma
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Customers Increasingly Choose Splunk for Observability

For the second year in a row, Splunk was recognized as a Leader in the 2024 Gartner® Magic Quadrant™ for ...