Splunk Search

I need to get the State from that output

waruike
Engager

server_state=RUNNING server_health=Component:ServerRuntime State:HEALTH_OK MBean:managed2ReasonCode:[]

this is the snippet that i need to get the state from

I am a beginner in splunk 

Labels (1)
0 Karma
1 Solution

renjith_nair
Legend

Try

|rex field=<your filedname> "State:(?<State>.+?),"

 

Test

|makeresults|eval text="| server_state=RUNNING | server_health=Component:ServerRuntime , State:HEALTH_OK , MBean:managed2, ReasonCode:[]"
|rex field=text "State:(?<State>.+?),"
---
What goes around comes around. If it helps, hit it with Karma 🙂

View solution in original post

0 Karma

renjith_nair
Legend

Try

|rex field=<your filedname> "State:(?<State>.+?),"

 

Test

|makeresults|eval text="| server_state=RUNNING | server_health=Component:ServerRuntime , State:HEALTH_OK , MBean:managed2, ReasonCode:[]"
|rex field=text "State:(?<State>.+?),"
---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma

waruike
Engager

I need to extract the field and add it to a table

see here

`index_wls` server=* server_state=* domain=* server_health=* | dedup host,server | table host,server ,server_state, 

now from the State I want to add a Row Status to my table to be like

`index_wls` server=* server_state=* domain=* server_health=* | dedup host,server | table host,server ,server_state, Status

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...