Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_status_module.xml @ 1450:f5b5eefc43cb
Updated commercial docs for the upcoming release.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 09 Apr 2015 19:18:54 +0300 |
parents | f1e14d87d833 |
children | d876f94135ac |
comparison
equal
deleted
inserted
replaced
1449:c79501e16e26 | 1450:f5b5eefc43cb |
---|---|
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
8 | 8 |
9 <module name="Module ngx_http_status_module" | 9 <module name="Module ngx_http_status_module" |
10 link="/en/docs/http/ngx_http_status_module.html" | 10 link="/en/docs/http/ngx_http_status_module.html" |
11 lang="en" | 11 lang="en" |
12 rev="4"> | 12 rev="6"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 The <literal>ngx_http_status_module</literal> module provides | 17 The <literal>ngx_http_status_module</literal> module provides |
30 | 30 |
31 <section id="example" name="Example Configuration"> | 31 <section id="example" name="Example Configuration"> |
32 | 32 |
33 <para> | 33 <para> |
34 <example> | 34 <example> |
35 upstream <emphasis>backend</emphasis> { | 35 http { |
36 <emphasis>zone</emphasis> upstream_backend 64k; | 36 upstream <emphasis>backend</emphasis> { |
37 | 37 <emphasis>zone</emphasis> http_backend 64k; |
38 server backend1.example.com weight=5; | 38 |
39 server backend2.example.com; | 39 server backend1.example.com weight=5; |
40 server backend2.example.com; | |
41 } | |
42 | |
43 proxy_cache_path /data/nginx/cache_backend keys_zone=<emphasis>cache_backend</emphasis>:10m; | |
44 | |
45 server { | |
46 server_name backend.example.com; | |
47 | |
48 location / { | |
49 proxy_pass http://backend; | |
50 proxy_cache cache_backend; | |
51 | |
52 health_check; | |
53 } | |
54 | |
55 <emphasis>status_zone server_backend;</emphasis> | |
56 } | |
57 | |
58 server { | |
59 listen 127.0.0.1; | |
60 | |
61 location /upstream_conf { | |
62 upstream_conf; | |
63 } | |
64 | |
65 location /status { | |
66 status; | |
67 } | |
68 | |
69 location = /status.html { | |
70 } | |
71 } | |
40 } | 72 } |
41 | 73 |
42 proxy_cache_path /data/nginx/cache_backend keys_zone=<emphasis>cache_backend</emphasis>:10m; | 74 stream { |
43 | 75 upstream <emphasis>backend</emphasis> { |
44 server { | 76 <emphasis>zone</emphasis> stream_backend 64k; |
45 server_name backend.example.com; | 77 |
46 | 78 server backend1.example.com:12345 weight=5; |
47 location / { | 79 server backend2.example.com:12345; |
48 proxy_pass http://backend; | 80 } |
49 proxy_cache cache_backend; | 81 |
50 | 82 server { |
83 listen 127.0.0.1:12345; | |
84 proxy_pass backend; | |
85 <emphasis>status_zone server_backend;</emphasis> | |
51 health_check; | 86 health_check; |
52 } | |
53 | |
54 <emphasis>status_zone server_backend;</emphasis> | |
55 } | |
56 | |
57 server { | |
58 listen 127.0.0.1; | |
59 | |
60 location /upstream_conf { | |
61 upstream_conf; | |
62 } | |
63 | |
64 location /status { | |
65 status; | |
66 } | |
67 | |
68 location = /status.html { | |
69 } | 87 } |
70 } | 88 } |
71 </example> | 89 </example> |
72 </para> | 90 </para> |
73 | 91 |
79 http://127.0.0.1/status/caches/cache_backend | 97 http://127.0.0.1/status/caches/cache_backend |
80 http://127.0.0.1/status/upstreams | 98 http://127.0.0.1/status/upstreams |
81 http://127.0.0.1/status/upstreams/backend | 99 http://127.0.0.1/status/upstreams/backend |
82 http://127.0.0.1/status/upstreams/backend/1 | 100 http://127.0.0.1/status/upstreams/backend/1 |
83 http://127.0.0.1/status/upstreams/backend/1/weight | 101 http://127.0.0.1/status/upstreams/backend/1/weight |
102 http://127.0.0.1/status/stream | |
103 http://127.0.0.1/status/stream/upstreams | |
104 http://127.0.0.1/status/stream/upstreams/backend | |
105 http://127.0.0.1/status/stream/upstreams/backend/1 | |
106 http://127.0.0.1/status/stream/upstreams/backend/1/weight | |
84 </example> | 107 </example> |
85 </para> | 108 </para> |
86 | 109 |
87 <para> | 110 <para> |
88 The simple monitoring page is shipped with this distribution, | 111 The simple monitoring page is shipped with this distribution, |
136 <default/> | 159 <default/> |
137 <context>server</context> | 160 <context>server</context> |
138 | 161 |
139 <para> | 162 <para> |
140 Enables collection of virtual | 163 Enables collection of virtual |
141 <link doc="ngx_http_core_module.xml" id="server"/> | 164 <link doc="ngx_http_core_module.xml" id="server">http</link> |
142 status information in the specified <value>zone</value>. | 165 or |
143 Several virtual servers may share the same zone. | 166 <link doc="../stream/ngx_stream_core_module.xml" id="server">stream</link> |
167 (1.7.11) server status information in the specified <value>zone</value>. | |
168 Several servers may share the same zone. | |
144 </para> | 169 </para> |
145 | 170 |
146 </directive> | 171 </directive> |
147 | 172 |
148 </section> | 173 </section> |
155 <list type="tag"> | 180 <list type="tag"> |
156 | 181 |
157 <tag-name id="version"><literal>version</literal></tag-name> | 182 <tag-name id="version"><literal>version</literal></tag-name> |
158 <tag-desc> | 183 <tag-desc> |
159 Version of the provided data set. | 184 Version of the provided data set. |
160 The current version is 4. | 185 The current version is 5. |
161 </tag-desc> | 186 </tag-desc> |
162 | 187 |
163 <tag-name><literal>nginx_version</literal></tag-name> | 188 <tag-name><literal>nginx_version</literal></tag-name> |
164 <tag-desc> | 189 <tag-desc> |
165 Version of nginx. | 190 Version of nginx. |
168 <tag-name><literal>address</literal></tag-name> | 193 <tag-name><literal>address</literal></tag-name> |
169 <tag-desc> | 194 <tag-desc> |
170 The address of the server that accepted status request. | 195 The address of the server that accepted status request. |
171 </tag-desc> | 196 </tag-desc> |
172 | 197 |
198 <tag-name id="generation"><literal>generation</literal></tag-name> | |
199 <tag-desc> | |
200 The total number of configuration | |
201 <link doc="../control.xml" id="reconfiguration">reloads</link>. | |
202 </tag-desc> | |
203 | |
173 <tag-name id="load_timestamp"><literal>load_timestamp</literal></tag-name> | 204 <tag-name id="load_timestamp"><literal>load_timestamp</literal></tag-name> |
174 <tag-desc> | 205 <tag-desc> |
175 Time of the last reload of configuration, in milliseconds since Epoch. | 206 Time of the last reload of configuration, in milliseconds since Epoch. |
176 </tag-desc> | 207 </tag-desc> |
177 | 208 |
178 <tag-name><literal>timestamp</literal></tag-name> | 209 <tag-name><literal>timestamp</literal></tag-name> |
179 <tag-desc> | 210 <tag-desc> |
180 Current time in milliseconds since Epoch. | 211 Current time in milliseconds since Epoch. |
212 </tag-desc> | |
213 | |
214 <tag-name id="processes"><literal>processes</literal></tag-name> | |
215 <tag-desc> | |
216 <list type="tag"> | |
217 | |
218 <tag-name id="respawned"><literal>respawned</literal></tag-name> | |
219 <tag-desc> | |
220 The total number of abnormally terminated and respawned | |
221 child processes. | |
222 </tag-desc> | |
223 | |
224 </list> | |
181 </tag-desc> | 225 </tag-desc> |
182 | 226 |
183 <tag-name><literal>connections</literal></tag-name> | 227 <tag-name><literal>connections</literal></tag-name> |
184 <tag-desc> | 228 <tag-desc> |
185 <list type="tag"> | 229 <list type="tag"> |
328 <tag-name><literal>active</literal></tag-name> | 372 <tag-name><literal>active</literal></tag-name> |
329 <tag-desc> | 373 <tag-desc> |
330 The current number of active connections. | 374 The current number of active connections. |
331 </tag-desc> | 375 </tag-desc> |
332 | 376 |
377 <!-- | |
333 <tag-name><literal>keepalive</literal></tag-name> | 378 <tag-name><literal>keepalive</literal></tag-name> |
334 <tag-desc> | 379 <tag-desc> |
335 The current number of | 380 The current number of |
336 idle <link doc="ngx_http_upstream_module.xml" id="keepalive"/> connections. | 381 idle <link doc="ngx_http_upstream_module.xml" id="keepalive"/> connections. |
337 </tag-desc> | 382 </tag-desc> |
383 --> | |
338 | 384 |
339 <tag-name id="max_conns"><literal>max_conns</literal></tag-name> | 385 <tag-name id="max_conns"><literal>max_conns</literal></tag-name> |
340 <tag-desc> | 386 <tag-desc> |
341 The <link doc="ngx_http_upstream_module.xml" id="max_conns"/> limit | 387 The <link doc="ngx_http_upstream_module.xml" id="max_conns"/> limit |
342 for the server. | 388 for the server. |
449 <tag-desc> | 495 <tag-desc> |
450 The time (in milliseconds since Epoch) | 496 The time (in milliseconds since Epoch) |
451 when the server was last selected to process a request (1.7.5). | 497 when the server was last selected to process a request (1.7.5). |
452 </tag-desc> | 498 </tag-desc> |
453 | 499 |
500 <tag-name id="header_time"><literal>header_time</literal></tag-name> | |
501 <tag-desc> | |
502 The average time to get the | |
503 <link doc="ngx_http_upstream_module.xml" id="var_upstream_header_time">response | |
504 header</link> from the server (1.7.10). | |
505 The field is available when using the | |
506 <link doc="ngx_http_upstream_module.xml" id="least_time"/> | |
507 load balancing method. | |
508 </tag-desc> | |
509 | |
510 <tag-name id="response_time"><literal>response_time</literal></tag-name> | |
511 <tag-desc> | |
512 The average time to get the | |
513 <link doc="ngx_http_upstream_module.xml" id="var_upstream_response_time">full | |
514 response</link> from the server (1.7.10). | |
515 The field is available when using the | |
516 <link doc="ngx_http_upstream_module.xml" id="least_time"/> | |
517 load balancing method. | |
518 </tag-desc> | |
519 | |
454 </list> | 520 </list> |
455 </tag-desc> | 521 </tag-desc> |
456 | 522 |
457 <tag-name id="caches"><literal>caches</literal></tag-name> | 523 <tag-name id="caches"><literal>caches</literal></tag-name> |
458 <tag-desc> | 524 <tag-desc> |
535 </tag-desc> | 601 </tag-desc> |
536 | 602 |
537 </list> | 603 </list> |
538 </tag-desc> | 604 </tag-desc> |
539 | 605 |
606 <tag-name id="stream"><literal>stream</literal></tag-name> | |
607 <tag-desc> | |
608 | |
609 <list type="tag"> | |
610 <tag-name><literal>server_zones</literal></tag-name> | |
611 <tag-desc> | |
612 For each <link id="status_zone"/>: | |
613 <list type="tag"> | |
614 | |
615 <tag-name><literal>processing</literal></tag-name> | |
616 <tag-desc> | |
617 The number of | |
618 client connections that are currently being processed. | |
619 </tag-desc> | |
620 | |
621 <tag-name><literal>connections</literal></tag-name> | |
622 <tag-desc> | |
623 The total number of | |
624 connections accepted from clients. | |
625 </tag-desc> | |
626 | |
627 <tag-name><literal>received</literal></tag-name> | |
628 <tag-desc> | |
629 The total number of bytes received from clients. | |
630 </tag-desc> | |
631 | |
632 <tag-name><literal>sent</literal></tag-name> | |
633 <tag-desc> | |
634 The total number of bytes sent to clients. | |
635 </tag-desc> | |
636 | |
637 </list> | |
638 </tag-desc> | |
639 | |
640 <tag-name><literal>upstreams</literal></tag-name> | |
641 <tag-desc> | |
642 For each | |
643 <link doc="../stream/ngx_stream_upstream_module.xml" id="server"/> | |
644 in the | |
645 <link doc="../stream/ngx_stream_upstream_module.xml" id="zone">dynamically | |
646 configurable</link> | |
647 <link doc="../stream/ngx_stream_upstream_module.xml" id="upstream">group</link>, | |
648 the following data are provided: | |
649 <list type="tag"> | |
650 | |
651 <tag-name><literal>id</literal></tag-name> | |
652 <tag-desc> | |
653 The ID of the server. | |
654 </tag-desc> | |
655 | |
656 <tag-name><literal>server</literal></tag-name> | |
657 <tag-desc> | |
658 An | |
659 <link doc="../stream/ngx_stream_upstream_module.xml" id="server">address</link> | |
660 of the server. | |
661 </tag-desc> | |
662 | |
663 <tag-name><literal>backup</literal></tag-name> | |
664 <tag-desc> | |
665 A boolean value indicating whether the server is a | |
666 <link doc="../stream/ngx_stream_upstream_module.xml" id="backup"/> | |
667 server. | |
668 </tag-desc> | |
669 | |
670 <tag-name><literal>weight</literal></tag-name> | |
671 <tag-desc> | |
672 <link doc="../stream/ngx_stream_upstream_module.xml" id="weight">Weight</link> | |
673 of the server. | |
674 </tag-desc> | |
675 | |
676 <tag-name><literal>state</literal></tag-name> | |
677 <tag-desc> | |
678 Current state, which may be one of | |
679 “<literal>up</literal>”, | |
680 “<literal>down</literal>”, | |
681 “<literal>unavail</literal>”, | |
682 or | |
683 “<literal>unhealthy</literal>”. | |
684 </tag-desc> | |
685 | |
686 <tag-name><literal>active</literal></tag-name> | |
687 <tag-desc> | |
688 The current number of connections. | |
689 </tag-desc> | |
690 | |
691 <tag-name><literal>connections</literal></tag-name> | |
692 <tag-desc> | |
693 The total number of | |
694 client connections forwarded to this server. | |
695 </tag-desc> | |
696 | |
697 <tag-name><literal>connect_time</literal></tag-name> | |
698 <tag-desc> | |
699 The average time to connect to the upstream server. | |
700 The field is available when using the | |
701 <link doc="../stream/ngx_stream_upstream_module.xml" id="least_time"/> | |
702 load balancing method. | |
703 </tag-desc> | |
704 | |
705 <tag-name><literal>first_byte_time</literal></tag-name> | |
706 <tag-desc> | |
707 The average time to receive the first byte of data. | |
708 The field is available when using the | |
709 <link doc="../stream/ngx_stream_upstream_module.xml" id="least_time"/> | |
710 load balancing method. | |
711 </tag-desc> | |
712 | |
713 <tag-name><literal>response_time</literal></tag-name> | |
714 <tag-desc> | |
715 The average time to receive the last byte of data. | |
716 The field is available when using the | |
717 <link doc="../stream/ngx_stream_upstream_module.xml" id="least_time"/> | |
718 load balancing method. | |
719 </tag-desc> | |
720 | |
721 <tag-name><literal>sent</literal></tag-name> | |
722 <tag-desc> | |
723 The total number of bytes sent to this server. | |
724 </tag-desc> | |
725 | |
726 <tag-name><literal>received</literal></tag-name> | |
727 <tag-desc> | |
728 The total number of bytes received from this server. | |
729 </tag-desc> | |
730 | |
731 <tag-name><literal>fails</literal></tag-name> | |
732 <tag-desc> | |
733 The total number of | |
734 unsuccessful attempts to communicate with the server. | |
735 </tag-desc> | |
736 | |
737 <tag-name><literal>unavail</literal></tag-name> | |
738 <tag-desc> | |
739 How many times | |
740 the server became unavailable for client connections | |
741 (state “<literal>unavail</literal>”) | |
742 due to the number of unsuccessful attempts reaching the | |
743 <link doc="../stream/ngx_stream_upstream_module.xml" id="max_fails"/> | |
744 threshold. | |
745 </tag-desc> | |
746 | |
747 <tag-name><literal>health_checks</literal></tag-name> | |
748 <tag-desc> | |
749 <list type="tag"> | |
750 | |
751 <tag-name><literal>checks</literal></tag-name> | |
752 <tag-desc> | |
753 The total number of | |
754 <link doc="../stream/ngx_stream_upstream_module.xml" id="health_check">health check</link> | |
755 requests made. | |
756 </tag-desc> | |
757 | |
758 <tag-name><literal>fails</literal></tag-name> | |
759 <tag-desc> | |
760 The number of failed health checks. | |
761 </tag-desc> | |
762 | |
763 <tag-name><literal>unhealthy</literal></tag-name> | |
764 <tag-desc> | |
765 How many times | |
766 the server became unhealthy (state “<literal>unhealthy</literal>”). | |
767 </tag-desc> | |
768 | |
769 <tag-name><literal>last_passed</literal></tag-name> | |
770 <tag-desc> | |
771 Boolean indicating | |
772 if the last health check request was successful and passed | |
773 <link doc="../stream/ngx_stream_upstream_module.xml" id="match">tests</link>. | |
774 </tag-desc> | |
775 | |
776 </list> | |
777 </tag-desc> | |
778 | |
779 <tag-name><literal>downtime</literal></tag-name> | |
780 <tag-desc> | |
781 Total time | |
782 the server was in the “<literal>unavail</literal>” | |
783 and “<literal>unhealthy</literal>” states. | |
784 </tag-desc> | |
785 | |
786 <tag-name><literal>downstart</literal></tag-name> | |
787 <tag-desc> | |
788 The time (in milliseconds since Epoch) | |
789 when the server became | |
790 “<literal>unavail</literal>” | |
791 or “<literal>unhealthy</literal>”. | |
792 </tag-desc> | |
793 | |
794 <tag-name><literal>selected</literal></tag-name> | |
795 <tag-desc> | |
796 The time (in milliseconds since Epoch) | |
797 when the server was last selected to process a connection. | |
798 </tag-desc> | |
799 | |
800 </list> | |
801 </tag-desc> | |
802 | |
803 </list> | |
804 </tag-desc> | |
805 | |
540 </list> | 806 </list> |
541 </para> | 807 </para> |
542 | 808 |
543 </section> | 809 </section> |
544 | 810 |
545 <section id="compatibility" name="Compatibility"> | 811 <section id="compatibility" name="Compatibility"> |
546 | 812 |
547 <para> | 813 <para> |
548 <list type="bullet"> | 814 <list type="bullet"> |
815 | |
816 <listitem> | |
817 The <literal>keepalive</literal> field of an upstream server | |
818 was removed in <link id="version"/> 5. | |
819 </listitem> | |
820 | |
821 <listitem> | |
822 The <link id="stream">stream</link> status data | |
823 were added in <link id="version"/> 5. | |
824 </listitem> | |
825 | |
826 <listitem> | |
827 The | |
828 <link id="generation"/> field | |
829 was added in <link id="version"/> 5. | |
830 </listitem> | |
831 | |
832 <listitem> | |
833 The | |
834 <link id="respawned"/> field in | |
835 <link id="processes"/> | |
836 was added in <link id="version"/> 5. | |
837 </listitem> | |
838 | |
839 <listitem> | |
840 The | |
841 <link id="header_time"/> and <link id="response_time"/> fields in | |
842 <link id="upstreams"/> | |
843 were added in <link id="version"/> 5. | |
844 </listitem> | |
549 | 845 |
550 <listitem> | 846 <listitem> |
551 The | 847 The |
552 <link id="selected"/> field in | 848 <link id="selected"/> field in |
553 <link id="upstreams"/> | 849 <link id="upstreams"/> |