1 title: Performance indicators of NGINX web server
7 This check parses the information provided by the Nginx stub status module.
8 If you have enabled that module, then the URL {/nginx_status} shows interesting
9 information about the inner state of the web server when accessed from {localhost}.
10 The agent plugin {nginx_status} fetches these information and processes it.
12 Please note that the information provided do not only affect the single {server} within
13 the nginx process, but the whole nginx process and all servers hosted by that process.
15 By default the check is always OK and outputs performace indicators including graphs.
17 First you need to enable the stub status module for a server in your Nginx installation
18 to make it accessible, at least from localhost. We recommend to do it like follows.
20 Make sure that the server process is configured with the stub status module, use the command
21 {nginx -V 2>&1 | grep -o with-http_stub_status_module} to check this. You should see a single
22 line of output when you have this module available.
24 Now you need to add the following configuration to a nginx site, inside the {server} block.
25 On a debian system, this is located in the file {/etc/nginx/sites-enabled/default}. Now add the
28 location /nginx_status {
35 Afterwards execute {/etc/init.d/nginx reload} to apply this change. This makes
36 the URL {http://127.0.0.1/nginx_status} available, when your server listens on
37 port 80 on the local host. You can test this by requesting this URL on the local
38 system using e.g. {wget -qO - http://127.0.0.1/nginx_status}. This should give you
39 an output of something like {Active connection: ...}.
41 Once this works, you need to install the agent plugin {nginx_status} into your
42 agent's plugins directory (usually {/usr/lib/check_mk_agent/plugins}).
43 The plugin tries to autodetect all running nginx servers. If that fails
44 for some reason you need to create the configuration file
45 {/etc/check_mk/nginx_status.cfg} and configure your servers in that file.
46 You find an example of that file in your agent directory ({share/check_mk/agents}).
49 One service per web server will be created.
52 A string-combination of servername and port, e.g. {127.0.0.1:80}.