Key words first
Nginx (say "engine-x") is software that serves web pages. It can also be a load balancer. A load balancer shares visitors between several app servers, like a traffic officer sending cars into different lanes. The app servers run your website or application.
Nginx Amplify is a third-party monitoring tool made by the Nginx team. It has a small program called an agent. The agent runs on your server and sends numbers to a web dashboard. Ask Hostvento support if it fits your plan.
What it shows
- How many requests Nginx handles.
- Response times and error counts.
- Server CPU, memory and disk use.
- Hints about slow or wrong settings in your Nginx files.
Steps
- Create a free account on the Nginx Amplify website and sign in.
- Choose to add a new system. The dashboard shows an install command with your own API key. An API key is a secret code that links the server to your account.
- Log in to your server with SSH as root.
- Paste the install command from the dashboard and press Enter. It looks like this, with your key in place of the example:
This installs the agent and links it to your account.API_KEY='your_key_here' sh ./install.sh - Wait a minute or two. The new server appears in the dashboard.
- Repeat on the load balancer and on each app server.
Turn on the status page
The agent reads Nginx numbers from a status page. Add a small block to your Nginx settings.
location /nginx_status {
stub_status;
allow 127.0.0.1;
deny all;
}
This shows basic numbers, but only to the server itself. Test the file, then reload Nginx:
nginx -t
systemctl reload nginx
The first line checks your settings. The second applies them without a stop.
Warning: A mistake in Nginx files can take your site down. Copy the file before you edit it.
Quick recap
- A load balancer shares visitors between servers.
- Nginx Amplify is a third-party monitoring tool with an agent.
- Install the agent on every server with your own key.
- Enable
stub_statusfor request counts. - Check settings with
nginx -tbefore reload.