Is it possible to tailing fluentd's log by fluentd?

20 views
Skip to first unread message

Eugene Gwon

unread,
Sep 21, 2016, 10:46:51 PM9/21/16
to Fluentd Google Group
Hello all,
    when td-agent failed to parsing or sending log, It'll be recored in /var/log/td-agent.log.
so I tried to ship it to graylog and make alarm when td-agent parsing error detected.

but strangely, td-agent won't tailing another log files if I add rule like below :
#for fluentd itself

<source>

       type tail

       format /^(?<time>(.*)) \[(?<level>(.*))\]: (?<parse_error_message>(.*))$/

       time_format "%Y-%m-%d %H:%M:%S"

       path /var/log/td-agent/td-agent.log

       pos_file /tmp/fluentd.pos

       tag graylog2.fluentd_err

       refresh_interval 5

</source>



Is td-agent can't tailing log made by itself?
or, can td-agent logging into syslog instead of /var/log/td-agent.log?

thanks for help :)




Mr. Fiber

unread,
Sep 22, 2016, 9:35:30 PM9/22/16
to Fluentd Google Group
Could you paste your entire log here?
Are there no "following tail of /file/to/path" in the logs?


Masahiro

--
You received this message because you are subscribed to the Google Groups "Fluentd Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fluentd+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eugene Gwon

unread,
Sep 23, 2016, 6:41:52 AM9/23/16
to Fluentd Google Group
Thanks for response Masahiro.
I can see that 'following tail of' message in td-agent.log.
 
but I somply solved this - just add 'fluent' to match rules like this :
------------------------------
<match {fluent,graylog2}.**>
type copy
<store>
type gelf
host <%=@graylogip%>
port  <%=@graylogport%>
flush_interval 1s
</store>
<store>
type stdout
</store>
</match>
------------------------------

Now I can see that fluentd record It's logs using tag 'fluent.warn'.

thanks for help :)

 
To unsubscribe from this group and stop receiving emails from it, send an email to fluentd+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages