Newrelic application monitoring


#1

Hi –

Anyone have experience adding newrelic?

I’m adding newrelic monitoring to an application that uses
django/gunicorn/supervisor.
First, I notice that there are three opscode newrelic cookbooks:
newrelic_monitoring
newrelic-ng
newrelic

It looks like the newrelic-ng is the only one that includes application,
as opposed to system, monitoring. Is that correct?
Also, it looks like it doesn’t automatically setup monitoring. I think
you still have to modify the supervisor template in order to run the
newrelic wrapper script.
That doesn’t look to hard, but I don’t want to re-invent the wheel if
someone else has already done this.
An example would be useful.

I’m also going to add the newrelic server monitoring, but that looks
simple since it’s relatively independent.

Thanks!
Liam


Liam Kirsher
PGP: http://liam.numenet.com/pgp/


#2

Not sure how it’s done in the python world.

But in the Ruby world, the NewRelic app monitoring is simply added as any
other application gem (library). So it’s available in dev with a useful dev
mode. And it’s automatically installed upon deployment by Bundler.

Is there something similar in the Python world?

And you’re right, server monitoring is a breeze to install. And very useful.

Mat

On Saturday, June 29, 2013, Liam Kirsher wrote:

Hi –

Anyone have experience adding newrelic?

I’m adding newrelic monitoring to an application that uses
django/gunicorn/supervisor.
First, I notice that there are three opscode newrelic cookbooks:
newrelic_monitoring
newrelic-ng
newrelic

It looks like the newrelic-ng is the only one that includes application,
as opposed to system, monitoring. Is that correct?
Also, it looks like it doesn’t automatically setup monitoring. I think
you still have to modify the supervisor template in order to run the
newrelic wrapper script.
That doesn’t look to hard, but I don’t want to re-invent the wheel if
someone else has already done this.
An example would be useful.

I’m also going to add the newrelic server monitoring, but that looks
simple since it’s relatively independent.

Thanks!
Liam


Liam Kirsher
PGP: http://liam.numenet.com/pgp/

I’m the founder of Rock Solid Ops Inc, a web consultancy.

My main fields of expertise are Ruby on Rails web development, DevOps and a
bit of mobile. If you need help scaling, understanding, securing or
managing your web infrastructure (Rails or not), get in touch!

Connect with me and read testimonials on my
LinkedInhttp://ca.linkedin.com/in/mathieumartin/,
follow me on twitter @webmat http://twitter.com/webmat, or check out my
blog at programblings.comhttp://www.programblings.com?utm_source=email+signature
.

If you’re a tech person, the following may make sense to you.

I’m the author of
git_remote_branchhttps://rubygems.org/gems/git_remote_branch.
A tool that’s been helping common mortals like me share git branches for 5
years. Downloaded 50 000 times.

I’ve also contributed to some of the popular libraries in the Rails, jQuery
and PhoneGap ecosystems:

paperclip, active_admin, jquery-ujs, jquery-rails, kaminari, AssetSync,
phonegap-plugin-facebook-connect, shoulda, woulda, jeweler.

If you visit them on GitHub, you’ll see my face in the "Contributors"
section :slight_smile:


#3

In Python it is also installed as a package, and then runs as a wrapper
around the python/django application.

To use the wrapper script when running a standalone WSGI server or web
application, you will need to modify the existing startup command you
use for that WSGI server or web application. At the same time, you
must set environment variables to tell the wrapper script where the
agent configuration file is located or what the license key is.

In general terms, if you you are currently executing your WSGI server
or web application as:

|command options
|

you would now need to run it instead as:

|NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program command options
|

The wrapper script is ‘newrelic-admin’ and is being run with the
’run-program’ option. This is prefixing the complete existing command
you used previously when starting your WSGI server or web application.

I thought someone might have already come up with a way to modify the
supervisor config file in that manner.

On 06/29/2013 11:00 AM, Mathieu Martin wrote:

Not sure how it’s done in the python world.

But in the Ruby world, the NewRelic app monitoring is simply added as
any other application gem (library). So it’s available in dev with a
useful dev mode. And it’s automatically installed upon deployment by
Bundler.

Is there something similar in the Python world?

And you’re right, server monitoring is a breeze to install. And very
useful.

Mat

On Saturday, June 29, 2013, Liam Kirsher wrote:

Hi --

Anyone have experience adding newrelic?

I'm adding newrelic monitoring to an application that uses
django/gunicorn/supervisor.
First, I notice that there are three opscode newrelic cookbooks:
newrelic_monitoring
newrelic-ng
newrelic

It looks like the newrelic-ng is the only one that includes
application,
as opposed to system, monitoring.  Is that correct?
Also, it looks like it doesn't automatically setup monitoring.  I
think
you still have to modify the supervisor template in order to run the
newrelic wrapper script.
That doesn't look to hard, but I don't want to re-invent the wheel if
someone else has already done this.
An example would be useful.

I'm also going to add the newrelic server monitoring, but that looks
simple since it's relatively independent.

Thanks!
Liam


--
Liam Kirsher
PGP: http://liam.numenet.com/pgp/

I’m the founder of Rock Solid Ops Inc, a web consultancy.

My main fields of expertise are Ruby on Rails web development, DevOps
and a bit of mobile. If you need help scaling, understanding, securing
or managing your web infrastructure (Rails or not), get in touch!

Connect with me and read testimonials on my LinkedIn
http://ca.linkedin.com/in/mathieumartin/, follow me on
twitter @webmat http://twitter.com/webmat, or check out my blog at
programblings.com
http://www.programblings.com?utm_source=email+signature.

If you’re a tech person, the following may make sense to you.

I’m the author of git_remote_branch
https://rubygems.org/gems/git_remote_branch. A tool that’s been
helping common mortals like me share git branches for 5 years.
Downloaded 50 000 times.

I’ve also contributed to some of the popular libraries in the
Rails, jQuery and PhoneGap ecosystems:

paperclip, active_admin, jquery-ujs, jquery-rails, kaminari,
AssetSync, phonegap-plugin-facebook-connect, shoulda, woulda, jeweler.

If you visit them on GitHub, you’ll see my face in the "Contributors"
section :slight_smile:


Liam Kirsher
PGP: http://liam.numenet.com/pgp/


#4

Sounds lime something I’d do with runit. And the env vars can be managed in
a modular fashion with chpst -e (comes with runit).

On Saturday, June 29, 2013, Liam Kirsher wrote:

In Python it is also installed as a package, and then runs as a wrapper
around the python/django application.

To use the wrapper script when running a standalone WSGI server or web
application, you will need to modify the existing startup command you use
for that WSGI server or web application. At the same time, you must set
environment variables to tell the wrapper script where the agent
configuration file is located or what the license key is.

In general terms, if you you are currently executing your WSGI server or
web application as:

command options

you would now need to run it instead as:

NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program command
options

The wrapper script is ‘newrelic-admin’ and is being run with the
’run-program’ option. This is prefixing the complete existing command you
used previously when starting your WSGI server or web application.

I thought someone might have already come up with a way to modify the
supervisor config file in that manner.

On 06/29/2013 11:00 AM, Mathieu Martin wrote:

Not sure how it’s done in the python world.

But in the Ruby world, the NewRelic app monitoring is simply added as
any other application gem (library). So it’s available in dev with a useful
dev mode. And it’s automatically installed upon deployment by Bundler.

Is there something similar in the Python world?

And you’re right, server monitoring is a breeze to install. And very
useful.

Mat

On Saturday, June 29, 2013, Liam Kirsher wrote:

Hi –

Anyone have experience adding newrelic?

I’m adding newrelic monitoring to an application that uses
django/gunicorn/supervisor.
First, I notice that there are three opscode newrelic cookbooks:
newrelic_monitoring
newrelic-ng
newrelic

It looks like the newrelic-ng is the only one that includes application,
as opposed to system, monitoring. Is that correct?
Also, it looks like it doesn’t automatically setup monitoring. I think
you still have to modify the supervisor template in order to run the
newrelic wrapper script.
That doesn’t look to hard, but I don’t want to re-invent the wheel if
someone else has already done this.
An example would be useful.

