Differences between TCP and UDP log processing?
Posted: Wed Sep 13, 2017 9:14 am
Hello,
Due to various constraints in a new environment we need to use UDP/514 to send logs from application servers to NagiosLog. In other environments with TCP logging, in the rsyslog.d/configuration I am specifying the highlighted lines as per below and logstash parses it no problem and I get a field with "program" that I can then use to parse the logs as needed. When changing that from @@nagioslogserver:5544 TCP to @nagioslogserver:514 for UDP, NagiosLog no longer picks up the Program field. Can you please advise?
$ModLoad imfile
$InputFilePollInterval 10
$PrivDropToGroup adm
$WorkDirectory /var/lib/rsyslog/
# Input for gg1trsV2
$InputFileName /some/path/transaction.log
$InputFileTag someLogV2:
$InputFileStateFile nls-state-some-path-transaction-log # Must be unique for each file being polled
# Uncomment the folowing line to override the default severity for messages
# from this file.
#$InputFileSeverity info
$InputFilePersistStateInterval 20000
$InputRunFileMonitor
# Forward to Nagios Logserver and then discard.
if $programname == 'someLogV2' then @@nagioslogserver:5544
if $programname == 'someLogV2' then ~
Due to various constraints in a new environment we need to use UDP/514 to send logs from application servers to NagiosLog. In other environments with TCP logging, in the rsyslog.d/configuration I am specifying the highlighted lines as per below and logstash parses it no problem and I get a field with "program" that I can then use to parse the logs as needed. When changing that from @@nagioslogserver:5544 TCP to @nagioslogserver:514 for UDP, NagiosLog no longer picks up the Program field. Can you please advise?
$ModLoad imfile
$InputFilePollInterval 10
$PrivDropToGroup adm
$WorkDirectory /var/lib/rsyslog/
# Input for gg1trsV2
$InputFileName /some/path/transaction.log
$InputFileTag someLogV2:
$InputFileStateFile nls-state-some-path-transaction-log # Must be unique for each file being polled
# Uncomment the folowing line to override the default severity for messages
# from this file.
#$InputFileSeverity info
$InputFilePersistStateInterval 20000
$InputRunFileMonitor
# Forward to Nagios Logserver and then discard.
if $programname == 'someLogV2' then @@nagioslogserver:5544
if $programname == 'someLogV2' then ~