Getting Data In

Sourcetype transform visible in field list but returns no results when filtered on?

beukesmar
New Member

Howdy folks,

The original idea was to split the [snmptrapd] sourcetype now that multiple hosts were sending traps with different PRIVATE ENTERPRISE NUMBERS. I implemented the following to achieve this in props.conf:

[snmptrapd]
TRANSFORMS-overrideSnmpTrapdSourcetype = set-sourcetype-broadsoft-ems-trap, set-sourcetype-smarts-nms-trap

and transforms.conf

[set-sourcetype-broadsoft-ems-trap]
DEST_KEY = MetaData:Sourcetype
REGEX = enterprises\.2162\.
FORMAT = broadsoft:ems:trap

[set-sourcetype-smarts-nms-trap]
DEST_KEY = MetaData:Sourcetype
REGEX = enterprises\.733\.
FORMAT = smarts:nms:trap

Transform seems to work and the sourcetype is viewable in the fields list with statistics shown, the sourcetype also shows on each event BUT when I search for "sourcetype="smarts:nms:trap"" the search results are empty.

Please help.

0 Karma
1 Solution

bwooden
Splunk Employee
Splunk Employee

You need a sourcetype:: prefix in a FORMAT used in sourcetype updates.

transforms.conf

 [set-sourcetype-broadsoft-ems-trap]
 DEST_KEY = MetaData:Sourcetype
 REGEX = enterprises\.2162\.
 FORMAT = sourcetype::broadsoft:ems:trap

 [set-sourcetype-smarts-nms-trap]
 DEST_KEY = MetaData:Sourcetype
 REGEX = enterprises\.733\.
 FORMAT = sourcetype::smarts:nms:trap

View solution in original post

bwooden
Splunk Employee
Splunk Employee

You need a sourcetype:: prefix in a FORMAT used in sourcetype updates.

transforms.conf

 [set-sourcetype-broadsoft-ems-trap]
 DEST_KEY = MetaData:Sourcetype
 REGEX = enterprises\.2162\.
 FORMAT = sourcetype::broadsoft:ems:trap

 [set-sourcetype-smarts-nms-trap]
 DEST_KEY = MetaData:Sourcetype
 REGEX = enterprises\.733\.
 FORMAT = sourcetype::smarts:nms:trap

beukesmar
New Member

Thank you!

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...