I’m also going to add the newrelic server monitoring, but that looks
simple since it’s relatively independent.

Thanks!
Liam


Liam Kirsher
PGP: http://liam.numenet.com/pgp/

I’m the founder of Rock Solid Ops Inc, a web consultancy.

My main fields of expertise are Ruby on Rails web development, DevOps
and a bit of mobile. If you need help scaling, understanding, securing or
managing your web infrastructure (Rails or not), get in touch!

Connect with me and read testimonials on my LinkedInhttp://ca.linkedin.com/in/mathieumartin/,
follow me on twitter @webmat http://twitter.com/webmat, or check out my
blog at programblings.comhttp://www.programblings.com?utm_source=email+signature
.

If you’re a tech person, the following may make sense to you.

I’m the author of git_remote_branchhttps://rubygems.org/gems/git_remote_branch.
A tool that’s been helping common mortals like me share git branches for
5 years. Downloaded 50 000 times.

I’ve also contributed to some of the popular libraries in the Rails, jQuery
and PhoneGap ecosystems:

paperclip, active_admin, jquery-ujs, jquery-rails, kaminari, AssetSync,
phoneg

I’m the founder of Rock Solid Ops Inc, a web consultancy.

My main fields of expertise are Ruby on Rails web development, DevOps and a
bit of mobile. If you need help scaling, understanding, securing or
managing your web infrastructure (Rails or not), get in touch!

Connect with me and read testimonials on my
LinkedInhttp://ca.linkedin.com/in/mathieumartin/,
follow me on twitter @webmat http://twitter.com/webmat, or check out my
blog at programblings.comhttp://www.programblings.com?utm_source=email+signature
.

If you’re a tech person, the following may make sense to you.

I’m the author of
git_remote_branchhttps://rubygems.org/gems/git_remote_branch.
A tool that’s been helping common mortals like me share git branches for 5
years. Downloaded 50 000 times.

I’ve also contributed to some of the popular libraries in the Rails, jQuery
and PhoneGap ecosystems:

paperclip, active_admin, jquery-ujs, jquery-rails, kaminari, AssetSync,
phonegap-plugin-facebook-connect, shoulda, woulda, jeweler.

If you visit them on GitHub, you’ll see my face in the "Contributors"
section :slight_smile:


#5

