rsyslog配置之logs/*.log" contains wildcards. This is not supported in polling mode.

本文探讨了rsyslog中出现的错误2420及其解决方案,同时涉及了在polling模式下不支持通配符的问题。通过链接提供的资源,读者可以深入了解rsyslog配置和错误排查的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

# 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 $FileCreateMode 0640 #### 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 #### kern.* -/var/log/kern.log user.* -/var/log/user.log cron.* -/var/log/cron.log #local0.*;local1.*;local2.*;local3.* -/var/log/local.log #local3.* -/var/log/agent.log local4.* -/var/log/event.log local1.* -/var/log/telswitch.log # $ModLoad impstats # $PStatInterval 60 # $PStatSeverity 6 syslog.* /var/log/agent.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 ### # $ModLoad imptcp # $InputPTCPServerRun 514 $ActionQueueTimeoutEnqueue 0 $MainMsgQueueTimeoutEnqueue 0 local3.=debug @@127.0.0.1:10514 local3.=info @@127.0.0.1:10514 :msg,contains,"event_id=1027" @192.168.134.159:50514#012aaa 你能给我解读一下这个配置文件的信息嘛
03-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值