Getting Data In

Tag Logs Based on Host

jodros
Builder

There are several servers with universal forwarders loaded that are sending logs to our Splunk environment. These servers are all running the same applications, however some are production and some are development. There is nothing in the logs themselves to differentiate between prod and dev. The idea I had would be to key in on the Metadata:Host field to make this determination. However this is not working. Below is my config. Let me know what I am doing wrong.

Thanks

transforms.conf
[app_dev]
SOURCE_KEY = MetaData:Host
REGEX = (ho*dev)
FORMAT = environment::"dev"

props.conf
[app_dev]
REPORT-app_dev = app_dev

I am able to use actual tags to accomplish this, but was hoping to "tag" logs with a field extraction so that my field could be called "environment" and the values could be either "dev" or "prod". The code provided above is only for dev, but prod is similar.

Tags (2)
0 Karma
1 Solution

jodros
Builder

It appears that I will need to utilize the tags.conf file for what I need. This is somewhat cumbersome since it does not support wildcards or regex.

View solution in original post

0 Karma

jodros
Builder

It appears that I will need to utilize the tags.conf file for what I need. This is somewhat cumbersome since it does not support wildcards or regex.

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...