Getting Data In

How do I edit my configuration to assign Websense data to different indexes instead of going to the main index?

janderson19
Path Finder

Hello,

I've been trying to get Websense data to go into two different indexes based on whether or not the action was blocked. The reason I am doing this is because Websense is generating ~7GB of data every day, which is too much for the HDDs on the indexer to handle.

I've set up all my .confs in $SPLUNK_HOME/etc/apps/search/local. Here are the relevant lines:

Inputs.conf

[udp://514] 
connection_host = ip 
host = xx.xx.x.xxx 
sourcetype = websense_summary  

props.conf

[host::xx.xx.x.xxx]
NO_BINARY_CHECK = true
TRANSFORMS-websense = setBlockedIndex, setPermittedIndex 

transforms.conf

[setBlockedIndex]
DEST_KEY = MetaData:Index
REGEX = action\s*=\s*blocked
FORMAT = index::WebsenseBlocked

[setPermittedIndex]
DEST_KEY = MetaData:Index
REGEX = .
FORMAT = index::WebsensePermitted 

When I look for the data, it shows up in index=main, instead of the assigned indexes.

0 Karma
1 Solution

shaskell_splunk
Splunk Employee
Splunk Employee

I believe you just have a typo in your DEST_KEY and you can strip 'index:' off the FORMAT portion.

DEST_KEY = _MetaData:Index
FORMAT = myindex

See this section from transforms.conf.spec


_MetaData:Index : The index where the event should be stored.

View solution in original post

shaskell_splunk
Splunk Employee
Splunk Employee

I believe you just have a typo in your DEST_KEY and you can strip 'index:' off the FORMAT portion.

DEST_KEY = _MetaData:Index
FORMAT = myindex

See this section from transforms.conf.spec


_MetaData:Index : The index where the event should be stored.

Masa
Splunk Employee
Splunk Employee

I agree.
Please keep in mind that host stanza in props.conf cannot be defined by host field in inputs.conf. If you're looking for a certain source ip address who is sending udp packets, you need to specify the source IP.

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!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...