zoukankan      html  css  js  c++  java
  • rsyslog 日志服务器端配置

    $EscapeControlCharactersOnReceive off      #关闭rsyslog默认转译ASCII<32的所有怪异字符,包括换行符等
    $template tocFormat,"%msg%
    "
    #$template tocFormat,"%syslogtag%,%msg%
    "
    $template zjzc-flow01,"/data01/applog_backup/zjzc_log/zj-flow01-catalina.out.%$year%-%$month%-%$day%"       #定义TC:日志存放路径
    $template zjzc-flow02,"/data01/applog_backup/zjzc_log/zj-flow02-catalina.out.%$year%-%$month%-%$day%"       #定义TC:日志存放路径
    $template zjzc-api01,"/data01/applog_backup/zjzc_log/zj-api01-catalina.out.%$year%-%$month%-%$day%"       #定义TC:日志存放路径
    $template zjzc-api02,"/data01/applog_backup/zjzc_log/zj-api02-catalina.out.%$year%-%$month%-%$day%"       #定义TC:日志存放路径
    $template zjzc-pay01,"/data01/applog_backup/zjzc_log/zj-pay01-catalina.out.%$year%-%$month%-%$day%"       #定义TC:日志存放路径
    $template zjzc-pay02,"/data01/applog_backup/zjzc_log/zj-pay02-catalina.out.%$year%-%$month%-%$day%"       #定义TC:日志存放路径
    ########################温金
    $template wj-flow01,"/data01/applog_backup/winfae_log/wj-flow01-catalina.out.%$year%-%$month%-%$day%"       #定义TC:日志存放路径
    $template wj-flow02,"/data01/applog_backup/winfae_log/wj-flow02-catalina.out.%$year%-%$month%-%$day%"       #定义TC:日志存放路径
    $template wj-api01,"/data01/applog_backup/winfae_log/wj-api01-catalina.out.%$year%-%$month%-%$day%"       #定义TC:日志存放路径
    $template wj-api02,"/data01/applog_backup/winfae_log/wj-api02-catalina.out.%$year%-%$month%-%$day%"       #定义TC:日志存放路径
    $template wj-pay01,"/data01/applog_backup/winfae_log/wj-pay01-catalina.out.%$year%-%$month%-%$day%"       #定义TC:日志存放路径
    $template wj-pay02,"/data01/applog_backup/winfae_log/wj-pay02-catalina.out.%$year%-%$month%-%$day%"       #定义TC:日志存放路径
    $template wj-proxy01,"/data01/applog_backup/winfae_log/wj-proxy01-catalina.out.%$year%-%$month%-%$day%"       #定义TC:日志存放路径
    :syslogtag,isequal,"wj-flow01"  -?wj-flow01;tocFormat
    :syslogtag,isequal,"wj-flow02"  -?wj-flow02;tocFormat
    :syslogtag,isequal,"wj-api01"  -?wj-api01;tocFormat
    :syslogtag,isequal,"wj-api02"  -?wj-api02;tocFormat
    :syslogtag,isequal,"wj-pay01"  -?wj-pay01;tocFormat
    :syslogtag,isequal,"wj-pay02"  -?wj-pay02;tocFormat
    :syslogtag,isequal,"wj-proxy01"  -?wj-proxy01;tocFormat
    
    
    ######################中均
    :syslogtag,isequal,"zjzc-flow01"  -?zjzc-flow01;tocFormat
    :syslogtag,isequal,"zjzc-flow02"  -?zjzc-flow02;tocFormat
    :syslogtag,isequal,"zjzc-api01"  -?zjzc-api01;tocFormat
    :syslogtag,isequal,"zjzc-api02"  -?zjzc-api02;tocFormat
    :syslogtag,isequal,"zjzc-pay01"  -?zjzc-pay01;tocFormat
    :syslogtag,isequal,"zjzc-pay02"  -?zjzc-pay02;tocFormat
    #if $syslogfacility-text == 'local5' and $msg startswith 'zjzc-flow01'  then   -?zjzc-flow01;tocFormat
    
    
    rsyslog 这里不需要配置 #$template tocFormat,"%syslogtag%,%msg%
    "
    
    就可以按照 :syslogtag,isequal,"zjzc-flow01" 进行匹配

  • 相关阅读:
    chrome浏览器,阻止回调方法中的window.open()方法
    安装1.4.2版本的Django
    noindex与nofllow标签的作用和用法
    mybatis中写sql语句时需要转义的字符
    GridView 导出到Excel
    (转)利用Cache防止同一帐号重复登录 (c#) .
    利用NPOI 导出文件到Excel (导出合同)
    TreeView控件的属性和事件【转】
    C# 数字货币转换大写方法
    Server 2003 IIS 发布网站
  • 原文地址:https://www.cnblogs.com/zhaoyangjian724/p/6199357.html
Copyright © 2011-2022 走看看