NGINX Amplify is a SaaS‑based monitoring tool for the open source NGINX software and NGINX Plus. With NGINX Amplify you can monitor performance, keep track of infrastructure assets, and improve configuration with static analysis. NGINX Amplify also monitors the underlying OS, application servers (like PHP‑FPM), databases, and other components. NGINX Amplify is simple to set up, yet powerful enough to provide critical insight into NGINX and system performance. Features provided include Static Analysis, Graphs, and Alerts.

In this guide, we will explain how to install Nginx Amplify on Ubuntu 18.04/16.04

Deploying your cloud server
If you have not already registered with Cloudwafer, you should begin by getting signed up. Take a moment to create an account after which you can easily deploy your own cloud servers.

Once you have signed up, log into your Cloudwafer Client Area and deploy your Cloudwafer cloud server.

Step 1: Install the LEMP Stack
A LEMP stack is a group of open source software commonly used for hosting dynamic websites and web apps. LEMP is an acronym for Linux operating system, eNginx web server, MySQL and PHP.
Follow our guide on installing the LEMP Stack on Ubuntu 16.04 to complete this step.

Step 2: Create an Nginx Amplify account
Before proceeding, you need to register an account at https://amplify.nginx.com/signup/

Cloudwafer-Nginx-Amplify-1

Next, verify your email address.

Step 3: Install Nginx Amplify Agent
Upon verification of email, the Nginx Amplify website provides the needed commands to install Nginx Amplify making it easier to copy, paste and run these commands on your server.

Cloudwafer-Nginx-Amplify-2

  • Download install script

    curl -L -O https://github.com/nginxinc/nginx-amplify-agent/raw/master/packages/install.sh
    

  • Run the following command as root to install the Amplify Agent package.

    API_KEY='your-unique-API-key' sh ./install.sh
    

**Each Amplify account has a unique API key.

After installation, the agent will automatically start. To view the status of the agent, issue the command below:

 systemctl status amplify-agent

Cloudwafer-Nginx-Amplify-5

To enable boot on startup, issue the command below:
systemctl enable amplify-agent Cloudwafer-Nginx-Amplify-6

Step 4: Configure NGINX to visualize essential metrics

To define stub_status in NGINX configuration to build key NGINX graphs, add the stub_status configuration as follows:

  • Open the nginx.conf

    sudo nano /etc/nginx/nginx.conf
    

    Add the following server block in the http {...} context.

    server {  
      listen 127.0.0.1:80;  
      server_name 127.0.0.1;  
      location /nginx_status {  
         stub_status on;  
     allow 127.0.0.1;  
     deny all;  
           }  
     }
    

Save and close the file, then reload Nginx for the changes to take effect.

Now Amplify agent can start collecting metrics.

Cloudwafer-Nginx-Amplify-7

Cloudwafer-Nginx-Amplify-8

Cloudwafer-Nginx-Amplify-9

To enable additional metrics and see more graphs, please visit the Nginx Amplify documentation