Hi Kiyoto, I have verified that the dash is included.
With the DAEMON_ARGS=-vv : the init.d/td-agent start (or restart) does not succeed and does not show any error. running init.d/td-agent status shows that ruby is not running
Without the DAEMON_ARGS=-vv : The init.d/td-agent starts. Again, does not show any success or error. running init.d/td-agent status shows that ruby is running. verified that two processes are running.
But I have good news. I have solved the in_exec problem I was having with my hello.py.
1) I tried running td-agent from my users with the command:
$td-agent -c /etc/td-agent/td-agent.conf -vv
This worked! so I know td-agent, my conf file, verbose debug and my hello.py were working.
2) I tried a simple sh script using init.d/td-agent start where the script was:
stuff=$(python -V)
This did not work on my local user or init.d/td-agent start. REASON: python -V returns the python version through stderr. stderr is not captured by in_exec. not capturing stderr and storing somewhere is of great concern.
I changed this script to
stuff=$(python -V 2>&1) and the script worked for both my local user and init.d/td-agent start
Here are my concerns:
1) It is very difficult to debug an in_exec script due to the lack of stderr reporting.
In my case, my hello.py includes its own logging so I can see what is happening within my script. This worked fine when running from my local user because my log file had correct permissions. When I tried to run this from init.d/td-agent which runs in the td-agent environment, that user did not have permissions to write to my log file. The hello.py program properly sent an error out stderr however, that message was never visible in the td-agent.log or anywhere else.
Now that I know this I can be more careful. However, I feel that anything that comes out of stderr should go somewhere, maybe a td-agent-stderr.log If I had been able to see this message I would have immediately known the problem and fixed it!
I do not know if the stderr problem is also an issue when developing an in_ or out_ plugin. As my team engages more with td-agent, we will be very concerned about how to get stderr messages. I have a work-around with in_exec (run the program from an sh script and re-direct stderr to stdout [2>&1]).
Thank you very much for your patience with me. Please do consider how to capture all stderr messages and store them in a log from a td-agent running as td-agent and change the init.d/td-agent start so that it returns a success or failure.
Paula
On Friday, July 12, 2013 5:43:39 PM UTC-7, Paula Keezer wrote: