zoukankan      html  css  js  c++  java
  • freshStartTail 第一次启动时 抛弃旧的日志

    freshStartTail [on/off] (requires v8.18.0+)
    Default: off
    
    This is used to tell rsyslog to seek to the end/tail of input files (discard old logs)**at its first start(freshStart)** and process only new log messages.
    
    When deploy rsyslog to a large number of servers, we may only care about new log messages generated after the deployment. set freshstartTail to on will discard old logs. Otherwise, there may be vast useless message burst on the remote central log receiver
    
    
    这是告诉 rsyslog来寻求 输入日志的尾部,抛弃旧的日志 在第一次启动的时候,只处理最新的日志
    
    当部署rsyslog 到一大量的服务器的时候,我们只关心新的日志,
    
    设置 freshstartTail 为on 会忽略老的日志。
    
    $ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
    $ModLoad imklog   # provides kernel logging support (previously done by rklogd)
    module(load="imfile" PollingInterval="5")
    $ModLoad imtcp
    $InputTCPServerRun 514
    $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
    $IncludeConfig /etc/rsyslog.d/*.conf
    *.info;mail.none;authpriv.none;cron.none;local5.none                /var/log/messages
    authpriv.*                                              /var/log/secure
    mail.*                                                  -/var/log/maillog
    cron.*                                                  /var/log/cron
    uucp,news.crit                                          /var/log/spooler
    local7.*                                                /var/log/boot.log
    $InputFilePersistStateInterval 1
    input(type="imfile"
    File="/var/log/nginx/access.log"
    Tag="zjzc-frontend01-access"
    PersistStateInterval="1"
    reopenOnTruncate="on"
    freshStartTail="on"
    Severity="info"
    Facility="local5")
    
    
    input(type="imfile"
    File="/var/log/nginx/error.log"
    Tag="zjzc-frontend01-error"
    Severity="info"
    PersistStateInterval="1"
    reopenOnTruncate="on"
    freshStartTail="on"
    Facility="local5")
    local5.* @@115.236.160.82:9514

  • 相关阅读:
    mybatis 对string类型判断比较 group case when then 综合
    利用Apache shiro SimpleHash 加密字符串
    linux下用rpm 安装jdk
    运行java程序的时候出现Exception in thread "main" java.lang.UnsupportedClassVersionError:
    linux如何查看端口被哪个进程占用?
    Linux如何查看JDK的安装路径
    Linux中查看jdk版本
    linux修改/etc/profile权限
    db2,oracle,mysql ,sqlserver限制返回的行数
    什么是T-SQL
  • 原文地址:https://www.cnblogs.com/zhaoyangjian724/p/6198931.html
Copyright © 2011-2022 走看看