Splunk Enterprise

Field Transformation from Host Tags (tag::host)

jensparks
New Member

I'm looking to set up a field transformation (with no access to transforms.conf) for my department's logs to be able to differentiate our data centers and environments. For some reason, the configuration I've put in doesn't appear to be working, though no errors are returned.

Setup (made generic):

  1. A tag is configured on 'host' to be one of the following: app_prod_njw, app_prod_bel, app_preprod_njw, or app_preprod_bel
  2. A new private field transformation has been created with the following configuration:
    • name: app-env-datacenter
    • type: regex-based
    • Regular expression: app_(?<env>\w+)_(?<datacenter>.+)
    • Format: env::$1 datacenter::$2
    • Source key: tag::host
    • "Create multivalued fields" is not selected
    • "Automatically clean field names" is not selected

When I run a given search for my logs, however, I'm not seeing the field env or the field datacenter. 

I've also double-checked my regex and checked with a couple 

Is there some inherent misunderstanding in this setup? Is it not possible to do this against 'tag::host' as a source key?

Any and all help is appreciated!!!

~ Jen

Labels (2)
0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...