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

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...

Stay Connected: Your Guide to October Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...