Monitoring Nginx web server with Bleemeo

Florian Gabon Published on 15 April 2021 by Florian Gabon

Figure 1: NGINX logo

This blog article will cover how to monitor your nginx web server with Bleemeo, what is monitored and graphed by default and how to go further by configuring custom dashboards to have a global overview of your infrastructure.

What is NGINX?

The NGINX web server was created by Igor Sysoev and was officially released in 2004. Nowadays it is one of the most popular web server on the World Wide Web. Many organizations such as Atlassian, LinkedIn, Apple and Bleemeo use it. It's an open source web server, maintained by F5 Networks. Nginx architecture choices resulted in a low resources consumption and a very high performance compared to the historic Apache httpd.

Configuring NGINX for Bleemeo

After installing NGINX with your favorite distribution package and installing Bleemeo monitoring agent, Bleemeo will auto-discover nginx presence and start doing ports checks for service availability.

Figure 2: NGINX schema

To gather metrics, Bleemeo monitoring agent relies on the mod status of nginx that you need to enable on the default virtualhost (/etc/nginx/sites-enabled/default by default on Debian/Ubuntu). Just add the following lines in the site definition:

location /nginx_status { stub_status on; }

As for every location in NGINX, you can limit the IP address that can access the location for limiting the source IP that can queries the status. For example, you could do something like this to limit to localhost and the network:

location /nginx_status { stub_status on; allow; allow; deny all; }

Check our documentation for more information on this configuration.

Bleemeo default service dashboard

Once Bleemeo agent has been able to access the NGINX status, a new default dashboard appears, here is an example of such dashboard: Figure 3: Service Nginx dashboard screenshot

Customizing your dashboard

You can also configure a custom dashboard with metrics that are not graphed in the default service dashboard to match your expectations. You could also add to this dashboard business metrics like the number of checkout or sign up to correlate information. In this example, the following metrics will be graphed:

  • Status of NGINX
  • Number of requests per second
  • Number of client connections established per second
  • Number of client connections processed per second

Check our documentation for getting the complete list of metrics available in Bleemeo.

Figure 4: Nginx dashboard screenshot

Another example of similar dashboard adding system metrics to correlate system metrics with your http traffic. You can add any metrics supported by Bleemeo. It is possible to add metrics from another agent. In this second example the following metrics will be added to our previous dashboard:

  • CPU
  • Memory
  • Number of packets sent per second.

Figure 5: Nginx custom dashboard screenshot

This dashboard can be customized as needed.

Monitoring NGINX web server and creating custom dashboards only take a couple of minutes with Bleemeo.

If you don't have a Bleemeo account yet, start monitoring your NGINX today in 30s.

Start Monitoring your servers, containers, and applications in 30 seconds without credit card.Start your Free Trial