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
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Unmerging HTML Tables

[Puzzles] Solve, Learn, Repeat: Unmerging HTML TablesFor a previous puzzle, I needed some sample data, and ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...

AI for AppInspect

We’re excited to announce two new updates to AppInspect designed to save you time and make the app approval ...