Answers.Body: <p>If you've got New Relic installed on a server containing more than one site, I've found adding:</p>
  
  <pre><code>if (extension_loaded('newrelic')) {
    newrelic_set_appname('NAME OF SITE');
  }
  </code></pre>
  
  <p>at the top of Craft's index.php allows me to track them individually in New Relic.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-18T21:11:40.593Z
Answers.Text: Awesome Clive, thank you! :) You can also do that in .htaccess, fyi, especially if the installations are in different directories; then it's very easy.
Answers.UserDisplayName: Lisa
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-19T08:46:58.957Z
Answers.LastActivityDate: 2014-12-19T08:46:58.957Z
Answers.UserDisplayName: Clive Portman
Answers.Body: <p>Not quite sure what happened here; Brandon over at EngineHosting re-ran the installation and now I see my info in RPM.  </p>
  
  <p>So for future New Relic users that want to integrate with Craft on EngineHosting - at its most basic, ask EH to get New Relic installed for you.</p>
  
  <p>Exciting!  Thanks @joshangell for the help.  Sometimes knowing it should <em>just work</em> is the key. :)</p>
  
  <p>__</p>
  
  <p>Editing as requested.  <a href="http://enginehosting.com" rel="nofollow noreferrer">EngineHosting</a> fully manages my site/server.  I don't have root via SSH so asked them to get the New Relic PHP agent installated (the agent installation requires root).  EH did install NR for me, but the first installation did not work and I do not know why.  When EngineHosting re-ran the installation, the PHP agent worked and Craft (and other PHP apps, mostly the 'index.php' file for each) started reporting to APM.</p>
  
  <p>That's not helpful for people on cPanel or Plesk hosts, admittedly, nor is it helpful for people with root access doing their own installations.  But if you can get the New Relic PHP agent installed where Craft is, then it will report to APM.  Looking forward to getting more specific metrics from Craft to New Relic down the line, but that is not likely to come from me :)</p>
  
  <hr>
  
  <p>With that very basic installation I get information like this:</p>
  
  <p><img src="https://i.sstatic.net/ZUdYw.png" alt="Craft in NR APM"></p>
  
  <hr>
  
  <p>I hope that helps.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-25T18:11:07.053Z
Answers.Text: Wanted to add to this: so far this is a very basic integration.  As those of you that know me well know, I learn by playing, so step 1 is done.  Now I can help figure out further integration in my copious spare time.  And by copious I mean this could be a while.  If anyone else works with NR and Craft, let me know, here or privately!
Answers.UserDisplayName: Lisa
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-11T20:41:33.007Z
Answers.Text: Lisa, could you please edit your answer so that it makes more sense to people not using the same web host as you do? It's too specific I think.
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-11T20:44:54.393Z
Answers.Text: I also want to add, that I don't know you (should I) or what your job is (interesting?) and I definitely don't know this Brandon guy from that host shop. So please express questions and answers in a way understandable by all of us.
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-11T20:58:54.403Z
Answers.Text: Did your host let you know what was wrong with the first install? Any insights you could give, pointing future readers of this Q/A in the right direction?
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-12T19:20:16.887Z
Answers.Text: Hi Christian; I don't know anything about the installation, my site is on a fully managed server (currently run by EngineHosting (enginehosting.com is my web host)  Brandon is one of the support folks at EngineHosting.
  
  I was told they simply re-did the New Relic installation and got it working.
  I wish I had more information, but as this is a fully managed server and they have infrastructure that is totally alien to me, I just don't know.
Answers.UserDisplayName: Lisa
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-12T19:30:36.100Z
Answers.Text: Edited my answer.
Answers.UserDisplayName: Lisa
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-25T16:44:14.503Z
Answers.LastActivityDate: 2014-07-12T19:40:04.007Z
Answers.LastEditDate: 2014-07-12T19:40:04.007Z
Answers.UserDisplayName: Lisa
Body: <p>I'd like to get Craft working with New Relic so I can play with my two favorite apps.  My web host (EngineHosting) got the New Relic daemons et al going; has anyone tackled getting the Craft side going so that it reports in?</p>
  
  <p>Let me know, please? I may be doing some learning in order to do this integration down the line; but if someone has tackled it, I could dive right on in a bit more quickly.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-06-25T10:20:55.537Z
