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!

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...