Monitoring Splunk

Discarding Certain Events

Gorwinn
Observer

Hello All! 

I am trying to discard a certain event before the Indexers Ingest it using keyword envoy. Below is an example

timestamp vcenter envoy-access 2024-12-29T23:53:56.632Z info envoy[139855859431232] [Originator@6876 sub=Default] 2024-12-29T23:53:50.392Z POST /sdk HTTP/1.1 200 via_upstream 

I tried creating props and transforms conf in  $SPLUNK_HOME/etc/system/local but it's not working. My questions are if my stanzas are correct and if I should put them in local directory? Appreciate any assistance you can provide, Thank you. 

Props.conf

[nullQueue]

queue = nullQueue

[host::vcenter]

TRANSFORMS-null = setnull

[source::/var/log/remote/catchall/(IPAddress of Vcenter)/*.log]

TRANSFORMS-null = setnull

transforms.conf

[setnull]

REGEX = envoy

DEST_KEY = queue

FORMAT = nullQueue
Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

The queue = nullQueue setting is not valid in props.conf. 

Make sure the host and source names match that of the incoming data.  Consider adding a sourcetype stanza for the data.

The stanzas belong in the first full instance of Splunk that processes the data (indexers and HFs).  Put them in the default directory of a custom app.

---
If this reply helps you, Karma would be appreciated.
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Gorwinn ,

let me understand, you want to take all the exents except the ones containing the word "envoy", is it correct?

at first, how are you taking these logs?

if using an Heavy Forwarder, you have to put the props.conf and transforms.conf on the first Splunk Full instance that data pass trhough, in other words on the Heavy Forwarder, if present or on the Indexer.

then, the transformation names must me unique in props.conf:

 

[host::vcenter]
TRANSFORMS-null = setnull

[source::/var/log/remote/catchall/*/*.log]
TRANSFORMS-null2 = setnull

 

then check the regex using the rex command in Splunk.

Anyway, the issue usually is the location of the conf files (obviously I suppose that you restarted Splunk after conf files modification!).

The documentation is at https://docs.splunk.com/Documentation/Splunk/9.4.0/Forwarding/Routeandfilterdatad#Filter_event_data_... 

Ciao.

Giuseppe

0 Karma

Gorwinn
Observer

Yes, I want to take all logs but events with envoy in it. I am only using universal forwarder which I believe cant parse any data like a heavy forwarder. Am I mistaken? I made the transformation names unique and restarted splunk via GUI but still no discards. 

0 Karma

isoutamo
SplunkTrust
SplunkTrust
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Splunk Cloud Application Management in Terraform

Now On-Demand   We’re diving into how you can bring Infrastructure as Code (IaC) principles to your Splunk ...

What's New in Splunk Enterprise Security (ES) 8.6

Purpose-Built AI Agents for the Agentic SOC  Splunk Enterprise Security 8.6 expands AI in Security with ...

From Raw Data to Executive-Ready Stories, Faster

Build Data Stories for Every Audience  A dashboard is rarely just a dashboard. It might be the view an ...