b10-stats-httpd.xml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  2. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
  3. [<!ENTITY mdash "&#8212;">]>
  4. <!--
  5. - Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
  6. -
  7. - Permission to use, copy, modify, and/or distribute this software for any
  8. - purpose with or without fee is hereby granted, provided that the above
  9. - copyright notice and this permission notice appear in all copies.
  10. -
  11. - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
  12. - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  13. - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
  14. - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  15. - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  16. - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. - PERFORMANCE OF THIS SOFTWARE.
  18. -->
  19. <refentry>
  20. <refentryinfo>
  21. <date>Mar 8, 2011</date>
  22. </refentryinfo>
  23. <refmeta>
  24. <refentrytitle>b10-stats-httpd</refentrytitle>
  25. <manvolnum>8</manvolnum>
  26. <refmiscinfo>BIND10</refmiscinfo>
  27. </refmeta>
  28. <refnamediv>
  29. <refname>b10-stats-httpd</refname>
  30. <refpurpose>BIND 10 HTTP server for HTTP/XML interface of statistics</refpurpose>
  31. </refnamediv>
  32. <docinfo>
  33. <copyright>
  34. <year>2011</year>
  35. <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
  36. </copyright>
  37. </docinfo>
  38. <refsynopsisdiv>
  39. <cmdsynopsis> <command>b10-stats-httpd</command>
  40. <arg><option>-v</option></arg>|<arg><option>--verbose</option></arg>
  41. </cmdsynopsis>
  42. </refsynopsisdiv>
  43. <refsect1>
  44. <title>DESCRIPTION</title>
  45. <para>
  46. <command>b10-stats-httpd</command> is a standalone HTTP server. It is
  47. intended for HTTP/XML interface for statistics module. This server
  48. process runs as a process separated from the process of the BIND 10 Stats
  49. daemon (<command>b10-stats</command>). The server is initially executed
  50. by the BIND 10 boss process (<command>bind10</command>) and finally
  51. exited by it. The server is intended to be requested by HTTP clients
  52. like web browsers and third-party modules. When the server is requested,
  53. it requests BIND 10 statistics data to <command>b10-stats</command>,
  54. and <command>b10-stats</command> sends the data to the server in Python
  55. dictionary format and the server converts it into XML format. The server
  56. sends it to the HTTP client. The server can send three types of document,
  57. which are XML (Extensible Markup Language), XSD(XML Schema definition)
  58. and XSL(Extensible Stylesheet Language). The XML document is the
  59. statistics data of BIND 10, The XSD document is the data schema of it,
  60. and The XSL document is the style sheet to be showed for the web
  61. browsers. Please see the manual and the spec file
  62. of <command>b10-stats</command> for more details about the items of BIND
  63. 10 statistics. The server uses CC session in communication
  64. with <command>b10-stats</command>. CC session is provided
  65. by <command>b10-msgq</command> which is started
  66. by <command>bind10</command> in advance. The server is implemented by
  67. HTTP-server libraries included in Python 3. The parameter of the server
  68. is a list of pairs of the listening address and the port number specified
  69. in the spec file of it. The server obtains the configuration from the
  70. config manager (<command>b10-cfgmgr</command>) in runtime. Please see
  71. below for more details about this spec file and configuration of the
  72. server.
  73. </para>
  74. </refsect1>
  75. <refsect1>
  76. <title>OPTIONS</title>
  77. <para>The arguments are as follows:</para>
  78. <variablelist>
  79. <varlistentry>
  80. <term><option>-v</option>, <option>--verbose</option></term>
  81. <listitem>
  82. <para>
  83. <command>b10-stats-httpd</command> switches to verbose mode and sends
  84. verbose messages to STDOUT.
  85. </para>
  86. </listitem>
  87. </varlistentry>
  88. </variablelist>
  89. </refsect1>
  90. <refsect1>
  91. <title>FILES</title>
  92. <para>
  93. <filename>/usr/local/share/bind10-devel/stats-httpd.spec</filename>
  94. &mdash; the spec file of <command>b10-stats-httpd</command>. This file
  95. contains configurable settings
  96. of <command>b10-stats-httpd</command>. This setting can be configured in
  97. runtime via
  98. <refentrytitle>bindctl</refentrytitle><manvolnum>1</manvolnum>. Please
  99. see the manual
  100. of <refentrytitle>bindctl</refentrytitle><manvolnum>1</manvolnum> about
  101. how to configure the settings.
  102. </para>
  103. <para>
  104. <filename>/usr/local/share/bind10-devel/stats-httpd-xml.tpl</filename>
  105. &mdash; the template file of XML document.
  106. </para>
  107. <para>
  108. <filename>/usr/local/share/bind10-devel/stats-httpd-xsd.tpl</filename>
  109. &mdash; the template file of XSD document.
  110. </para>
  111. <para>
  112. <filename>/usr/local/share/bind10-devel/stats-httpd-xsl.tpl</filename>
  113. &mdash; the template file of XSL document.
  114. </para>
  115. </refsect1>
  116. <refsect1>
  117. <title>CONFIGURATION AND COMMANDS</title>
  118. <para>
  119. The configurable setting in
  120. <filename>stats-httpd.spec</filename> is:
  121. </para>
  122. <variablelist>
  123. <varlistentry>
  124. <term><varname>listen_on</varname></term>
  125. <listitem>
  126. <para>
  127. a list of pairs of address and port for
  128. <command>b10-stats-httpd</command> to listen HTTP requests on. The
  129. pair is consist of the <varname>address</varname> string
  130. and <varname>port</varname> number. The default setting is the list
  131. of address 127.0.0.1 port 8000. If the server is started by the
  132. default setting being left, for example, the URL for XML document
  133. is http://127.0.0.1:8000/bind10/statistics/xml. And also IPv6
  134. addresses can be configured and they works in the runtime
  135. environment for dual stack.
  136. </para>
  137. </listitem>
  138. </varlistentry>
  139. </variablelist>
  140. <para>
  141. The configuration commands in <filename>stats-httpd.spec</filename> are:
  142. </para>
  143. <variablelist>
  144. <varlistentry>
  145. <term><command>status</command></term>
  146. <listitem>
  147. <para>
  148. shows the status of <command>b10-stats-httpd</command> with its
  149. PID on the runtime machine.
  150. </para>
  151. </listitem>
  152. </varlistentry>
  153. <varlistentry>
  154. <term><command>shutdown</command></term>
  155. <listitem>
  156. <para>
  157. exits the <command>b10-stats-httpd</command> process. (Note that
  158. the BIND 10 boss process will restart this service.)
  159. </para>
  160. </listitem>
  161. </varlistentry>
  162. </variablelist>
  163. </refsect1>
  164. <refsect1>
  165. <title>SEE ALSO</title>
  166. <para>
  167. <citerefentry>
  168. <refentrytitle>b10-stats</refentrytitle><manvolnum>8</manvolnum>
  169. </citerefentry>,
  170. <citerefentry>
  171. <refentrytitle>b10-msgq</refentrytitle><manvolnum>8</manvolnum>
  172. </citerefentry>,
  173. <citerefentry>
  174. <refentrytitle>b10-cfgmgr</refentrytitle><manvolnum>8</manvolnum>
  175. </citerefentry>,
  176. <citerefentry>
  177. <refentrytitle>bind10</refentrytitle><manvolnum>8</manvolnum>
  178. </citerefentry>,
  179. <citerefentry>
  180. <refentrytitle>bindctl</refentrytitle><manvolnum>1</manvolnum>
  181. </citerefentry>,
  182. <citetitle>BIND 10 Guide</citetitle>.
  183. </para>
  184. </refsect1>
  185. <refsect1>
  186. <title>HISTORY</title>
  187. <para>
  188. <command>b10-stats-httpd</command> was designed and implemented by Naoki
  189. Kambe of JPRS in Mar 2011.
  190. </para>
  191. </refsect1>
  192. </refentry><!--
  193. - Local variables:
  194. - mode: sgml
  195. - End:
  196. -->