Get NEWRELIC_LICENSE_KEY from https://rpm.newrelic.com/accounts/
export NEWRELIC_LICENSE_KEY=___CHANGE___THIS___TO___NEWRELIC_LICENSE_KEY____
curl -s https://gist.githubusercontent.com/rahul286/76d4e8c708e73d460a649f1f15bb819d/raw/fcf0024655705db5d11013929d200edb82f607e0/install.sh | bash
#service newrelic-daemon stop
service newrelic-sysmond stop
service php7.0-fpm stop
cd /root/newrelic-npi && ./npi stop nrmysql
pkill newrelic
#sudo systemctl stop newrelic-infra
#service newrelic-daemon start
service newrelic-sysmond start
service php7.0-fpm start
cd /root/newrelic-npi && ./npi start nrmysql
newrelic-plugin-agent -c /etc/newrelic/newrelic-plugin-agent.cfg
#sudo systemctl start newrelic-infra
EE enables nginx-default site which doesn't have config to handle /nginx_status
or /status
. So FPM and Nginx plugin won't send any data.
So edit /etc/nginx/sites-enabled/default
and add following line inside default_server
block
# Status pages
location /nginx_status {
stub_status on;
access_log off;
include common/acl.conf;
}
location ~ ^/(status|ping) {
include fastcgi_params;
fastcgi_pass php7;
include common/acl.conf;
}
Note: FPM will show status for PHP7. If you are using PHP5, change fastcgi_pass php7;
to fastcgi_pass php;
Check output for folllowing requests:
curl localhost/nginx_status
curl localhost/status