2016-09-14 80 views
1

我在fluent.conf文件,並匹配到stdout寫如何添加標籤我fluentd事件

<source> 
    @type tail 
    format nginx 
    path /home/work/opt/nginx/var/log/access.log 
    tag nginx.access 
</source> 

,但是當我做一個電話後到我的網站,nginx的日誌訪問到它的日誌,但fluentd_ui建議

[warn]: no patterns matched tag="nginx.access" 

如何給我的http請求添加標籤?

回答

1
<source> 
    @type tail 
    path /var/log/nginx/access.log 
    pos_file /var/log/access.log.pos 
    tag apache.access 
    format nginx 
</source> 

<match apache.access> 
    @type stdout 
</match> 

嘗試運行此conf文件代碼。我認爲你將能夠解決你的問題!