Getting Data In

Parsing logs from UDP input

test_qweqwe
Builder

I installed addon for my product but the problem is that the addon is intended to collect data from the file, and not from receiving at udp 514 port. How should I reconfigure conf files to make it work?

Tags (1)
0 Karma
1 Solution

hardikJsheth
Motivator

There are multiple options.
1. You can update stanza to listen for UDP traffic on port 514.

[udp://2514]
sourcetype = Your Sourcetype
index= Define it if it's other than main
  1. Use syslogd/rsyslogd to listen for UDP traffic on port 514 and then put those contents into file which will be read by Splunk. You can keep your inputs.conf configuration as is and configure syslogd to put logs into the same file for which you have input configuration. Sample configuration is as follows:

    $ModLoad imudp
    $UDPServerRun 514
    ### Put logs to file ###
    $template rtflow,"$YOURFILELOCATION"
    if $msg contains 'RT_FLOW' then -?rtflow
    & ~
    

I would prefer second option as the chance of data loss is reduced in case of Splunk server is restarted.

View solution in original post

hardikJsheth
Motivator

There are multiple options.
1. You can update stanza to listen for UDP traffic on port 514.

[udp://2514]
sourcetype = Your Sourcetype
index= Define it if it's other than main
  1. Use syslogd/rsyslogd to listen for UDP traffic on port 514 and then put those contents into file which will be read by Splunk. You can keep your inputs.conf configuration as is and configure syslogd to put logs into the same file for which you have input configuration. Sample configuration is as follows:

    $ModLoad imudp
    $UDPServerRun 514
    ### Put logs to file ###
    $template rtflow,"$YOURFILELOCATION"
    if $msg contains 'RT_FLOW' then -?rtflow
    & ~
    

I would prefer second option as the chance of data loss is reduced in case of Splunk server is restarted.

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Supercharging Windows Security Detection Performance: Introducing Hybrid Field ...

Windows event logs—from Security auditing and Sysmon to PowerShell script blocks—form the operational backbone ...

Ditch the Manual Grind: Building AI Agents with Splunk

Ditch the Manual Grind: Building AI Agents with Splunk Let’s be real: your team’s time is being eaten alive. ...

Cisco Data Fabric from Architecture to Investigation, Better SOC Visibility, and More ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...