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
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.
Please share the props.conf and transforms.conf settings you're using to route the events to different indexes.
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
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
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
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.