Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to Monitor an Nginx Load Balancer with Nginx Amplify

This guide explains how to watch your Nginx load balancer and app servers with Nginx Amplify. It needs root access to a VPS or dedicated server.

General2 min read6 steps

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

  1. Create a free account on the Nginx Amplify website and sign in.
  2. 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.
  3. Log in to your server with SSH as root.
  4. Paste the install command from the dashboard and press Enter. It looks like this, with your key in place of the example:
    API_KEY='your_key_here' sh ./install.sh
    This installs the agent and links it to your account.
  5. Wait a minute or two. The new server appears in the dashboard.
  6. 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.

Tip: Compare graphs of the load balancer and the app servers. If one app server is much busier, the balancing settings may need work.

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_status for request counts.
  • Check settings with nginx -t before reload.