Splunk Search

Change a value in the output field.

jerinvarghese
Communicator

Hi all,

I need help in changing an output that getting from below search to be changed.

 

 

index=itsm
| stats count by Class_Type
| sort - count

 

 

Output that results is: 

Class_Typecount
NodeDown Trap2129
Cisco LWAPP AP Trap766

 

Can i change the output and reflect another name in the section.

Like i want "Cisco LWAPP AP Trap" to be displayed as "CISCO AP DOWN"

is that possible.

Labels (1)
0 Karma
1 Solution

renjith_nair
Legend

@jerinvarghese,

Yes, there are different ways of doing it and depends on how many values you want to change. If there are only few, you could use simple eval

|eval Class_Type=case(Class_Type="Cisco LWAPP AP Trap","CISCO AP DOWN",1=1,Class_Type)

You can add more conditions in the case

---
What goes around comes around. If it helps, hit it with Karma 🙂

View solution in original post

0 Karma

renjith_nair
Legend

@jerinvarghese,

Yes, there are different ways of doing it and depends on how many values you want to change. If there are only few, you could use simple eval

|eval Class_Type=case(Class_Type="Cisco LWAPP AP Trap","CISCO AP DOWN",1=1,Class_Type)

You can add more conditions in the case

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma

renjith_nair
Legend

@jerinvarghese,

Glad it worked. Appreciate an upvote (karma) and you may close the question by accepting as a solution 🙂

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Get Updates on the Splunk Community!

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...