comparison xml/en/docs/http/ngx_http_status_module.xml @ 953:aded7086e84f

Commercial version documentation.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 01 Aug 2013 16:31:02 +0400
parents
children fadccc156188
comparison
equal deleted inserted replaced
952:417dc982362e 953:aded7086e84f
1 <?xml version="1.0"?>
2
3 <!--
4 Copyright (C) Nginx, Inc.
5 -->
6
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
8
9 <module name="Module ngx_http_status_module"
10 link="/en/docs/http/ngx_http_status_module.html"
11 lang="en"
12 rev="1">
13
14 <section id="summary">
15
16 <para>
17 The module <literal>ngx_http_status_module</literal> provides
18 access to various status information.
19 </para>
20
21 <para>
22 <note>
23 This module is available as part of our <commercial_version/> only.
24 </note>
25 </para>
26
27 </section>
28
29
30 <section id="example" name="Example Configuration">
31
32 <para>
33 <example>
34 location = /status {
35 status;
36 }
37 </example>
38 </para>
39
40 <para>
41 The simple monitoring page is shipped with this distribution,
42 accessible as “<literal>/status.html</literal>” in the default configuration.
43 It requires the location “<literal>/status</literal>” to be configured
44 as shown above.
45 </para>
46
47 </section>
48
49
50 <section id="directives" name="Directives">
51
52 <directive name="status">
53 <syntax/>
54 <default/>
55 <context>location</context>
56
57 <para>
58 The status information will be accessible from the surrounding location.
59 </para>
60
61 </directive>
62
63
64 <directive name="status_format">
65 <syntax><literal>json</literal></syntax>
66 <syntax><literal>jsonp</literal> [<value>callback</value>]</syntax>
67 <default>json</default>
68 <context>http</context>
69 <context>server</context>
70 <context>location</context>
71
72 <para>
73 By default, status information is output in the JSON format.
74 </para>
75
76 <para>
77 Alternatively, data may be output as JSONP.
78 The <value>callback</value> parameter specifies the name of a callback function.
79 The value can contain variables.
80 If parameter is omitted, or the computed value is an empty string,
81 then “<literal>ngx_status_jsonp_callback</literal>” is used.
82 </para>
83
84 </directive>
85
86 </section>
87
88
89 <section id="data" name="Data">
90
91 <para>
92 The following status information is provided:
93 <list type="tag">
94
95 <tag-name><literal>version</literal></tag-name>
96 <tag-desc>
97 Version of the provided data set.
98 The current version is 1.
99 </tag-desc>
100
101 <tag-name><literal>nginx_version</literal></tag-name>
102 <tag-desc>
103 Version of nginx.
104 </tag-desc>
105
106 <tag-name><literal>address</literal></tag-name>
107 <tag-desc>
108 An address of the server that accepted status request.
109 </tag-desc>
110
111 <tag-name><literal>timestamp</literal></tag-name>
112 <tag-desc>
113 Current time in milliseconds since Epoch.
114 </tag-desc>
115
116 <tag-name><literal>connections</literal></tag-name>
117 <tag-desc>
118 <list type="tag">
119
120 <tag-name><literal>accepted</literal></tag-name>
121 <tag-desc>
122 The total number of accepted client connections.
123 </tag-desc>
124
125 <tag-name><literal>dropped</literal></tag-name>
126 <tag-desc>
127 The total number of dropped client connections.
128 </tag-desc>
129
130 <tag-name><literal>active</literal></tag-name>
131 <tag-desc>
132 The current number of active client connections.
133 </tag-desc>
134
135 <tag-name><literal>idle</literal></tag-name>
136 <tag-desc>
137 The current number of idle client connections.
138 </tag-desc>
139
140 </list>
141 </tag-desc>
142
143 <tag-name><literal>requests</literal></tag-name>
144 <tag-desc>
145 <list type="tag">
146
147 <tag-name><literal>total</literal></tag-name>
148 <tag-desc>
149 The total number of client requests.
150 </tag-desc>
151
152 <tag-name><literal>current</literal></tag-name>
153 <tag-desc>
154 The current number of client requests.
155 </tag-desc>
156
157 </list>
158 </tag-desc>
159
160 <tag-name><literal>upstreams</literal></tag-name>
161 <tag-desc>
162 For each
163 <link doc="ngx_http_upstream_module.xml" id="server"/>
164 in the
165 <link doc="ngx_http_upstream_module.xml" id="zone">dynamically
166 configurable</link>
167 <link doc="ngx_http_upstream_module.xml" id="upstream">group</link>,
168 the following data are provided:
169 <list type="tag">
170
171 <tag-name><literal>server</literal></tag-name>
172 <tag-desc>
173 An address of the
174 <link doc="ngx_http_upstream_module.xml" id="server"/>.
175 </tag-desc>
176
177 <tag-name><literal>weight</literal></tag-name>
178 <tag-desc>
179 Weight of the
180 <link doc="ngx_http_upstream_module.xml" id="server"/>.
181 </tag-desc>
182
183 <tag-name><literal>state</literal></tag-name>
184 <tag-desc>
185 Current state, which may be one of
186 “<literal>up</literal>”,
187 “<literal>down</literal>”,
188 “<literal>unavail</literal>”,
189 or
190 “<literal>unhealthy</literal>”.
191 </tag-desc>
192
193 <tag-name><literal>active</literal></tag-name>
194 <tag-desc>
195 The current number of active connections.
196 </tag-desc>
197
198 <tag-name><literal>keepalive</literal></tag-name>
199 <tag-desc>
200 The current number of
201 idle <link doc="ngx_http_upstream_module.xml" id="keepalive"/> connections.
202 </tag-desc>
203
204 <tag-name><literal>requests</literal></tag-name>
205 <tag-desc>
206 The total number of
207 client requests forwarded to this server.
208 </tag-desc>
209
210 <tag-name><literal>responses</literal></tag-name>
211 <tag-desc>
212 <list type="tag">
213
214 <tag-name><literal>total</literal></tag-name>
215 <tag-desc>
216 The total number of
217 responses obtained from this server.
218 </tag-desc>
219
220 <tag-name>
221 <literal>1xx</literal>,
222 <literal>2xx</literal>,
223 <literal>3xx</literal>,
224 <literal>4xx</literal>,
225 <literal>5xx</literal>
226 </tag-name>
227 <tag-desc>
228 The number of responses with status codes 1xx, 2xx, 3xx, 4xx, and 5xx.
229 </tag-desc>
230
231 </list>
232 </tag-desc>
233
234 <tag-name><literal>sent</literal></tag-name>
235 <tag-desc>
236 The total bytes sent to this server.
237 </tag-desc>
238
239 <tag-name><literal>received</literal></tag-name>
240 <tag-desc>
241 The total bytes received from this server.
242 </tag-desc>
243
244 <tag-name><literal>fails</literal></tag-name>
245 <tag-desc>
246 The total number of
247 unsuccessful attempts to communicate with the server.
248 </tag-desc>
249
250 <tag-name><literal>unavail</literal></tag-name>
251 <tag-desc>
252 How many times
253 the server became unavailable for client requests
254 (state “<literal>unavail</literal>”)
255 due to the number of unsuccessful attempts reaching
256 the <literal>max_fails</literal> threshold.
257 </tag-desc>
258
259 <tag-name><literal>health_checks</literal></tag-name>
260 <tag-desc>
261 <list type="tag">
262
263 <tag-name><literal>checks</literal></tag-name>
264 <tag-desc>
265 The total number of
266 <link doc="ngx_http_upstream_module.xml" id="health_check">health check</link>
267 requests made.
268 </tag-desc>
269
270 <tag-name><literal>fails</literal></tag-name>
271 <tag-desc>
272 The number of failed health checks.
273 </tag-desc>
274
275 <tag-name><literal>unhealthy</literal></tag-name>
276 <tag-desc>
277 How many times
278 the server became unhealthy (state “<literal>unhealthy</literal>”).
279 </tag-desc>
280
281 <tag-name><literal>last_passed</literal></tag-name>
282 <tag-desc>
283 Boolean indicating
284 if the last health check request was successful and passed
285 <link doc="ngx_http_upstream_module.xml" id="match">tests</link>.
286 </tag-desc>
287
288 </list>
289 </tag-desc>
290
291 </list>
292 </tag-desc>
293
294 <tag-name><literal>downtime</literal></tag-name>
295 <tag-desc>
296 Total time
297 the server was in the “<literal>unavail</literal>”
298 and “<literal>unhealthy</literal>” states.
299 </tag-desc>
300
301 <tag-name><literal>downstart</literal></tag-name>
302 <tag-desc>
303 The time (in milliseconds since Epoch)
304 when the server became
305 “<literal>unavail</literal>”
306 or “<literal>unhealthy</literal>”.
307 </tag-desc>
308
309 </list>
310 </para>
311
312 </section>
313
314 </module>