If you follow the New Relic instruction to setup the daemon. You will get all web applications as a single New Relic App named as PHP Application in the New Relic application console.
So how could we setup multiple New Relic Apps for different virtual hosts in Apache? Here you are.
1. Make sure you have enabled the Apache php5 module. If it is not enabled, enable it by the following command with root privilege.
a2enmod php5
2. For the virtual hosts which you want to enable the New Relic monitor, add the newrelic.appname in the VirtualHost file as follow.
<VirtualHost 192.168.42.43> ServerName www.myvhost1.com DocumentRoot "/path/to/vhost1/" ... #Enable New Relic monitor <IfModule php5_module> php_value newrelic.appname "Virtual Host 1" </IfModule> </VirtualHost>
3. On the other hand, if you want to disable the monitor, edit the VirtualHost as follow.
<VirtualHost 192.168.42.43> ServerName www.myvhost1.com DocumentRoot "/path/to/vhost1/" ... #Disable New Relic monitor <IfModule php5_module> php_flag newrelic.enabled off </IfModule> </VirtualHost>
4. Restart the New Relic dameon.
/etc/init.d/newrelic-daemon restart
5. Restart the Apache.
/etc/init.d/apache2 restart
6. Open a browser an access the websites which have New Relic monitor enabled.
7. Check your New Relic application console.
Done =)
Reference: Per-directory INI Settings
Be aware they send you lots of spam
and do not give promised t-shirt
AFAIK the monitoring tool is not free
Sooo…
LikeLike
That’s not really a spam, just their sales team wanna know more detail from the user.
And i did get the T-shirt from them, it’s really nice.
LikeLike
Thats not true, they started calling me to try and buy their stuff. Its spam.
LikeLike
then i think i am lucky…
LikeLike