The newrelic (http://community.opscode.com/cookbooks/newrelic,
https://github.com/escapestudios/chef-newrelic) has worked well for me for
server monitoring, and it looks like it has a python-agent recipe that
installs the pip package and lets you configure the ini file.

I’ve really only used the app monitoring with Ruby, and on there it’s all
handled in the app’s configuration, so sorry I can’t be much help there.

Also, I like what I see with the new platform monitoring stuff
(http://newrelic.com/platform), and I’ve been messing around trying to add
some recipes or LWRPs for that stuff, so if anybody’s interested in
helping, let me know.

Nathan L Smith
smith@opscode.com
(319) 339-0466

On 6/29/13 11:33 AM, “Liam Kirsher” liamk@numenet.com wrote:

Hi –

Anyone have experience adding newrelic?

I’m adding newrelic monitoring to an application that uses
django/gunicorn/supervisor.
First, I notice that there are three opscode newrelic cookbooks:
newrelic_monitoring
newrelic-ng
newrelic

It looks like the newrelic-ng is the only one that includes application,
as opposed to system, monitoring. Is that correct?
Also, it looks like it doesn’t automatically setup monitoring. I think
you still have to modify the supervisor template in order to run the
newrelic wrapper script.
That doesn’t look to hard, but I don’t want to re-invent the wheel if
someone else has already done this.
An example would be useful.

I’m also going to add the newrelic server monitoring, but that looks
simple since it’s relatively independent.

Thanks!
Liam


Liam Kirsher
PGP: http://liam.numenet.com/pgp/


#6

We use the New Relic Python agent, however we don’t really use Chef to
manage it.

The newrelic.ini is bundled with our application, and the python package is
specified in our requirements.txt.

All Chef does is template the Gunicorn configuration file with or without
the newrelic runner based on a switch.

On Sat, Jun 29, 2013 at 11:10 PM, Nathan Smith smith@opscode.com wrote:

The newrelic (http://community.opscode.com/cookbooks/newrelic,
https://github.com/escapestudios/chef-newrelic) has worked well for me for
server monitoring, and it looks like it has a python-agent recipe that
installs the pip package and lets you configure the ini file.

I’ve really only used the app monitoring with Ruby, and on there it’s all
handled in the app’s configuration, so sorry I can’t be much help there.

Also, I like what I see with the new platform monitoring stuff
(http://newrelic.com/platform), and I’ve been messing around trying to add
some recipes or LWRPs for that stuff, so if anybody’s interested in
helping, let me know.

Nathan L Smith
smith@opscode.com
(319) 339-0466

On 6/29/13 11:33 AM, “Liam Kirsher” liamk@numenet.com wrote:

Hi –

Anyone have experience adding newrelic?

I’m adding newrelic monitoring to an application that uses
django/gunicorn/supervisor.
First, I notice that there are three opscode newrelic cookbooks:
newrelic_monitoring
newrelic-ng
newrelic

It looks like the newrelic-ng is the only one that includes application,
as opposed to system, monitoring. Is that correct?
Also, it looks like it doesn’t automatically setup monitoring. I think
you still have to modify the supervisor template in order to run the
newrelic wrapper script.
That doesn’t look to hard, but I don’t want to re-invent the wheel if
someone else has already done this.
An example would be useful.

I’m also going to add the newrelic server monitoring, but that looks
simple since it’s relatively independent.

Thanks!
Liam


Liam Kirsher
PGP: http://liam.numenet.com/pgp/


#7

Ah. Well, that seems simpler.
I’ll try that.

On 07/01/2013 07:17 AM, Andrew Gross wrote:

We use the New Relic Python agent, however we don’t really use Chef to
manage it.

The newrelic.ini is bundled with our application, and the python
package is specified in our requirements.txt.

All Chef does is template the Gunicorn configuration file with or
without the newrelic runner based on a switch.

On Sat, Jun 29, 2013 at 11:10 PM, Nathan Smith <smith@opscode.com
mailto:smith@opscode.com> wrote:

The newrelic (http://community.opscode.com/cookbooks/newrelic,
https://github.com/escapestudios/chef-newrelic) has worked well
for me for
server monitoring, and it looks like it has a python-agent recipe that
installs the pip package and lets you configure the ini file.

I've really only used the app monitoring with Ruby, and on there
it's all
handled in the app's configuration, so sorry I can't be much help
there.

Also, I like what I see with the new platform monitoring stuff
(http://newrelic.com/platform), and I've been messing around
trying to add
some recipes or LWRPs for that stuff, so if anybody's interested in
helping, let me know.


Nathan L Smith
smith@opscode.com <mailto:smith@opscode.com>
(319) 339-0466 <tel:%28319%29%20339-0466>






On 6/29/13 11:33 AM, "Liam Kirsher" <liamk@numenet.com
<mailto:liamk@numenet.com>> wrote:

>Hi --
>
>Anyone have experience adding newrelic?
>
>I'm adding newrelic monitoring to an application that uses
>django/gunicorn/supervisor.
>First, I notice that there are three opscode newrelic cookbooks:
>newrelic_monitoring
>newrelic-ng
>newrelic
>
>It looks like the newrelic-ng is the only one that includes
application,
>as opposed to system, monitoring.  Is that correct?
>Also, it looks like it doesn't automatically setup monitoring.  I
think
>you still have to modify the supervisor template in order to run the
>newrelic wrapper script.
>That doesn't look to hard, but I don't want to re-invent the wheel if
>someone else has already done this.
>An example would be useful.
>
>I'm also going to add the newrelic server monitoring, but that looks
>simple since it's relatively independent.
>
>Thanks!
>Liam
>
>
>--
>Liam Kirsher
>PGP: http://liam.numenet.com/pgp/
>


Liam Kirsher
PGP: http://liam.numenet.com/pgp/