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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...