b10-stats-httpd.xml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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 eventually
  51. exited by it. The server is intended to be server requests by HTTP
  52. clients like web browsers and third-party modules. When the server is
  53. asked, it requests BIND 10 statistics data or its schema from
  54. <command>b10-stats</command>, and it sends the data back 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. There is different URL for each document. But please note that
  62. you would be redirected to the URL of XML document if you request the URL
  63. of the root document. For example, you would be redirected to
  64. http://127.0.0.1:8000/bind10/statistics/xml if you request
  65. http://127.0.0.1:8000/. Please see the manual and the spec file
  66. of <command>b10-stats</command> for more details about the items of BIND
  67. 10 statistics. The server uses CC session in communication
  68. with <command>b10-stats</command>. CC session is provided
  69. by <command>b10-msgq</command> which is started
  70. by <command>bind10</command> in advance. The server is implemented by
  71. HTTP-server libraries included in Python 3. The server obtains the
  72. configuration from the config manager (<command>b10-cfgmgr</command>) in
  73. runtime. Please see below for more details about this spec file and
  74. configuration of the server.
  75. </para>
  76. </refsect1>
  77. <refsect1>
  78. <title>OPTIONS</title>
  79. <para>The argument is as follow:</para>
  80. <variablelist>
  81. <varlistentry>
  82. <term><option>-v</option>, <option>--verbose</option></term>
  83. <listitem>
  84. <para>
  85. <command>b10-stats-httpd</command> switches to verbose mode and sends
  86. verbose messages to STDOUT.
  87. </para>
  88. </listitem>
  89. </varlistentry>
  90. </variablelist>
  91. </refsect1>
  92. <refsect1>
  93. <title>FILES</title>
  94. <para>
  95. <filename>/usr/local/share/bind10-devel/stats-httpd.spec</filename>
  96. <!--TODO: The filename should be computed from prefix-->
  97. &mdash; the spec file of <command>b10-stats-httpd</command>. This file
  98. contains configurable settings
  99. of <command>b10-stats-httpd</command>. This setting can be configured in
  100. runtime via
  101. <refentrytitle>bindctl</refentrytitle><manvolnum>1</manvolnum>. Please
  102. see the manual
  103. of <refentrytitle>bindctl</refentrytitle><manvolnum>1</manvolnum> about
  104. how to configure the settings.
  105. </para>
  106. <para>
  107. <filename>/usr/local/share/bind10-devel/stats-httpd-xml.tpl</filename>
  108. <!--TODO: The filename should be computed from prefix-->
  109. &mdash; the template file of XML document.
  110. </para>
  111. <para>
  112. <filename>/usr/local/share/bind10-devel/stats-httpd-xsd.tpl</filename>
  113. <!--TODO: The filename should be computed from prefix-->
  114. &mdash; the template file of XSD document.
  115. </para>
  116. <para>
  117. <filename>/usr/local/share/bind10-devel/stats-httpd-xsl.tpl</filename>
  118. <!--TODO: The filename should be computed from prefix-->
  119. &mdash; the template file of XSL document.
  120. </para>
  121. </refsect1>
  122. <refsect1>
  123. <title>CONFIGURATION AND COMMANDS</title>
  124. <para>
  125. The configurable setting in
  126. <filename>stats-httpd.spec</filename> is:
  127. </para>
  128. <variablelist>
  129. <varlistentry>
  130. <term><varname>listen_on</varname></term>
  131. <listitem>
  132. <para>
  133. a list of pairs of address and port for
  134. <command>b10-stats-httpd</command> to listen HTTP requests on. The
  135. pair consists of the <varname>address</varname> string
  136. and <varname>port</varname> number. The default setting is the list
  137. of address 127.0.0.1 port 8000. If the server is started by the
  138. default setting being left, for example, the URL for XML document
  139. is http://127.0.0.1:8000/bind10/statistics/xml. And also IPv6
  140. addresses can be configured and they works in the runtime
  141. environment for dual stack. You can change the settings
  142. through <refentrytitle>bindctl</refentrytitle><manvolnum>8</manvolnum>.
  143. </para>
  144. </listitem>
  145. </varlistentry>
  146. </variablelist>
  147. <para>
  148. The commands in <filename>stats-httpd.spec</filename> are:
  149. </para>
  150. <variablelist>
  151. <varlistentry>
  152. <term><command>status</command></term>
  153. <listitem>
  154. <para>
  155. shows the status of <command>b10-stats-httpd</command> with its
  156. PID.
  157. </para>
  158. </listitem>
  159. </varlistentry>
  160. <varlistentry>
  161. <term><command>shutdown</command></term>
  162. <listitem>
  163. <para>
  164. exits the <command>b10-stats-httpd</command> process. (Note that
  165. the BIND 10 boss process will restart this service.)
  166. </para>
  167. </listitem>
  168. </varlistentry>
  169. </variablelist>
  170. </refsect1>
  171. <refsect1>
  172. <title>SEE ALSO</title>
  173. <para>
  174. <citerefentry>
  175. <refentrytitle>b10-stats</refentrytitle><manvolnum>8</manvolnum>
  176. </citerefentry>,
  177. <citerefentry>
  178. <refentrytitle>b10-msgq</refentrytitle><manvolnum>8</manvolnum>
  179. </citerefentry>,
  180. <citerefentry>
  181. <refentrytitle>b10-cfgmgr</refentrytitle><manvolnum>8</manvolnum>
  182. </citerefentry>,
  183. <citerefentry>
  184. <refentrytitle>bind10</refentrytitle><manvolnum>8</manvolnum>
  185. </citerefentry>,
  186. <citerefentry>
  187. <refentrytitle>bindctl</refentrytitle><manvolnum>1</manvolnum>
  188. </citerefentry>,
  189. <citetitle>BIND 10 Guide</citetitle>.
  190. </para>
  191. </refsect1>
  192. <refsect1>
  193. <title>HISTORY</title>
  194. <para>
  195. <command>b10-stats-httpd</command> was designed and implemented by Naoki
  196. Kambe of JPRS in Mar 2011.
  197. </para>
  198. </refsect1>
  199. </refentry><!--
  200. - Local variables:
  201. - mode: sgml
  202. - End:
  203. -->