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!

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had 3 releases of new security content via the Enterprise Security ...

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...