Comments.Text: Can't say I've done more than just install the standard php monitor but it seems to work fine for me, the only downside is everything on the front end gets run through `/Craft\TemplatesController/render` so that kind of makes the transaction monitoring part a bit useless.
Comments.UserDisplayName: Josh Angell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-06-25T14:39:05.410Z
Comments.Text: Alright awesome.  I'll use this to do some troubleshooting and figure out what is going on.  Thanks Josh!
Comments.UserDisplayName: Lisa
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-11T18:30:57.740Z
Comments.Text: @nicael Please flag questions as you see fit but we aren't closing questions immediately because of a flag.
Comments.UserDisplayName: Anna_MediaGirl
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-11T18:31:46.973Z
Comments.Text: @Anna I know. I already flagged, my flag was helpful, but no action was taken. If you aren't closing, my flag should have been declined.
Comments.UserDisplayName: nicael
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-11T18:34:22.310Z
Comments.Text: "Helpful" doesn't mean immediate closing by moderators for what it's worth. Closing questions is a community process so the question will stay open until it hits the flag limit that closes it or when a moderator agrees it's off topic.
Comments.UserDisplayName: Anna_MediaGirl
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-11T18:38:55.687Z
Comments.Text: Also, a flag can be deemed "helpful" without action taken by a moderator. It's a hat tip, thanking you for taking the time.
Comments.UserDisplayName: Anna_MediaGirl
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-11T19:11:23.510Z
Comments.Text: Nicael and all others who voted to close, could you please leave a comment on why you want a question to be closed? This gives the author a hint on what's wrong with the question and we all can @discuss it in the comments?
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-11T19:18:43.867Z
Comments.Text: This question does not appear to be about Craft CMS, within the scope defined in the [help center](http://craftcms.stackexchange.com/help).
Comments.UserDisplayName: nicael
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-11T19:24:51.130Z
Comments.Text: @nicael do you think we shouldn't have questions about integrating Craft with other software? Maybe I don't get it but what is different with this question here to others like ["How do I configure Varnish to work with Craft"](http://craftcms.stackexchange.com/questions/2/how-do-i-configure-varnish-to-work-with-craft) or this one ["Craft CMS and JS/MVVM frameworks"](http://craftcms.stackexchange.com/questions/745/craft-cms-and-js-mvvm-frameworks)?
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-11T19:30:05.647Z
Comments.Text: @nicael is there a more definite list of questions considered being on- and off-topic? You link was no help for me.
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-11T19:36:12.127Z
Comments.Text: @ChristianSeelbach This question is not about "How do I integrate {something} in Craft?", it is about "What is heard about integrating New Relic in Craft CMS from official sources?" - "Brandon did this and this so now all is ok! Ask questions!". It is announcement, not really a question.
Comments.UserDisplayName: nicael
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-11T19:56:59.977Z
Comments.Text: "Has anyone tackled getting the Craft side going so that it reports in?" was the question, @nicael. Which is pretty similar to "How do I integrate Craft in {something}?" and I wouldn't consider this being an announcement. And answering your own questions is totally fine, as you already know.
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-12T19:26:18.217Z
Comments.Text: This was absolutely a question about how to integrate Craft and New Relic on EngineHosting.  The fact is, EngineHosting does the entire New Relic setup because it is a fully managed server (as opposed to something like cPanel or Plesk).  I asked them to make it happen, and it did.
  
  Craft itself doesn't integrate specifically with New Relic: I mostly get information about index.php.  A plugin (or core integration) would be required to get more sent from Craft to New Relic; a project that I'm unlikely to tackle myself but am considering.
Comments.UserDisplayName: Lisa
Tags: <config>
Title: New Relic and Craft?
ThreadText: # New Relic and Craft?
  
  (Asked by: username_0 on 2014-06-24)
  
  I'd like to get Craft working with New Relic so I can play with my two favorite apps. My web host (EngineHosting) got the New Relic daemons et al going; has anyone tackled getting the Craft side going so that it reports in?
  
  Let me know, please? I may be doing some learning in order to do this integration down the line; but if someone has tackled it, I could dive right on in a bit more quickly.
  
  **Tags:** config
  
  > **Comments:**
  > **username_1**: Can't say I've done more than just install the standard php monitor but it seems to work fine for me, the only downside is everything on the front end gets run through `/Craft\TemplatesController/render` so that kind of makes the transaction monitoring part a bit useless.  
  > **username_0**: Alright awesome.  I'll use this to do some troubleshooting and figure out what is going on.  Thanks username_1!  
  > **username_2**: @username_3 Please flag questions as you see fit but we aren't closing questions immediately because of a flag.  
  > **username_3**: @Anna I know. I already flagged, my flag was helpful, but no action was taken. If you aren't closing, my flag should have been declined.  
  > **username_2**: "Helpful" doesn't mean immediate closing by moderators for what it's worth. Closing questions is a community process so the question will stay open until it hits the flag limit that closes it or when a moderator agrees it's off topic.  
  > **username_2**: Also, a flag can be deemed "helpful" without action taken by a moderator. It's a hat tip, thanking you for taking the time.  
  > **username_4**: username_3 and all others who voted to close, could you please leave a comment on why you want a question to be closed? This gives the author a hint on what's wrong with the question and we all can @discuss it in the comments?  
  > **username_3**: This question does not appear to be about Craft CMS, within the scope defined in the [help center](http://craftcms.stackexchange.com/help).  
  > **username_4**: @username_3 do you think we shouldn't have questions about integrating Craft with other software? Maybe I don't get it but what is different with this question here to others like ["How do I configure Varnish to work with Craft"](http://craftcms.stackexchange.com/questions/2/how-do-i-configure-varnish-to-work-with-craft) or this one ["Craft CMS and JS/MVVM frameworks"](http://craftcms.stackexchange.com/questions/745/craft-cms-and-js-mvvm-frameworks)?  
  > **username_4**: @username_3 is there a more definite list of questions considered being on- and off-topic? You link was no help for me.  
  > **username_3**: @ChristianSeelbach This question is not about "How do I integrate {something} in Craft?", it is about "What is heard about integrating New Relic in Craft CMS from official sources?" - "Brandon did this and this so now all is ok! Ask questions!". It is announcement, not really a question.  
  > **username_4**: "Has anyone tackled getting the Craft side going so that it reports in?" was the question, @username_3. Which is pretty similar to "How do I integrate Craft in {something}?" and I wouldn't consider this being an announcement. And answering your own questions is totally fine, as you already know.  
  > **username_0**: This was absolutely a question about how to integrate Craft and New Relic on EngineHosting.  The fact is, EngineHosting does the entire New Relic setup because it is a fully managed server (as opposed to something like cPanel or Plesk).  I asked them to make it happen, and it did.  Craft itself doesn't integrate specifically with New Relic: I mostly get information about index.php.  A plugin (or core integration) would be required to get more sent from Craft to New Relic; a project that I'm unlikely to tackle myself but am considering.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2014-06-25. Score: 5 | Accepted answer
  
  Not quite sure what happened here; Brandon over at EngineHosting re-ran the installation and now I see my info in RPM.
  
  So for future New Relic users that want to integrate with Craft on EngineHosting - at its most basic, ask EH to get New Relic installed for you.
  
  Exciting! Thanks @username_1 for the help. Sometimes knowing it should *just work* is the key. :)
  
  \_\_
  
  Editing as requested. [EngineHosting](http://enginehosting.com) fully manages my site/server. I don't have root via SSH so asked them to get the New Relic PHP agent installated (the agent installation requires root). EH did install NR for me, but the first installation did not work and I do not know why. When EngineHosting re-ran the installation, the PHP agent worked and Craft (and other PHP apps, mostly the 'index.php' file for each) started reporting to APM.
  
  That's not helpful for people on cPanel or Plesk hosts, admittedly, nor is it helpful for people with root access doing their own installations. But if you can get the New Relic PHP agent installed where Craft is, then it will report to APM. Looking forward to getting more specific metrics from Craft to New Relic down the line, but that is not likely to come from me :)
  
  ---
  
  With that very basic installation I get information like this:
  
  ![Craft in NR APM](https://i.sstatic.net/ZUdYw.png)
  
  ---
  
  I hope that helps.
  
  > **Comments:**
  > **username_0**: Wanted to add to this: so far this is a very basic integration.  As those of you that know me well know, I learn by playing, so step 1 is done.  Now I can help figure out further integration in my copious spare time.  And by copious I mean this could be a while.  If anyone else works with NR and Craft, let me know, here or privately!  
  > **username_4**: username_0, could you please edit your answer so that it makes more sense to people not using the same web host as you do? It's too specific I think.  
  > **username_4**: I also want to add, that I don't know you (should I) or what your job is (interesting?) and I definitely don't know this Brandon guy from that host shop. So please express questions and answers in a way understandable by all of us.  
  > **username_4**: Did your host let you know what was wrong with the first install? Any insights you could give, pointing future readers of this Q/A in the right direction?  
  > **username_0**: Hi Christian; I don't know anything about the installation, my site is on a fully managed server (currently run by EngineHosting (enginehosting.com is my web host)  Brandon is one of the support folks at EngineHosting.  I was told they simply re-did the New Relic installation and got it working. I wish I had more information, but as this is a fully managed server and they have infrastructure that is totally alien to me, I just don't know.  
  > **username_0**: Edited my answer.  
  
  ---
  
  ### Answer by username_5 on 2014-12-19. Score: 4
  
  If you've got New Relic installed on a server containing more than one site, I've found adding:
  
  ```
  if (extension_loaded('newrelic')) {
    newrelic_set_appname('NAME OF SITE');
  }
  
  ```
  
  at the top of Craft's index.php allows me to track them individually in New Relic.
  
  > **Comments:**
  > **username_0**: Awesome username_5, thank you! :) You can also do that in .htaccess, fyi, especially if the installations are in different directories; then it's very easy.  
  
  ---
  
  