Getting Data In

How to tag events based on the host value that contains a condition?

ReachDataScient
Explorer

Events from our DEV/PROD servers are ingested into the same index. This index already has events since 1 year.
The only way to distinguish the dev and prod events is if the host contains DEV or Prod in this value.
How can I tag the events based on the host value that contains a condition?

Thank you

1 Solution

woodcock
Esteemed Legend

You first set an eventtype with a name like dev_hosts and set it equal to host IN("foo*", "*-dev-*", "*etc") and then create a tag with a name of dev_hosts set to eventtype=dev_hosts.

View solution in original post

woodcock
Esteemed Legend

You first set an eventtype with a name like dev_hosts and set it equal to host IN("foo*", "*-dev-*", "*etc") and then create a tag with a name of dev_hosts set to eventtype=dev_hosts.

ReachDataScient
Explorer

Can you please list the steps to achieve what you suggested.

0 Karma

woodcock
Esteemed Legend

Settings -> Event types -> New Event Type
Be sure to set the Tag(s) settings.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...