Plesk & New Relic

New Relic is a great tool for managing website performance. Recently worked to setup a Plesk 12 server with New Relic. We wanted to have each virtual host on the website represented by an Application in New Relic as documented here:

https://docs.newrelic.com/docs/agents/php-agent/configuration/php-directory-ini-settings

We found a few useful points that we want to share:

1. The newrelic.appname must be removed from /etc/php.d/newrelic.ini.  If the appname is defined in this file then individual virtual hosts will not be able to override and provide there own appname. Just edit the file and comment out the line like:

2. Set the appname for each virtual host from Plesk by going to:

and adding a line like this:

to the “Additional configuration directives” field. Notice that the appname has two components separated by a semicolon. The first is the domain for the site and the second is the fully qualified server hostname. So for example you might do:

and then another site on the server might be:

Now in New Relic, you’ll see three applications. One for store.acme.com, one for blog.acme.com and one for the entire server called web1.acme.com.

Have a project or a problem?

Talk with a senior engineer for practical recommendations—no obligation.

Leave a comment

2 Responses

  1. Hi, thanks for the article… I am struggling with this too, but it seems your fix does not work for me…
    Running on Centos7 + Plesk12 (mod_fcgid)

    My apps keep reporting as PHP Application. Any idea?

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Categories

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.