The NGINX amplify is a tool that monitors performance, enables real-time examination and fixing of problems linked with running and scaling of websites, and tracking of systems running within the NGINX.
The application helps in the visualization and determination of NGINX web servers and problems associated with their performance, overloaded servers, or potential Denial of Service Attacks (DDoS). NGINX application helps in the optimization of the server’s performance recommending solutions as necessary.
Other glorious functions of the NGINX reporting tool are sending an alert when something is wrong with any of the setup applications and serves as a web capacity and performance planner. Generally, the NGINX amplify structure have the following three components:
1. The Amplify Backend
This is a core component that is being implemented as Software as a Service (SaaS). Its work is to incorporate scalable metrics, a database, core Application Programmers Interface (API), analytical engine, and an analytics engine.
2. The Amplify Agent
This Python application needs installation and runs on monitored systems. The ongoing communication between the agent and SaaS backend are over SSL/TLS where the agent automatically initiates all the traffic.
3. The Amplify Web User Interface (UI)
A user interface that supports all other browsers and is accessible via TLS or SSL tunnels.
You can introduce a user-defined dashboard by offering a statistic analyzer to improve the reporting ability of the NGINX.
Installing Amplify Agent on Linux
The first step in installing Amplify agent is to sign up and create an account. You will thereafter get an email with a verification link. Click on that link and log into your account.
Follow the instructions as shown
Download the NGINX install script and use curl or wget command.
# wget https://github.com/nginxinc/nginx-amplify-agent/raw/master/packages/install.sh
OR
# curl -L -O https://github.com/nginxinc/nginx-amplify-agent/raw/master/packages/install.sh
Run the command using the sudo command to initiate the API_KEY, which is unique and different for every machine introduced into the system.
# API_KEY='bf7dfaa516e060f9b3b1fe527d48466d' sh ./install.sh
Note that there may be an error indicating that sub_status has not been configured. (This process will be completed in the next installation phase)
Once you are done, go to the web’s user interface, and wait for at least a minute and you will see the new system on the left side of the screen.
Configure the stub_status in NGINX
Open the stub_status to build NGINX graphs. For NGINX plus users, they need to configure the stub_status or the extended_status module. A new configuration file is created using the command line as shown below
# sudo vi /etc/nginx/conf.d/sub_status.conf
Then copy the following stub_status configuration file inside the file
server { listen 127.0.0.1:80; server_name 127.0.0.1; location /nginx_status { stub_status; allow 127.0.0.1; deny all; } }
Save and close the file.
Restart the NGINX server services to make the stub_status
# sudo systemctl restart nginx
Configure Additional NGINX Metrics for Metrics
The next thing to do is to set up additional NGINX metrics to help in monitoring performances.
Head out to
cd etc/nginx/nginx.conf
Add the following code
log_format main_ext '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for" ' '"$host" sn="$server_name" ' 'rt=$request_time ' 'ua="$upstream_addr" us="$upstream_status" ' 'ut="$upstream_response_time" ul="$upstream_response_length" ' 'cs=$upstream_cache_status' ;
Next, edit the access_log
and error_log
to be as follows
access_log /var/log/nginx/suasell.com/suasell.com_access_log main_ext; error_log /var/log/nginx/suasell.com/suasell.com_error_log warn;
Restart NGINX services for the changes to take place
# sudo systemctl restart nginx
Start the Monitoring Process Via Amplify Agent
Finally, you can start monitoring your Nginx web server. HEad out to your browser on the Amplify page and click on overview as shown.
Overview
Dashboards
Amplify is a powerful SaaS utility tool helpful in the monitoring of the Operating System, NGINX servers and other NGINX based applications. It brings on board all tasks on a single platform where you can keep an eye on several remote systems that are currently running.
Use the comment section to tell us what you think about this tool.