I have New Relic installed in a VPS. I have a "default" PHP Application and New Relic is getting data from it, but what server name is it getting from? The VPS contains some subdomains, and the server appears as "domain.com" (so I guess it is getting data from this server name). But I want to get data from "subdomain.domain.com". How can I achieve it?
Edit:
Following @Taibhse link (http://docs.newrelic.com/docs/agents/php-agent/configuration/php-directory-ini-settings#api-calls) I tried:
1. Change Apache2 configuration:
Inside <Directory ...>
:
<IfModule php5_module>
php_value newrelic.appname "myDomain.com"
</IfModule>
Also tried without <IfModule ...>
, but nothing seemed to change.
2. Using API:
Then, I've tried adding:
if (extension_loaded('newrelic')) {
newrelic_set_appname($name);
}
to the index.php
file of one domain.
And also without if (extension_loaded('newrelic'))
, but nothing changed again.
It seems like it's getting data from all VirtualHost
.