Getting Data In

How to drop event comming from host template*

ktn01
Path Finder

Hello,
I have to drop all events received from hosts named template*

I have created an app on indexer with the following files:

local/app.conf

[install]
is_configured = 1

[ui]
is_visible = 0
label = NoTemplate

[launcher]
author = moi
description = ignore les events qui proviennent des hosts template*
version = 0.0

local/props.conf

[host::template...]
TRANSFORMS-template = drop_templates

local/transforms.conf

[drop_templates]
REGEX = .
DEST_KEY=queue
FORMAT=nullQueue

Events from host template-rh-7tstill indexed !?

I also try with stanza host::template*]

Any idee ?

Thanks
Christian

Tags (2)
0 Karma

FritzWittwer_ol
Contributor

your pattern in the props stanza name
[host::template...]
matches hostnames 'template' followed by exactly 3 more arbitrary chars.

You should use something like
[host::template.*]
this matches template followed by an arbitrary number of arbitrary chars. Just be careful, this matches anything which starts with template.

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 ...