Getting Data In

Index data from a file and send to differents indexes

tdepablo88
Explorer

Hi everyone,

I am trying to index data from a single log file to different indexes but i can't do it, i have this data wich need to route to diferent indexes:

svr80001.xxxxxx.com [UDP: [172.22.175.102]:27869->[172.22.172.244]:162]:
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (121711881) 14 days, 2:05:18.81

<UNKNOWN> [UDP: [115.100.9.100]:56090->[172.22.172.244]:162]:

I need to filter using the ipaddress, and i follow the next link https://community.splunk.com/t5/Getting-Data-In/How-to-filter-data-from-a-single-file-and-write-to-t... but isn't work to me.

Regards, Diego

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

The sourcetype can be changed by specifying the proper destination key.  You already have a destination key specified, however, so I'm not sure you can make both changes.

If your problem is resolved, then please click the "Accept as Solution" button to help future readers.

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

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Please share the props.conf and transforms.conf settings you're using to route the events to different indexes.

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

tdepablo88
Explorer

props.conf

[cisco-prime_snmtp-traps]
TRANSFORMS-reenvioindexes= wlc_pams, aruba

transforms.conf

[wlc_pams]
REGEX= /\[UDP: \[115\.100\.9\.100\]/g
DEST_KEY = _MetaData:Index
FORMAT = wlc_pams

[aruba]
REGEX= /\[UDP: \[172\.22\.175\.102\]/g
DEST_KEY = _MetaData:Index
FORMAT = Aruba

thank you

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The problem (or perhaps one of the problems) is the REGEX strings do not match the data.  The events do not have the UDP address surrounded by slashes.  Try these, instead.

[wlc_pams]
REGEX= \[UDP: \[115\.100\.9\.100\]
DEST_KEY = _MetaData:Index
FORMAT = wlc_pams

[aruba]
REGEX= \[UDP: \[172\.22\.175\.102\]
DEST_KEY = _MetaData:Index
FORMAT = Aruba

 

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

tdepablo88
Explorer

Rich,

thanks for the help it works perfectly, now can i define a another sourcetype for the redirection, example:

[wlc_pams]
REGEX= \[UDP: \[115\.100\.9\.100\]
DEST_KEY = _MetaData:Index
FORMAT = wlc_pams
SOURCETYPE = another?

regards.

Diego

Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

The sourcetype can be changed by specifying the proper destination key.  You already have a destination key specified, however, so I'm not sure you can make both changes.

If your problem is resolved, then please click the "Accept as Solution" button to help future readers.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...

Customer success is front and center at .conf25

Hi Splunkers, If you are not able to be at .conf25 in person, you can still learn about all the latest news ...