Splunk ITSI

HI team, can you please help me in extracting the field in same query for both the data. i need to get one regex or rex so i would get the cloud host and host from webserver log

Hemant1
Explorer

I need the the instance value in single field like EU1 ,EU2,AM,AP.

host = HYBECMPRDEU1P*
host = HYBECMPRDEU2P*
host = HYBECMPRDEU3P*
host = HYBECMPRDEU4P*
host = HYBECMPRDEU5P*
host = HYBADMPRDEU1P*
host = HYBADMPRDEU2P*
host = HYBADMPRDEU3P*
host = HYBADMPRDEU4P*
host = HYBADMPRDEU5P*
host = HYBBUSPRDAMP*
host = aks-prdap-12459421-vmss000000
host = HYBBUSPRDEU1P*
host = HYBBUSPRDEU2P*
host = HYBBUSPRDEU3P*
host = HYBBUSPRDEU4P*
host = HYBBUSPRDEU5P*
host = HYBBUSPRDAMP*
host = HYBADMPRDAMP*
host = HYBECMPRDAMP*

0 Karma

jpolvino
Builder

Assuming the field you're searching in is named "host" this may work:

(your search)
| rex field=host "(PRD|prd)(?<instance>\w{2,3})"

See https://regex101.com/r/LlINs6/2

Get Updates on the Splunk Community!

Alpha Launch: AI-Assisted Auto-Schematization for CIM

Streamlining Data Onboarding: Announcing the Alpha Release of AI-Assisted Auto-Schematization For many Splunk ...

Enterprise Security(ES) Essentials or Premier? Let's discuss Splunk ES Editions on ...

  Hi everyone, Last year at .conf25, we shared something exciting: Splunk Enterprise Security is evolving ...

[Puzzles] Solve, Learn, Repeat: Advent of Code - Day 5

Advent of CodeIn order to participate in these challenges, you will need to register with the Advent of Code ...