Trouble Shooting
Look at Logs
If things are not happening as expected, please first look at your logs. For td-agent
(rpm/deb), the logs are located at /var/log/td-agent/td-agent.log
.
Turn on Verbose Logging
You can get more information about the logs if verbose logging is turned on. Please follow the steps below:
Use Directive in Configuration File
Set log_level trace
.
See the logging article also.
td-agent
td-agent
td-agent
systemd with User's Unit File
td-agent
systemd with User's Unit FilePut your unit file into /etc/systemd/system/td-agent
. This overwrites the existing behavior of /usr/lib/systemd/system/td-agent
.
td-agent
init.d with Environment Variable
td-agent
init.d with Environment Variableedit
/etc/init.d/td-agent
add
-vv
toTD_AGENT_OPTIONS
restart td-agent
This approach does not work on the systemd
environment because systemd
hooks the init.d
's startup routine and ignores the other options.
calyptia-fluentd
calyptia-fluentd
calyptia-fluentd
systemd with User's Unit File
calyptia-fluentd
systemd with User's Unit FilePut your unit file into /etc/systemd/system/calyptia-fluentd.service
. This overwrites the existing behavior of /usr/lib/systemd/system/calyptia-fluentd.service
.
calyptia-fluentd
is only provided systemd
enabled platforms on Linux.
gem
Please add -vv
to your command line:
Dump fluentd's Internal Information
Fluentd uses SIGDUMP for dumping fluentd internal information to a local file, e.g. thread dump, object allocation, etc. If you have a problem with fluentd like process hang, please send SIGCONT
to fluentd parent and child processes.
On Windows, you can use fluent-ctl.
High CPU Usage Issue
If fluentd
suddenly hits unexpected high CPU usage problem, there are several reasons:
a plugin has a race condition or similar bug
dependent gems have a bug
regular expression with broken data
system calls has a bug, e.g.
inotify
with lots of files
In such cases, you can use perf
tool on recent Linux to investigate the problem. See Linux perf Examples page. If you want to know which call causes the problem, pid2line.rb
is useful.
Check Uncaught Logs
You sometimes hit unexpected shutdown with non-zero exit status like this:
If the problem happens inside Ruby e.g. segmentation fault, C extension bug, etc., you cannot get the complete log when fluentd
process is daemonized. For example, td-agent
launches fluentd with --daemon
option. In td-agent
case, you can get the complete log with following command to simulate /etc/init.d/td-agent start
without daemonizing (run in the foreground):
If this article is incorrect or outdated, or omits critical information, please let us know. Fluentd is an open-source project under Cloud Native Computing Foundation (CNCF). All components are available under the Apache 2 License.
Last updated