mirror of https://gitee.com/bigwinds/arangodb
334 lines
15 KiB
HTML
334 lines
15 KiB
HTML
<html><head><title>ArangoDB Manual</title> <style media="screen" type="text/css" style="display:none">body{background-color:white;font:13px Helvetica,arial,freesans,clean,sans-serif;line-height:1.4;color:#333;}#access{font-size:16px;margin-left:12px;display:block;margin-left:10px;margin-right:10px;background-color:#F3F1EE!important;}#access a{border-right:1px solid #DBDEDF;color:#A49F96;display:block;line-height:38px;padding:0 10px;text-decoration:none;}#navigation ul{text-transform:uppercase;list-style:none;margin:0;}#navigation li{float:left;position:relative;}#container{width:920px;margin:0 auto;}a{color:#4183C4;text-decoration:none;}.contents h2{font-size:24px;border-bottom:1px solid #CCC;color:black;}.contents h1{font-size:33px;border-bottom:1px solid #CCC;color:black;}.clearfix:after{content:".";display:block;clear:both;font-size:0;height:0;visibility:hidden;}/**/ *:first-child+html .clearfix{min-height:0;}/**/ * html .clearfix{height:1%;}</style></head><body><div id="container"><img src="images/logo_arangodb.png" width="397" height="67" alt="ArangoDB"><div id="access" role="navigation"><div id="navigation"><ul id="menu-ahome" class="menu"><li><a href="Home.html">Table of contents</a></li> <li><a href="http://www.arangodb.org">ArangoDB homepage</a></li></ul></div><div class="clearfix"></div></div><div>
|
|
<!-- Generated by Doxygen 1.7.3 -->
|
|
</div>
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<h1>HTTP Interface for Administration and Monitoring </h1> </div>
|
|
</div>
|
|
<div class="contents">
|
|
<div class="textblock"><p>This is an introduction to ArangoDB's Http interface for administration and monitoring of the server.</p>
|
|
<hr/>
|
|
<ul>
|
|
<li>
|
|
<a class="el" href="HttpSystem.html">HTTP Interface for Administration and Monitoring</a> <ul>
|
|
<li>
|
|
<a class="el" href="HttpSystem.html#HttpSystemLog">GET /_admin/log</a> </li>
|
|
<li>
|
|
<a class="el" href="HttpSystem.html#HttpSystemStatus">GET /_admin/status</a> </li>
|
|
<li>
|
|
<a class="el" href="HttpSystem.html#HttpSystemConnectionStatistics">GET /_admin/connection-statistics</a> </li>
|
|
<li>
|
|
<a class="el" href="HttpSystem.html#HttpSystemRequestStatistics">GET /_admin/request-statistics</a> </li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<hr/>
|
|
<a class="anchor" id="HttpSystemLog"></a> <hr/>
|
|
<em>GET /_admin/log</em> (reads the log information)<hr/>
|
|
<br/>
|
|
<code><b>GET /_admin/log</b></code></p>
|
|
<p>Returns all fatal, error, warning or info log messages.</p>
|
|
<p>The returned object contains the attributes:</p>
|
|
<ul>
|
|
<li><code>lid</code>: a list of log-entry identifiers. Each log message is uniquely identified by its <code>lid</code> and the identifiers are in ascending order.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>level</code>: a list of the log-level of the log-entry.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>timestamp</code>: a list of the timestamp as seconds since 1970-01-01 of the log-entry.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>text</code>: a list of the text of the log-entry.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>totalAmount</code>: the total amount of log entries before pagination.</li>
|
|
</ul>
|
|
<p><code><b>GET /_admin/log?upto=<em>log-level</em></b></code></p>
|
|
<p>Returns all log entries upto <em>log-level</em>. Note that <em>log-level</em> must be:</p>
|
|
<ul>
|
|
<li><code>fatal</code> / <code>0</code></li>
|
|
<li><code>error</code> / <code>1</code></li>
|
|
<li><code>warning</code> / <code>2</code></li>
|
|
<li><code>info</code> / <code>3</code></li>
|
|
<li><code>debug</code> / <code>4</code></li>
|
|
</ul>
|
|
<p><code><b>GET /_admin/log?level=<em>log-level</em></b></code></p>
|
|
<p>Returns all log entries of <em>log-level</em>. Note that <code>level=</code> and <code>upto=</code> are mutably exclusive.</p>
|
|
<p><code><b>GET /_admin/log?size=<em>size</em>&offset=<em>offset</em></b></code></p>
|
|
<p>Paginates the result. Skip the first <em>offset</em> entries and limit the number of returned log-entries to <em>size</em>.</p>
|
|
<p><code><b>GET /_admin/log?start=<em>lid</em></b></code></p>
|
|
<p>Returns all log entries such that their log-entry identifier is greater or equal to <code>lid</code>.</p>
|
|
<p><code><b>GET /_admin/log?sort=<em>direction</em></b></code></p>
|
|
<p>Sort the log-entries either ascending if <em>direction</em> is <code>asc</code>, or descending if it is <code>desc</code> according to their <code>lid</code>. Note that the <code>lid</code> imposes a chronological order.</p>
|
|
<p><code><b>GET /_admin/log?search=<em>text</em></b></code></p>
|
|
<p>Only return the log-entries containing the <em>text</em> string. </p>
|
|
<p><a class="anchor" id="HttpSystemStatus"></a> <hr/>
|
|
<em>GET /_admin/status</em> (reads the system status)<hr/>
|
|
<br/>
|
|
<code><b>GET /_admin/status</b></code></p>
|
|
<p>The call returns an object with the following attributes:</p>
|
|
<ul>
|
|
<li><code>system.userTime</code>: Amount of time that this process has been scheduled in user mode, measured in clock ticks divided by sysconf(_SC_CLK_TCK) aka seconds.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>system.systemTime</code>: mount of time that this process has been scheduled in kernel mode, measured in clock ticks divided by sysconf(_SC_CLK_TCK) aka seconds.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>system.numberOfThreads</code>: Number of threads in this process.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>system.residentSize</code>: Resident Set Size: number of pages the process has in real memory. This is just the pages which count toward text, data, or stack space. This does not include pages which have not been demand-loaded in, or which are swapped out.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>system.virtualSize</code>: Virtual memory size in bytes.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>system.minorPageFaults</code>: The number of minor faults the process has made which have not required loading a memory page from disk.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>system.majorPageFaults</code>: The number of major faults the process has made which have required loading a memory page from disk. </li>
|
|
</ul>
|
|
<p><a class="anchor" id="HttpSystemConnectionStatistics"></a> <hr/>
|
|
<em>GET /_admin/connection-statistics</em> (reads the connection statistics)<hr/>
|
|
<br/>
|
|
<code><b>GET /_admin/connection-statistics?granularity=<em>granularity</em>&figures=<em>figures</em>&length=<em>length</em></b></code></p>
|
|
<p>The call returns statistics about the current and past requests. The following parameter control which information is returned.</p>
|
|
<ul>
|
|
<li><em>granularity</em>: use <code>minutes</code> for a granularity of minutes, <code>hours</code> for hours, and <code>days</code> for days. The default is <code>minutes</code>.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><em>figures</em>: a list of figures, comma-separated. Possible figures are <code>httpConnections</code>. You can use <code>all</code> to get all figures. The default is <code>httpConnections</code>.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><em>length</em>: If you want a time series, the maximal length of the series as integer. You can use <code>all</code> to get all available information. You can use <code>current</code> to get the latest interval.</li>
|
|
</ul>
|
|
<p>The returned statistics objects contains information of the request figures.</p>
|
|
<ul>
|
|
<li><code>resolution</code>: the resolution in seconds aka granularity. The length of the time intervals.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>start</code>: a list of time stamps in seconds since 1970-01-01. Each entry marks the start of an interval for which the figures were computed. The length of the interval is given by <code>resolution</code>.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>length</code>: the number of returned intervals.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>totalLength</code>: the number of available intervals.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>totalTime</code>: the distribution of the total time.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>queueTime</code>: the distribution of the queue time.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>httpConnections</code>: the number of opened http connections during the interval.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>httpDuration</code>: the distribution of the duration of the closed http connections during the interval.</li>
|
|
</ul>
|
|
<p>If <em>length</em> is <code>current</code> the figures for the current interval are returned.</p>
|
|
<p><b>Examples</b><br/>
|
|
</p>
|
|
<p>A time-series:</p>
|
|
<div class="fragment"><pre class="fragment">> curl -dump http://localhost:8529/_admin/connection-statistics?granularity=minutes&length=all
|
|
|
|
{
|
|
"resolution" : 60,
|
|
"start" : [1341839640, 1341839700],
|
|
"length" : 2,
|
|
"totalLength" : 120,
|
|
"httpConnections" : {
|
|
"count" : [196372, 624436],
|
|
"perSecond" : [3272.86, 10407.26]
|
|
},
|
|
"httpDuration" : {
|
|
"cuts" : [0.1, 1, 60],
|
|
"count" : [196365, 624434],
|
|
"mean" : [0.000534, 0.0006742],
|
|
"min": [0.0, 0.0],
|
|
"distribution" : [[196260, 0, 105, 0], [624013, 0, 421, 0]]
|
|
}
|
|
}
|
|
</pre></div> <p>The current figures:</p>
|
|
<div class="fragment"><pre class="fragment">> curl -dump http://localhost:8529/_admin/connection-statistics?granularity=minutes&length=current
|
|
|
|
{
|
|
"resolution" : 60,
|
|
"start" : 1341839700,
|
|
"httpConnections" : {
|
|
"count" : 761678,
|
|
"perSecond" : 12694.63
|
|
},
|
|
"httpDuration" : {
|
|
"cuts" : [0.1, 1, 60],
|
|
"count":761654,
|
|
"mean" : 0.00065909192362936456,
|
|
"min" : 0.0,
|
|
"distribution" : [761152, 0, 502, 0]
|
|
}
|
|
}
|
|
</pre></div> <p><a class="anchor" id="HttpSystemRequestStatistics"></a> <hr/>
|
|
<em>GET /_admin/request-statistics</em> (reads the request statistics)<hr/>
|
|
<br/>
|
|
<code><b>GET /_admin/request-statistics?granularity=<em>granularity</em>&figures=<em>figures</em>&length=<em>length</em></b></code></p>
|
|
<p>The call returns statistics about the current and past requests. The following parameter control which information is returned.</p>
|
|
<ul>
|
|
<li><em>granularity</em>: use <code>minutes</code> for a granularity of minutes, <code>hours</code> for hours, and <code>days</code> for days. The default is <code>minutes</code>.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><em>figures</em>: a list of figures, comma-separated. Possible figures are <code>totalTime</code>, <code>queueTime</code>, <code>requestTime</code>, <code>bytesSent</code>, and <code>bytesReceived</code>. You can use <code>all</code> to get all figures. The default is <code>totalTime</code>, <code>bytesSent</code>, and <code>bytesReceived</code>.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><em>length</em>: If you want a time series, the maximal length of the series as integer. You can use <code>all</code> to get all available information. You can use <code>current</code> to get the latest interval.</li>
|
|
</ul>
|
|
<p>The returned statistics objects contains information of the request figures.</p>
|
|
<ul>
|
|
<li><code>resolution</code>: the resolution in seconds aka granularity. The length of the time intervals.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>start</code>: a list of time stamps in seconds since 1970-01-01. Each entry marks the start of an interval for which the figures were computed. The length of the interval is given by <code>resolution</code>.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>length</code>: the number of returned intervals.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>totalLength</code>: the number of available intervals.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>totalTime</code>: the distribution of the total time.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>queueTime</code>: the distribution of the queue time.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>requestTime</code>: the distribution of the request time.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>bytesSent</code>: the distribution of the number of bytes sent.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>bytesReceived</code>: the distribution of the number of bytes received.</li>
|
|
</ul>
|
|
<p>A distribution contains the following fields:</p>
|
|
<ul>
|
|
<li><code>count</code>: a list describing the number of requests per time interval. This corresponds to the field <code>start</code>.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>mean</code>: a list describing the mean of the values per time interval. This corresponds to the field <code>start</code>.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>max</code>: a list describing the maximum of the values per time interval. This corresponds to the field <code>start</code>.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>cuts</code>: a list [N1, N2, ... Nx] of numbers defining the intervals for the figure. The first interval is [0 .. N1), the last interval is [Nx .. INF).</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>distribution</code>: a list describing the distribution of the values per time interval. This corresponds to the field <code>start</code>. Each entry of the list is again a list. This list describes the number of requests per cut and corresponds to the fieldcuts}.</li>
|
|
</ul>
|
|
<p>If <em>length</em> is <code>current</code> the figures for the current interval are returned.</p>
|
|
<p><b>Examples</b><br/>
|
|
</p>
|
|
<p>A time-series:</p>
|
|
<div class="fragment"><pre class="fragment">> curl -dump http://localhost:8529/_admin/request-statistics?granularity=minutes&figures=all&length=all
|
|
|
|
HTTP/1.1 200 OK
|
|
{
|
|
"resolution" : 60,
|
|
"start" : [1341497760, 1341497820],
|
|
"length" : 2,
|
|
"totalLength" : 120,
|
|
|
|
"totalTime" : {
|
|
"cuts" : [0.01, 0.05, 0.1, 0.2, 0.5, 1],
|
|
"count" : [1, 0],
|
|
"mean" : [0.0, 0.0],
|
|
"max" : [0.0, "-INF"],
|
|
"distribution" : [[1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]]
|
|
},
|
|
|
|
"queueTime": {
|
|
"cuts" : [0.01, 0.05, 0.1, 0.2, 0.5, 1],
|
|
"count" : [0, 0],
|
|
"mean" : [0.0, 0.0],
|
|
"max" : ["-INF", "-INF"],
|
|
"distribution" : [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]]
|
|
},
|
|
|
|
"requestTime" : {
|
|
"cuts" : [0.01, 0.05, 0.1, 0.2, 0.5, 1],
|
|
"count" : [1, 0],
|
|
"mean" : [0.0, 0.0],
|
|
"max" : [0.0, "-INF"],
|
|
"distribution" : [[1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]]
|
|
},
|
|
|
|
"bytesSent" : {
|
|
"cuts" : [250, 1000, 2000, 5000, 10000],
|
|
"count" : [1, 0],
|
|
"mean" : [1045, 0.0],
|
|
"max" : [1045, "-INF"],
|
|
"distribution" : [[0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0]]
|
|
},
|
|
|
|
"bytesReceived" : {
|
|
"cuts" : [250, 1000, 2000, 5000, 10000],
|
|
"count" : [1, 0],
|
|
"mean" : [232, 0.0],
|
|
"max" : [232, "-INF"],
|
|
"distribution" : [[1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]
|
|
}
|
|
}
|
|
|
|
</pre></div> <p>The current figures:</p>
|
|
<div class="fragment"><pre class="fragment">> curl -dump http://localhost:8529/_admin/request-statistics?granularity=minutes&figures=all&length=current
|
|
|
|
HTTP/1.1 200 OK
|
|
{
|
|
"resolution" : 60,
|
|
"start" : 1341499020,
|
|
|
|
"totalTime" : {
|
|
"cuts" : [0.01, 0.05, 0.1, 0.2, 0.5, 1],
|
|
"count" : 38611,
|
|
"mean" : 0.000051798710212115704,
|
|
"max" : 1,
|
|
"distribution" : [38609, 0, 0, 0, 0, 0, 2]
|
|
},
|
|
|
|
"queueTime" : {
|
|
"cuts" : [0.01, 0.05, 0.1, 0.2, 0.5, 1],
|
|
"count" : 0,
|
|
"mean" : 0.0,
|
|
"max" : "-INF",
|
|
"distribution" : [0, 0, 0, 0, 0, 0, 0]
|
|
},
|
|
|
|
"requestTime" : {
|
|
"cuts" : [0.01, 0.05, 0.1, 0.2, 0.5, 1],
|
|
"count" : 38611,
|
|
"mean" : 0.000025899355106057852,
|
|
"max" : 1,
|
|
"distribution" : [38610, 0, 0, 0, 0, 0, 1]
|
|
},
|
|
|
|
"bytesSent" : {
|
|
"cuts" : [250, 1000, 2000, 5000, 10000],
|
|
"count" : 38611,
|
|
"mean" : 204.18145088187304736,
|
|
"max" : 6477,
|
|
"distribution" : [38609, 1, 0, 0, 1, 0]
|
|
},
|
|
|
|
"bytesReceived" : {
|
|
"cuts" : [250, 1000, 2000, 5000, 10000],
|
|
"count" : 38611,
|
|
"mean" : 131.0053352671518496208,
|
|
"max" : 236,
|
|
"distribution" : [38611, 0, 0, 0, 0, 0]
|
|
}
|
|
}
|
|
</pre></div> </div></div>
|
|
</div></body></html>
|