Splunk Search

How to extract multiple sets of fields from one sourcetype

davidb89
Engager

I'm currently forwarding data from a pfSense Firewall in our Splunk Light instance. This works pretty well and I defined a source type for this syslog instance. In the first place, I only forwarded the firewall logs and extracted the fields by "," as a separator which works pretty well for TCP and UDP log types. But when it comes to ICMP for example the field separation does not match. This is of course correct but is there a way to define more than one set of fields to be extracted from one source type?

0 Karma

sundareshr
Legend

Technically, you can have mulitple EXTRACT directives in your props pointing to corresponding stanzas in transforms. However, the risk, in your example, is if ICMP logs have a comma in the data, it will be extracted into a field. Your better option would be to keep all the data in the same index but separate sourcetypes (TCP, UDP, ICMP). This will give your more flexibility.

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 ...