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!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

 Ready to master Kubernetes and cloud monitoring like the pros? Join Splunk’s Growth Engineering team for an ...

Update Your SOAR Apps for Python 3.13: What Community Developers Need to Know

To Community SOAR App Developers - we're reaching out with an important update regarding Python 3.9's ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...