Skip to content
This repository was archived by the owner on Aug 16, 2022. It is now read-only.

Commit 1a68798

Browse files
committed
monitoring doc
1 parent 0f42f29 commit 1a68798

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

docs/sql/monitoring.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Plugin Monitoring
2+
3+
## Introduction
4+
5+
By a stats endpoint, you are able to collect metrics for the plugin
6+
within the interval. Note that only node level statistics collecting is
7+
implemented for now. In other words, you only get the metrics for the
8+
node you're accessing. Cluster level statistics have yet to be
9+
implemented.
10+
11+
## Node Stats
12+
13+
### Description
14+
15+
The meaning of fields in the response is as follows:
16+
17+
<table>
18+
<colgroup>
19+
<col style="width: 30%" />
20+
<col style="width: 69%" />
21+
</colgroup>
22+
<thead>
23+
<tr class="header">
24+
<th>Field name</th>
25+
<th>Description</th>
26+
</tr>
27+
</thead>
28+
<tbody>
29+
<tr class="odd">
30+
<td><blockquote>
31+
<p>request_total</p>
32+
</blockquote></td>
33+
<td><blockquote>
34+
<p>Total count of request</p>
35+
</blockquote></td>
36+
</tr>
37+
<tr class="even">
38+
<td><blockquote>
39+
<p>request_count</p>
40+
</blockquote></td>
41+
<td><blockquote>
42+
<p>Total count of request within the interval</p>
43+
</blockquote></td>
44+
</tr>
45+
<tr class="odd">
46+
<td>failed_request_count_syserr</td>
47+
<td>Count of failed request due to system error within the interval</td>
48+
</tr>
49+
<tr class="even">
50+
<td>failed_request_count_cuserr</td>
51+
<td>Count of failed request due to bad request within the interval</td>
52+
</tr>
53+
<tr class="odd">
54+
<td><blockquote>
55+
<p>failed_request_count_cb</p>
56+
</blockquote></td>
57+
<td>Indicate if plugin is being circuit broken within the interval</td>
58+
</tr>
59+
</tbody>
60+
</table>
61+
62+
### Example
63+
64+
SQL query:
65+
66+
>> curl -H 'Content-Type: application/json' -X GET localhost:9200/_opendistro/_sql/stats
67+
68+
Result set:
69+
70+
{
71+
"failed_request_count_cb" : 0,
72+
"failed_request_count_cuserr" : 0,
73+
"circuit_breaker" : 0,
74+
"request_total" : 0,
75+
"request_count" : 0,
76+
"failed_request_count_syserr" : 0
77+
}

0 commit comments

Comments
 (0)