<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Thanks Clint! </div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">
I've edited the .conf file to: <a href="https://gist.github.com/Mariano-gon/8842908">https://gist.github.com/Mariano-gon/8842908</a></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">
>From messages.log: <a href="https://gist.github.com/Mariano-gon/8842922">https://gist.github.com/Mariano-gon/8842922</a></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">
And newrelic agent never starts. </div><div class="gmail_default" style="font-family:tahoma,sans-serif">This plugin/agent needs to be run (bundle exec ./bin/newrelic_rs) inside /path_installation/newrelic_rs_dfw/ (I think that's because it is where the right gem is installed). So, my guess would be that initctl is not relocating itself in /path_installation/newrelic_rs_dfw/ to run the budle exec and that's why it's falling to start. Could it be?<br>
<br>Thanks!</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 6 February 2014 03:26, Clint Byrum <span dir="ltr"><<a href="mailto:clint@ubuntu.com" target="_blank">clint@ubuntu.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Excerpts from Mariano González's message of 2014-02-05 09:55:59 -0800:<br>
<div class="">> Hi there.<br>
><br>
> I'm trying to monitor a newrelic plugin service with upstart in CentOS 6.x.<br>
><br>
> Here's newrelic plugin script: <a href="https://gist.github.com/Mariano-gon/8829482" target="_blank">https://gist.github.com/Mariano-gon/8829482</a><br>
><br>
> Here's my upstart script: <a href="https://gist.github.com/Mariano-gon/8827034" target="_blank">https://gist.github.com/Mariano-gon/8827034</a><br>
><br>
> When I try to restart it, it'll respawn x times and then stops itself.<br>
><br>
> Here're the log lines: <a href="https://gist.github.com/Mariano-gon/8829533" target="_blank">https://gist.github.com/Mariano-gon/8829533</a><br>
><br>
<br>
</div><a href="https://gist.github.com/Mariano-gon/8827034#file-newrelic_rs-conf-L7" target="_blank">https://gist.github.com/Mariano-gon/8827034#file-newrelic_rs-conf-L7</a><br>
<br>
exec means you will never reach the next line. There is a declarative<br>
way to change dirs, so you don't need the script stanza at all:<br>
<br>
---<br>
respawn<br>
chdir /path/to/plugin_installation<br>
exec bundle exec ./bin/newrelic_rs<br>
---<br>
<br>
Note that if you want it to start at boot, don't use any of the weird<br>
compound start ons you see:<br>
<br>
start on runlevel [2345]<br>
stop on runlevel [016]<br>
<br>
Those two should be fine.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
upstart-devel mailing list<br>
<a href="mailto:upstart-devel@lists.ubuntu.com">upstart-devel@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/upstart-devel" target="_blank">https://lists.ubuntu.com/mailman/listinfo/upstart-devel</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Mariano Gabriel González</div>
</div>