Syslog sent via TCP does not parse correctly (Splunk/Arcsight/LogRhythm)

Syslog sent via TCP does not parse correctly (Splunk/Arcsight/LogRhythm)

183
Created On 11/10/26 11:02 AM - Last Modified 11/10/26 12:58 PM


Symptom


1. When using TCP or TLS for transmitting syslog messages to a syslog server of type Rsyslog on a Linux machine - the full syslog messages sent from the Vault are being received by the syslog server but the messages are combined / concatenated. 
2. In the trace.d files you can see that a new network socket is being opened for each syslog event.
3. When specifying the UDP protocol the same behavior is not exhibited.


Environment


9.9.5;10.0;10.1;10.2;10.3;10.4;10.5;10.6;10.7;10.8;10.9;10.10;11.1;11;11.2;11.3;11.4;11.5;11.6;11.7;12.0;12.1;12.2;11.9;11.8;14.0 PAS
Syslog


Cause


The UDP protocol is not replicating the behavior because: 
Classical syslog (RFC3164) expects one message per UDP packet with no terminating newline. 
Many servers also support TCP transport and expect the messages to be separated by newlines, but there is no formal standard for this -- even the later RFC5424 does not define how messages should be separated when encapsulated in protocols other than UDP. 
 
By default Rsyslog does not have a way to determine the end of a single syslog message over TCP or TLS with the information produced from the translator file that processes the syslog information being sent from the Vault.


Resolution


Modify the translator file to have a delimeter that Rsyslog recognizes as the end of a syslog message.
 
Adding the line "<xsl:text>&#xa;</xsl:text> " to the .xsl file just between "</xsl:for-each>" and "</xsl:template>". 
 
This will add a line return that will be read when using TCP (or TCP with TLS). 
 
</xsl:for-each> 
<xsl:text>&#xa;</xsl:text> 
</xsl:template> 
 
NOTE:
  • If the syslog message in the raw incoming data log on the syslog server is showing the end of each message having "#015" you will need to modify the Rsyslog configuration.
This parameter will suppress the unwanted text from showing in the log:
EscapeControlCharactersOnReceive off 
 
Link to parameter:
 
  • This process requires a Vault service restart. Restarting this service, will cause a momentary downtime until the service is up and running again.


Additional Information


Details

SYMPTOM:
 
1. When using TCP or TLS for transmitting syslog messages to a syslog server of type Rsyslog on a Linux machine - the full syslog messages sent from the Vault are being received by the syslog server but the messages are combined / concatenated. 
2. In the trace.d files you can see that a new network socket is being opened for each syslog event.
3. When specifying the UDP protocol the same behavior is not exhibited.
 
PROBLEM:
 
The UDP protocol is not replicating the behavior because: 
Classical syslog (RFC3164) expects one message per UDP packet with no terminating newline. 
Many servers also support TCP transport and expect the messages to be separated by newlines, but there is no formal standard for this -- even the later RFC5424 does not define how messages should be separated when encapsulated in protocols other than UDP. 
 
By default Rsyslog does not have a way to determine the end of a single syslog message over TCP or TLS with the information produced from the translator file that processes the syslog information being sent from the Vault.
 
SOLUTION:
 
Modify the translator file to have a delimeter that Rsyslog recognizes as the end of a syslog message.
 
Adding the line "<xsl:text>&#xa;</xsl:text> " to the .xsl file just between "</xsl:for-each>" and "</xsl:template>". 
 
This will add a line return that will be read when using TCP (or TCP with TLS). 
 
</xsl:for-each> 
<xsl:text>&#xa;</xsl:text> 
</xsl:template> 
 
NOTE:
If the syslog message in the raw incoming data log on the syslog server is showing the end of each message having "#015" you will need to modify the Rsyslog configuration.
This parameter will suppress the unwanted text from showing in the log:
EscapeControlCharactersOnReceive off 
 
Link to parameter:
http://www.rsyslog.com/doc/rsconf1_escapecontrolcharactersonreceive.html



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000001GxNCAU&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail