码迷,mamicode.com
首页 > Windows程序 > 详细

日志采集器windows客户端的配置释义

时间:2018-06-22 13:25:28      阅读:307      评论:0      收藏:0      [点我收藏+]

标签:adf   tom   cat   multi   check   convert   host   sig   json   

<Extension json>  
    Module  xm_json
</Extension>
<Extension charconv>
    Module  xm_charconv
    AutodetectCharsets GBK       #自动检测GBK字符集 并在input中定义
</Extension>

<Extension  multiline>
    Module  xm_multiline        #多行匹配    
    HeaderLine  /^\d+-\w+-\d+/     #行首匹配
</Extension>

<Input access>
        Module  im_file
        File    "/home/tomcat/access.log"  #定义了采集的日志路径,可支持通配符
        SavePos TRUE
        ReadFromLast    TRUE
        Recursive   TRUE
        RenameCheck TRUE
        PollInterval    1
        Exec   convert_fields("AUTO","utf-8");  #表示识别GBK中的字符编码,并转化为UTF8编码
        Exec    $source = host_ip();
        Exec    $sourcetype = " tomcat-access";
        Exec    $app = "WEB";
        Exec    $filename = file_name();
</Input>

<Input catalina>
        Module  im_file
        File    "/home/tomcat/catalina.out"
        SavePos TRUE
        ReadFromLast	TRUE
        Recursive   TRUE
        RenameCheck TRUE
        PollInterval    1
        InputType   multiline
        #Exec   convert_fields("AUTO","utf-8");
        Exec    $source = host_ip();
        Exec    $sourcetype = "tomcat-catalina";
        Exec    $app = "WEB";
        Exec    $filename = file_name();
</Input>

<Output loginsight_access>
        Module  om_tcp
        Host    192.168.11.196
        Port    1516
        Exec    sleep (1000);
        Exec    $message = $raw_event;to_json();
</Output>

<Output loginsight_catalina>
        Module  om_tcp
        Host    192.168.11.196
        Port    1517
        Exec    sleep (1000);
        Exec    $message = $raw_event;to_json();
</Output>

<Route 1>
        Path    access => loginsight_access
</Route>

<Route 2>
        Path    catalina => loginsight_catalina
</Route>

  

日志采集器windows客户端的配置释义

标签:adf   tom   cat   multi   check   convert   host   sig   json   

原文地址:https://www.cnblogs.com/neilyoung22/p/9212393.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!