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!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...