rsyslog - Geringerer Durchsatz bei Verwendung von omfwd mit TCP gegenüber UDP

rsyslog - Geringerer Durchsatz bei Verwendung von omfwd mit TCP gegenüber UDP

Kurz und knapp;

Ich erhalte einen deutlich geringeren Durchsatz beim Weiterleiten von Syslog-Nachrichten mitrsyslogauf einem Redhat-Server mit 32 Kernen und 128Gi RAM zu einem Remote-Server mit TCP statt UDP Syslog imomfwdAktion.

Wie kann ich TCP zum Weiterleiten von Nachrichten verwenden und gleichzeitig mit dem Volumen eingehender Nachrichten Schritt halten?

Hinweis 1: pps = Pakete pro Sekunde

Hinweis 2: Beachten Sie den Unterschied zwischen Rx- und Tx-Statistiken

Bei Verwendung von UDP zum Weiterleiten eingehender Nachrichten:

[~]$ ./check_network_stats.bash eth0
Rx    10088 pps Tx    10092 pps |--| Rx    7 Mbps Tx    7 Mbps
Rx    11858 pps Tx    11857 pps |--| Rx    8 Mbps Tx    8 Mbps
Rx    11503 pps Tx    11502 pps |--| Rx    8 Mbps Tx    8 Mbps
Rx    11423 pps Tx    11321 pps |--| Rx    8 Mbps Tx    8 Mbps

Bei Verwendung von TCP zum Weiterleiten eingehender Nachrichten:

[~]$ source check_network_stats.bash eth0
Rx    10318 pps Tx       87 pps |--| Rx    7 Mbps Tx    0 Mbps
Rx    12150 pps Tx      162 pps |--| Rx    8 Mbps Tx    0 Mbps
Rx     9504 pps Tx      139 pps |--| Rx    7 Mbps Tx    0 Mbps
Rx     9774 pps Tx       67 pps |--| Rx    6 Mbps Tx    0 Mbps
Rx    12894 pps Tx      159 pps |--| Rx    9 Mbps Tx    0 Mbps

rsyslog.conf:

# rsyslog configuration file


#################
#### MODULES ####
#################
         
module(load="imjournal" StateFile="imjournal.state")
module(load="imklog") # reads kernel messages (the same are read from journald)
module(load="immark" interval="300") # provides --MARK-- message capability
module(load="imudp" threads="4" batchSize ="128") # Provides UDP syslog reception
module(load="imptcp" threads="10") # Provides TCP syslog reception
module(load="builtin:omfile" Template="RSYSLOG_TraditionalFileFormat") # Use default timestamp format

###############
#### RULES ####
###############

ruleset(name="sendToLogstash") {
    action(type="omfwd"
       name="action_ls"
       Target="10.10.10.10"
       Port="514"
       Protocol="udp" # when this changed to TCP, throughput drops
       queue.type="FixedArray"
       )
}

###########################
#### LISTENERS         ####
###########################
input(type="imudp" port="514" ruleset="sendToLogstash")
input(type="imptcp" port="514" ruleset="sendToLogstash")

###########################
#### GLOBAL DIRECTIVES ####
###########################

mark.*  /var/log/messages

# Where to place auxiliary files
global(workDirectory="/var/lib/rsyslog")

verwandte Informationen