> $ModLoad imtcp
> module(load="imtcp")

Those two statements are identical, one in old format one in new format.  Only 
one is needed.  That’s one of the error messages.


> On Jan 11, 2022, at 09:05, DESSEAUX Samuel (Gaz Réseau Distribution France) 
> via rsyslog <[email protected]> wrote:
> 
> Here is my config
> 
> $MaxMessageSize 64k
> # rsyslog configuration file
> 
> # For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
> # If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html
> 
> #### MODULES ####
> 
> # The imjournal module bellow is now used as a message source instead of 
> imuxsock.
> $ModLoad imuxsock # provides support for local system logging (e.g. via 
> logger command)
> $ModLoad imjournal # provides access to the systemd journal
> #$ModLoad imklog # reads kernel messages (the same are read from journald)
> #$ModLoad immark  # provides --MARK-- message capability
> # Provides UDP syslog reception
> #$ModLoad imudp
> #$UDPServerRun 514
> 
> # Provides TCP syslog reception
> $ModLoad imtcp
> $InputTCPServerRun 514
> 
> 
> template(name="TmplAuthpriv" type="string"
>         string="/data/log/%HOSTNAME%/%PROGRAMNAME:::secpath-replace%.log"
>        )
> 
> template(name="TmplMsg" type="string"
>         
> string="/var/log/remote/msg/%HOSTNAME%/%PROGRAMNAME:::secpath-replace%.log"
>        )
> 
> module(load="imtcp")
> 
> #INPUT
> ruleset(name="flux514"){
>    action(type="omfile" 
> file="/data/log/%HOSTNAME%/%PROGRAMNAME:::secpath-replace%.log")
> }
> input(type="imtcp" port="514" ruleset="flux514")
> 
> 
> #$template Remote10515,"/data/log/10515/10515.log"
> #
> ##$RuleSet Remote10515
> ##*.* -?Remote10515
> 
> #$InputTCPServerBindRuleset Remote10515
> ##$TCPServerRun 10515
> 
> 
> #$template Remote10516,"/data/log/10516/10516.log"
> ##
> ###$RuleSet Remote10516
> ###*.* -?Remote10516
> #
> ##$InputTCPServerBindRuleset Remote10516
> ###$TCPServerRun 10516
> #
> 
> # process remote messages
> #$template RemoteLogs,"/data/log/%HOSTNAME%/%PROGRAMNAME%.log"
> $template RemoteLogs,"/data/log/%FROMHOST-IP%/%PROGRAMNAME%.log"
> if ($FROMHOST-IP != "127.0.0.1" ) then -?RemoteLogs
> #& stop
> *.* ?RemoteLogs
> & stop
> #### GLOBAL DIRECTIVES ####
> # Where to place auxiliary files
> $WorkDirectory /var/lib/rsyslog
> 
> # Use default timestamp format
> $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
> 
> # File syncing capability is disabled by default. This feature is usually not 
> required,
> # not useful and an extreme performance hit
> #$ActionFileEnableSync on
> 
> # Include all config files in /etc/rsyslog.d/
> $IncludeConfig /etc/rsyslog.d/*.conf
> 
> # Turn off message reception via local log socket;
> # local messages are retrieved through imjournal now.
> $OmitLocalLogging on
> 
> # File to store the position in the journal
> $IMJournalStateFile imjournal.state
> 
> 
> #### RULES ####
> 
> # Log all kernel messages to the console.
> # Logging much else clutters up the screen.
> #kern.*                                                 /dev/console
> 
> # Log anything (except mail) of level info or higher.
> # Don't log private authentication messages!
> #*.info;mail.none;authpriv.none;cron.none                /var/log/messages
> 
> # The authpriv file has restricted access.
> #authpriv.*                                              /var/log/secure
> 
> # Log all the mail messages in one place.
> #mail.*                                                  -/var/log/maillog
> 
> 
> # Log cron stuff
> #cron.*                                                  /var/log/cron
> 
> # Everybody gets emergency messages
> #*.emerg                                                 :omusrmsg:*
> 
> # Save news errors of level crit and higher in a special file.
> #uucp,news.crit                                          /var/log/spooler
> 
> # Save boot messages also to boot.log
> #local7.*                                                /var/log/boot.log
> 
> 
> # ### begin forwarding rule ###
> # The statement between the begin ... end define a SINGLE forwarding
> # rule. They belong together, do NOT split them. If you create multiple
> # forwarding rules, duplicate the whole block!
> # Remote Logging (we use TCP for reliable delivery)
> #
> # An on-disk queue is created for this action. If the remote host is
> # down, messages are spooled to disk and sent when it is up again.
> $ActionQueueFileName fwdRule1 # unique name prefix for spool files
> $ActionQueueMaxDiskSpace 1g   # 1gb space limit (use as much as possible)
> $ActionQueueSaveOnShutdown on # save messages to disk on shutdown
> $ActionQueueType LinkedList   # run asynchronously
> $ActionResumeRetryCount -1    # infinite retries if host is down
> # remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
> #*.* @@remote-host:514
> # ### end of the forwarding rule ###
> 
> -----Message d'origine-----
> De : rsyslog <[email protected]> De la part de Mariusz Kruk 
> via rsyslog
> Envoyé : mardi 11 janvier 2022 16:02
> À : [email protected]
> Cc : Mariusz Kruk <[email protected]>
> Objet : Re: [rsyslog] probleme configuration multiport rsyslog
> 
> Firstly, show us your config :-)
> 
> Secondly, you use a very old version.
> 
> Thirdly, I suspect you're using some form of legacy config and/or blindly 
> copied config snippets.
> 
> On 11.01.2022 15:49, DESSEAUX Samuel (Gaz Réseau Distribution France) via 
> rsyslog wrote:
>> Hello,
>> 
>> I need your help for configuring rsyslog for the following use case
>> 
>> I have many devices and many technologies and each of them have to send 
>> their logs on rsyslog.
>> Due to the context, i have to configure rsyslog in order to collect
>> logs on different ports and send them in a folder
>> 
>> For example, logs come from an ip with 10515 port will be stored in
>> /data/log/10515/10515.log
>> 
>> But, something is missing in my configuration because, despite of my
>> tests,i find most of the time these errors
>> 
>> netstream session 0x7f2c10005170 from 10.XX.X.X.X (all devices are behind a 
>> F5) will be closed due to error  [v8.24.0-52.el7_8.2 try 
>> http://www.rsyslog.com/e/2165 ]
>>  Jan 11 14:33:29 xx.XX.XX.com rsyslogd[899]: error: ruleset
>> 'log-collect' specified more than once [v8.24.0-52.el7_8.2 try
>> http://www.rsyslog.com/e/2306 ] Jan 11 14:33:29 xx.XX.XX.com
>> rsyslogd[899]: module 'imtcp' already in this config, cannot be added
>> [v8.24.0-52.el7_8.2 try http://www.rsyslog.com/e/2221 ] Jan 11
>> 14:33:29 xx.XX.XX.com rsyslogd[899]: Could not create tcp listener,
>> ignoring port 10516 bind-address (null). [v8.24.0-52.el7_8.2 try
>> http://www.rsyslog.com/e/2077 ] Jan 11 14:33:29 xx.XX.XX.com
>> rsyslogd[899]: Could not create tcp listener, ignoring port 10515
>> bind-address (null). [v8.24.0-52.el7_8.2 try
>> http://www.rsyslog.com/e/2077 ] Jan 11 14:33:29xx.XX.XX.com
>> rsyslogd[899]: Could not create tcp listener, ignoring port 514
>> bind-address (null). [v8.24.0-52.el7_8.2 try
>> http://www.rsyslog.com/e/2077 ]
>> 
>> Thank you for your help
>> 
>> Regards,
>> 
>> 
>> Samuel Desseaux
>> Direction des Systèmes d'Information / Domaine Ingénierie /
>> Architecture et Expertise Outillage Architecte ELK
>> 
>> 95, rue de Maubeuge
>> 75009 Paris - France
>> Tel : 07 49 95 94 14
>> [email protected]<mailto:[email protected]
>>> 
>> www.grdf.fr<http://www.grdf.fr/>
>> 
>> 
>> « Ce message est confidentiel et destiné à l'usage du (des) seul(s) 
>> destinataire(s) concerné(s). Il peut également contenir des informations à 
>> usage restreint, soumises à droits d'auteur ou à d'autres dispositions 
>> légales. Si vous l'avez reçu par erreur, nous vous prions de bien vouloir 
>> nous en informer par retour et de l'effacer de votre système. La copie du 
>> message et la communication de son contenu à quelque personne que ce soit 
>> sont interdites. La transmission erronée de ce message n'entraîne ni la 
>> renonciation ni la levée de la confidentialité et du secret professionnel.
>> 
>> Tous les messages envoyés et reçus par GRDF peuvent faire l'objet de
>> contrôles visant à garantir le respect des directives internes,
>> protéger les intérêts de l'entreprise et éliminer les éventuels
>> logiciels dangereux. Les messages électroniques ne sont pas sécurisés
>> et sont susceptibles de comporter des erreurs puisqu'ils peuvent être
>> interceptés, modifiés, perdus, supprimés ou contenir des virus. Toute
>> personne communiquant avec notre entreprise par message électronique
>> accepte ces risques. Les délégations de pouvoirs et d'autorité peuvent
>> être vérifiées et sont disponibles sur demande »
>> 
>> _______________________________________________
>> rsyslog mailing list
>> https://lists.adiscon.net/mailman/listinfo/rsyslog
>> http://www.rsyslog.com/professional-services/
>> What's up with rsyslog? Follow https://twitter.com/rgerhards NOTE
>> WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites 
>> beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
>> THAT.
> _______________________________________________
> rsyslog mailing list
> https://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
> What's up with rsyslog? Follow https://twitter.com/rgerhards NOTE WELL: This 
> is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our 
> control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
> 
> « Ce message est confidentiel et destiné à l'usage du (des) seul(s) 
> destinataire(s) concerné(s). Il peut également contenir des informations à 
> usage restreint, soumises à droits d'auteur ou à d'autres dispositions 
> légales. Si vous l'avez reçu par erreur, nous vous prions de bien vouloir 
> nous en informer par retour et de l'effacer de votre système. La copie du 
> message et la communication de son contenu à quelque personne que ce soit 
> sont interdites. La transmission erronée de ce message n'entraîne ni la 
> renonciation ni la levée de la confidentialité et du secret professionnel.
> 
> Tous les messages envoyés et reçus par GRDF peuvent faire l'objet de 
> contrôles visant à garantir le respect des directives internes, protéger les 
> intérêts de l'entreprise et éliminer les éventuels logiciels dangereux. Les 
> messages électroniques ne sont pas sécurisés et sont susceptibles de 
> comporter des erreurs puisqu'ils peuvent être interceptés, modifiés, perdus, 
> supprimés ou contenir des virus. Toute personne communiquant avec notre 
> entreprise par message électronique accepte ces risques. Les délégations de 
> pouvoirs et d'autorité peuvent être vérifiées et sont disponibles sur demande 
> »
> 
> _______________________________________________
> rsyslog mailing list
> https://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
> What's up with rsyslog? Follow https://twitter.com/rgerhards
> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
> sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T 
> LIKE THAT.

_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to