3.4
2018-06-11T11:38:58Z
Templates
Service Nginx
Service Nginx
Nginx http server monitoring template.
Version: 1.0.4 (2018-06-11)
URL: https://github.com/kloczek/zabbix-templates/tree/master/Service%20Nginx
Notes:
* The ngx_http_stub_status_module module provides access to basic status information.
- This template uses nginx stub_status loadable module metrics
- To use this template add nginx.conf configuration file:
location /stub_status {
stub_status on;
# do not log query for stats in access log
access_log off;
allow 127.0.0.1;
deny all;
}
Templates
SVC::nginx
SVC::nginx::connections
SVC::nginx::requests
-
SVC::$1 tcp/$3
7
net.tcp.service[http,,80]
1m
2w
365d
0
3
0
0
0
0
Checking is it possible to connect to tcp/80.
0
SVC::nginx
Service state
-
connections::$1
18
nginx.connections[active]
0
2w
365d
0
3
connections
0
0
0
0
The current number of all open connections.
This doesn’t mean number of users. A single user, for a single pageview can open many concurrent connections to your server.
0
SVC::nginx::connections
5
Active(.*)
\0
5
\d+
\0
web.page.get[{$NGINX_HOST},{$NGINX_STATS_URI},{$NGINX_PORT}]
-
connections::$1
18
nginx.connections[reading]
0
2w
365d
0
3
connections
0
0
0
0
The current number of client connections in reading the request state.
0
SVC::nginx::connections
5
Reading:(.*)
\0
5
\d+
\0
web.page.get[{$NGINX_HOST},{$NGINX_STATS_URI},{$NGINX_PORT}]
-
connections::$1
18
nginx.connections[waiting]
0
2w
365d
0
3
connections
0
0
0
0
The current number of client connections in waiting state.
keep-alive connections, actually it is active – (reading + writing).This value depends on keepalive-timeout. Do not confuse non-zero waiting value for poor performance. It can be ignored. Although, you can force zero waiting by setting
keepalive_timeout 0;
http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_disable
http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_requests
http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout
0
SVC::nginx::connections
5
Waiting:(.*)
\0
5
\d+
\0
web.page.get[{$NGINX_HOST},{$NGINX_STATS_URI},{$NGINX_PORT}]
-
connections::$1
18
nginx.connections[writing]
0
2w
365d
0
3
connections
0
0
0
0
The current number of client connections writing the response back to the client.
0
SVC::nginx::connections
5
Writing:(.*)
\0
5
\d+
\0
web.page.get[{$NGINX_HOST},{$NGINX_STATS_URI},{$NGINX_PORT}]
-
requests
18
nginx.requests
0
2w
365d
0
0
req/s
0
0
0
0
The number of client requests per second.
0
SVC::nginx::requests
5
\s\d+\s\d+\s\d+
\0
5
\s\d+\s\d+\s(.*)
\1
10
web.page.get[{$NGINX_HOST},{$NGINX_STATS_URI},{$NGINX_PORT}]
-
requests::$1
18
nginx.requests[accepts]
0
2w
365d
0
0
req/s
0
0
0
0
The number of accepted client connections per second.
0
SVC::nginx::requests
5
\s\d+\s\d+\s\d+
\0
5
\d+
\0
10
web.page.get[{$NGINX_HOST},{$NGINX_STATS_URI},{$NGINX_PORT}]
-
requests::$1
18
nginx.requests[handled]
0
2w
365d
0
0
0
0
0
0
The number of handled connections per second by Nginx server.
Generally, the parameter value is the same as accepts unless some resource limits have been reached (for example, the worker_connections limit).
0
SVC::nginx::requests
5
\s\d+\s\d+\s\d+
\0
5
\s\d+\s\d+\s
\0
5
\s\d+\s(.*)
\1
10
web.page.get[{$NGINX_HOST},{$NGINX_STATS_URI},{$NGINX_PORT}]
-
memory::master
7
proc.mem[nginx,root,]
30s
2w
365d
0
3
B
0
0
0
0
Memory nginx process memory usage.
0
SVC::nginx
-
memory::workers
7
proc.mem[nginx,{$NGINX_USER},sum]
30s
2w
365d
0
3
B
0
0
0
0
Sum of memory of all ngingx worker process.
0
SVC::nginx
-
memory
7
proc.mem[nginx]
30s
2w
365d
0
3
B
0
0
0
0
Total memory usage by all nginx processes.
0
SVC::nginx
-
PROC::$1
7
proc.num[nginx,root]
1m
2w
365d
0
3
processes
0
0
0
0
Number Nginx processes.
0
SVC::nginx
-
PROC::nginx::workers
7
proc.num[nginx,{$NGINX_USER}]
1m
2w
365d
0
3
processes
0
0
0
0
Number of Nginx worker processes.
0
SVC::nginx
-
version
7
system.run["/usr/sbin/nginx -v 2>&1|/bin/sed -n 's/nginx version: nginx\/\(.*\)/\1/ p'"]
1h
2w
0
0
1
0
0
0
0
Version of the nginx.
0
SVC::nginx
-
stub_status:
7
web.page.get[{$NGINX_HOST},{$NGINX_STATS_URI},{$NGINX_PORT}]
30s
0d
0
0
4
0
0
0
0
Master item sampling all nginx stub_status module data.
0
SVC::nginx
{$NGINX_HOST}
localhost
{$NGINX_PORT}
80
{$NGINX_STATS_URI}
/stub_status
{$NGINX_USER}
nginx
SVC::Nginx
1
4
3
500
100
0
0
1
1
1
1
0
0
0
system.run["/usr/sbin/nginx -v 2>&1|/bin/sed -n 's/nginx version: nginx\/\(.*\)/\1/ p'"]
Service Nginx
3
0
1200
300
0
1
1
1
0
1
1
0
0
SVC::Nginx::requests
Service Nginx
3
0
1200
300
0
2
1
1
0
1
1
0
0
SVC::Nginx::connection
Service Nginx
3
0
1200
300
0
3
1
1
0
1
1
0
0
SVC::Nginx::memory
Service Nginx
3
{Service Nginx:net.tcp.service[http,,80].max(#3)}=0
0
SVC::http tcp/{$NGINX_PORT} is DOWN
0
0
3
Nothing listens on http tcp/{$NGINX_PORT} port or traffic on this port is filtered by firewall.
0
0
{Service Nginx:proc.num[nginx,root].last()}=0
0
SVC::nginx::master process is DOWN
0
0
5
The nginx main process is not running.
Please confirm the state.
0
0
{Service Nginx:proc.num[nginx,{$NGINX_USER}].avg(#3)}=0
0
SVC::nginx::workers DOWN
0
0
5
The Nginx worker process are not running.
Please confirm the state.
0
0
SVC::nginx::master process is DOWN
{Service Nginx:proc.num[nginx,root].last()}=0
SVC::Nginx::connection
1200
300
0.0000
100.0000
1
1
0
1
0
0.0000
0.0000
0
0
0
0
0
2
00C800
0
7
0
-
Service Nginx
nginx.connections[active]
1
2
0000C8
0
7
0
-
Service Nginx
nginx.connections[reading]
2
2
C80000
0
7
0
-
Service Nginx
nginx.connections[waiting]
3
2
C800C8
0
7
0
-
Service Nginx
nginx.connections[writing]
SVC::Nginx::memory
1200
300
0.0000
100.0000
1
1
1
1
0
0.0000
0.0000
0
0
0
0
0
2
DD0000
0
2
0
-
Service Nginx
proc.mem[nginx,root,]
1
2
00BB00
0
2
0
-
Service Nginx
proc.mem[nginx,{$NGINX_USER},sum]
SVC::Nginx::requests
1200
300
0.0000
100.0000
1
1
0
1
0
0.0000
0.0000
0
0
0
0
0
2
0000AA
0
7
0
-
Service Nginx
nginx.requests
1
2
DD0000
0
7
0
-
Service Nginx
nginx.requests[accepts]
2
2
00BB00
0
7
0
-
Service Nginx
nginx.requests[handled]
Service state
0
Down
1
Up