Dashboards & Visualizations

How do I merge several events, transposing several fields?

atg2
Engager

I am creating a dashboard which contains a query that returns application health events of this type:

Server

Application

Type

Status

 

servername

appname

App Health

UP

 

servername

appname

Disk Health

UP

 

servername

appname

LDAP Health

UP

 

servername

appname

Redis Health

 DOWN

 

 

What I want instead is for the table to look like:

Server

Application

App Health

Disk Health

LDAP Health

Redis Health

servername

appname

UP

UP

UP

DOWN 

 

What would be the best way to accomplish this?

Thank you for any suggestions.

 

Labels (1)
Tags (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

You need to concatenate the server and application, the use xyseries, then split them again

| eval serverapp=server."|".application
| xyseries serverapp type status
| eval server=mvindex(split(serverapp,"|"),0)
| eval application=mvindex(split(serverapp,"|"),1)
| fields - serverapp

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust

You need to concatenate the server and application, the use xyseries, then split them again

| eval serverapp=server."|".application
| xyseries serverapp type status
| eval server=mvindex(split(serverapp,"|"),0)
| eval application=mvindex(split(serverapp,"|"),1)
| fields - serverapp

atg2
Engager

Worked great. Thanks so much!

0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...