I have installed td-agent and they provide an init.d script that you can run it with, I have configured td-agent and I run it via the init.d script and it's running smoothly, but I want to move td-agent to be running under Supervisor, I have reread and updated supervisor and my conf of fluentd looks like this.
[program:fluentd]
command=/etc/init.d/td-agent start
stopasgroup=true
stopsignal=QUIT
but when I run this program sudo supervisortctl start fluentd
I got this error.
$ sudo supervisorctl restart fluentd
fluentd: ERROR (spawn error)
and supervisor program log
/tmp/fluentd-stdout---supervisor-Sdy05R.log <==
Starting td-agent: * td-agent
Starting td-agent: * td-agent
Starting td-agent: * td-agent
$ sudo supervisorctl status fluentd
fluentd FATAL Exited too quickly (process log may have details)
but when I search if there any process that are running with td-agent I found this
$ sudo ps aux | grep td-agent
td-agent 16594 0.0 0.0 127080 20860 ? Sl 09:49 0:00 /opt/td-agent/embedded/bin/ruby /usr/sbin/td-agent --log /var/log/td-agent/td-agent.log --daemon /var/run/td-agent/td-agent.pid
td-agent 16599 1.0 0.0 139560 29508 ? Sl 09:49 0:01 /opt/td-agent/embedded/bin/ruby -Eascii-8bit:ascii-8bit /usr/sbin/td-agent --log /var/log/td-agent/td-agent.log --daemon /var/run/td-agent/td-agent.pid --under-supervisor
so, what I understood is that Supervisor it runs the program fluentd
but the init.d script spawn his own process and it didn't notify Supervisor with the new process, so in Supervisor eyes that this init.d script has been terminated?
Any solutions to this?