- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it possible to write switch case statements in Splunk like other programming languages?
soumidutta
Explorer
10-27-2018
10:56 PM
Hi ,
Can it be possible to write switch case statements in Splunk like other programming languages?
If so, can you help me out with the syntax?
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

renjith_nair
Legend
10-27-2018
11:22 PM
@soumidutta,
Yes , using eval - eval description=case(status == 200, "OK", status ==404, "Not found", status == 500, "Internal Server Error")
---
What goes around comes around. If it helps, hit it with Karma 🙂
What goes around comes around. If it helps, hit it with Karma 🙂
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
soumidutta
Explorer
10-27-2018
11:32 PM
Thanks
I was looking for this one
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

renjith_nair
Legend
10-27-2018
11:38 PM
@soumidutta,
Please accept as answer if it helped you. thanks
---
What goes around comes around. If it helps, hit it with Karma 🙂
What goes around comes around. If it helps, hit it with Karma 🙂
