Need help to write upstart script for newrelic plugin

Mariano González gonzalez.mariano.gabriel at gmail.com
Thu Feb 6 12:12:03 UTC 2014


Thanks Clint!

I've edited the .conf file to: https://gist.github.com/Mariano-gon/8842908

>From messages.log: https://gist.github.com/Mariano-gon/8842922

And newrelic agent never starts.
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?

Thanks!




On 6 February 2014 03:26, Clint Byrum <clint at ubuntu.com> wrote:

> Excerpts from Mariano González's message of 2014-02-05 09:55:59 -0800:
> > Hi there.
> >
> > I'm trying to monitor a newrelic plugin service with upstart in CentOS
> 6.x.
> >
> > Here's newrelic plugin script:
> https://gist.github.com/Mariano-gon/8829482
> >
> > Here's my upstart script: https://gist.github.com/Mariano-gon/8827034
> >
> > When I try to restart it, it'll respawn x times and then stops itself.
> >
> > Here're the log lines: https://gist.github.com/Mariano-gon/8829533
> >
>
> https://gist.github.com/Mariano-gon/8827034#file-newrelic_rs-conf-L7
>
> exec means you will never reach the next line. There is a declarative
> way to change dirs, so you don't need the script stanza at all:
>
> ---
> respawn
> chdir /path/to/plugin_installation
> exec bundle exec ./bin/newrelic_rs
> ---
>
> Note that if you want it to start at boot, don't use any of the weird
> compound start ons you see:
>
> start on runlevel [2345]
> stop on runlevel [016]
>
> Those two should be fine.
>
> --
> upstart-devel mailing list
> upstart-devel at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/upstart-devel
>



-- 
Mariano Gabriel González
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/upstart-devel/attachments/20140206/194f1c60/attachment.html>


More information about the upstart-devel mailing list