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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...