Splunk Search

Help extracting fields

rmcdougal
Path Finder

I have a syslog input that has its field values in the following format and splunk isn't picking it up by default. How could I get splunk to correctly sourcetype this type:

"class":"sessionevent", "hostname":"bob"

Tags (2)
0 Karma

Rob
Splunk Employee
Splunk Employee

You can define the sourcetype of your events in the appropriate inputs.conf file for the syslog monitoring stanza you have setup with something similar to the following.

[tcp://syslog.corp.company.net:514]
sourcetype = syslog

Here is a link to the Splunk documentation for further information:

http://docs.splunk.com/Documentation/Splunk/latest/Data/Configureyourinputs#A_word_about_source_type...

0 Karma

sdaniels
Splunk Employee
Splunk Employee

What is the data coming from? You could use the interactive field extractor in the UI to get Splunk to generate the regex for you.

http://www.splunk.com/view/SP-CAAADUY

0 Karma
Get Updates on the Splunk Community!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...