Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install new relic #1155

Closed
od3n opened this issue Sep 23, 2017 · 7 comments
Closed

install new relic #1155

od3n opened this issue Sep 23, 2017 · 7 comments
Labels

Comments

@od3n
Copy link

od3n commented Sep 23, 2017

anyone install newrelic on your server? how do you do it?

@khromov
Copy link

khromov commented Sep 26, 2017

Also wondering...

@chrisp-github
Copy link

Yes I have and I will explain in my next post as it will take me a little bit to write it :-)

@chrisp-github
Copy link

Ok so to start the system monitoring tool needs to be installed on your base machine as this will monitor the docker instances as well so go ahead and follow the new relic docs for that one. Small note the new relic server monitoring tool is being removed soon so if you have a paid account go ahead an install the infrastructure stuff instead.

For APM you will want to first edit you php-fpm Dockerfile-{VERSION} file and insert the below code in just above the final touch section.

# install newrelic apm agent
ENV NEWRELIC_FILENAME=newrelic-php5-7.4.0.198-linux-musl.tar.gz
ENV ENVIRONMENT {APP NAME GOES HERE}
ENV NR_INSTALL_SILENT true
ENV NR_INSTALL_KEY {LICENCE KEY GOES HERE}

RUN cd /opt \
    && apt-get install -y wget --no-install-recommends \
	&& wget -O - https://download.newrelic.com/548C16BF.gpg | apt-key add - \
	&& sh -c 'echo "deb http://apt.newrelic.com/debian/ newrelic non-free" > /etc/apt/sources.list.d/newrelic.list' \
	&& apt-get update \
	&& apt-get install -y newrelic-php5 --no-install-recommends \
	&& newrelic-install install

Then rebuild you nginx container and new relic should be installed and monitoring.

If you have multiple site running then you will want to edit you nginx site config and add the code below into each of the location ~ .php$ sections for each site

fastcgi_param PHP_VALUE "newrelic.appname={SITE NAME}";

@stale
Copy link

stale bot commented Feb 2, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Feb 2, 2020
@stale
Copy link

stale bot commented Feb 23, 2020

Hi again 👋 we would like to inform you that this issue has been automatically closed 🔒 because it had not recent activity during the stale period. We really really appreciate your contributions, and looking forward for more in the future 🎈.

@stale stale bot closed this as completed Feb 23, 2020
@aconital
Copy link

@shadow2004 when I run your script in my php-fpm dockerfile I get this error:
Cannot write to '-' (Broken pipe). . Any Idea why?

@shapito27
Copy link
Contributor

@shadow2004 when I run your script in my php-fpm dockerfile I get this error:
Cannot write to '-' (Broken pipe). . Any Idea why?

I've faced with same problem. Fixed by adding:
apt-get install -y apt-transport-https gnupg

  apt-get install -y wget --no-install-recommends \
   && apt-get install -y apt-transport-https gnupg \
   && sh -c 'echo "deb http://apt.newrelic.com/debian/ newrelic non-free" > /etc/apt/sources.list.d/newrelic.list' \
   && wget -O- https://download.newrelic.com/548C16BF.gpg | apt-key add - \
   && apt-get update \
   && apt-get install -y newrelic-php5 --no-install-recommends \
   && newrelic-install install \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants