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!

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...