Installation

How to filter the data and route the logs from particular sourcetye based on certain keyword

pankajupadhyay
Path Finder

Please help me out.

I want to route below specific keyword logs to destination on heavyforwarder.

"logged out"

"Rejected password for user"

"Cannot login"

"logged in as"

"Accepted user for user"

"was updated on host"

"Password was changed for account"

"Destroy VM called" or destory

 

Can someone please help on this ?

Labels (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

What have you tried so far?

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

pankajupadhyay
Path Finder

@richgalloway 

I have tried to use below regex in transforms.conf

 

REGEX=(logged out|Rejected password for user|Cannot login|logged in as)

We want to send this particular event.

 

can you please let me know where i am doing mistkake

0 Karma

pankajupadhyay
Path Finder

@richgalloway 

Is that correct regex ?

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The regex is valid, but is not enough to determine the source of the problem.  Please share the entire transforms.conf stanza, the related props.conf stanzas, and any other settings you've made to route data.

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

pankajupadhyay
Path Finder

@richgalloway 

 

Transforms.conf
[logs_type1]
REGEX = (logged out|Rejected password for user|Cannot login|logged in as|Accepted user for user|was updated on host|Password was changed for account|Destroy VM called)
DEST_KEY = _TCP_ROUTING
FORMAT = esxireceivier

 

Props.conf

[vmw_logs]
TRANSFORMS-routing=logs_type1

 

I am seeing that its forwarding the logs other than these keywords to destination which it should not.

 

Can you please help me in that ?

 

 

 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

This is getting into an area in which I have little experience.

Do you have a [tcpout:esxireceivier] stanza in outputs.conf?

I believe you also need a transform that tells Splunk what to do with events that don't match your regex.  See https://docs.splunk.com/Documentation/Splunk/8.1.0/Forwarding/Routeandfilterdatad#Filter_and_route_e...

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...

Auto-Injector for Everything Else: Making OpenTelemetry Truly Universal

You might have seen Splunk’s recent announcement about donating the OpenTelemetry Injector to the ...