forked from docs/doc-exports
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com> Co-authored-by: Wuwan, Qi <wuwanqi1@noreply.gitea.eco.tsi-dev.otc-service.com> Co-committed-by: Wuwan, Qi <wuwanqi1@noreply.gitea.eco.tsi-dev.otc-service.com>
64 lines
4.2 KiB
HTML
64 lines
4.2 KiB
HTML
<a name="css_01_0179"></a><a name="css_01_0179"></a>
|
|
|
|
<h1 class="topictitle1">HTTP Status Code Monitoring</h1>
|
|
<div id="body0000001336314380"><div class="section" id="css_01_0179__en-us_topic_0000001336314380_section34633184616"><h4 class="sectiontitle">Context</h4><p id="css_01_0179__en-us_topic_0000001336314380_p13921202319573">When an external system accesses Elasticsearch through the HTTP protocol, a response and the corresponding status code are returned. The open-source Elasticsearch server does not collect the status code, so users cannot monitor Elasticsearch APIs status or cluster request status. CSS allows you to monitor the HTTP status codes of clusters.</p>
|
|
</div>
|
|
<div class="section" id="css_01_0179__en-us_topic_0000001336314380_section35281741661"><h4 class="sectiontitle">Prerequisites</h4><p id="css_01_0179__en-us_topic_0000001336314380_p1325419571260">Currently, only clusters of versions 7.6.2 and 7.10.2 support HTTP status code monitoring.</p>
|
|
</div>
|
|
<div class="section" id="css_01_0179__en-us_topic_0000001336314380_section57521147471"><h4 class="sectiontitle">Obtaining Status Codes</h4><ol id="css_01_0179__en-us_topic_0000001336314380_ol927111214106"><li id="css_01_0179__en-us_topic_0000001336314380_li1274916552817">Log in to the CSS management console.</li><li id="css_01_0179__en-us_topic_0000001336314380_li1274935516811">Choose <strong id="css_01_0179__en-us_topic_0000001336314380_b167484548275816">Clusters</strong> in the navigation pane. On the <strong id="css_01_0179__en-us_topic_0000001336314380_b81697027075816">Clusters</strong> page, locate the target cluster and click <strong id="css_01_0179__en-us_topic_0000001336314380_b3500814775816">Access Kibana</strong> in the <strong id="css_01_0179__en-us_topic_0000001336314380_b37786405475816">Operation</strong> column.</li><li id="css_01_0179__en-us_topic_0000001336314380_li68533413139">In the navigation tree on the left, choose <strong id="css_01_0179__en-us_topic_0000001336314380_b75133483433">Dev Tools</strong>.</li><li id="css_01_0179__en-us_topic_0000001336314380_li178073791413">On the console page of <strong id="css_01_0179__en-us_topic_0000001336314380_b48041471448">Dev Tools</strong>, run commands based on the cluster version.<ul id="css_01_0179__en-us_topic_0000001336314380_ul1428164221417"><li id="css_01_0179__en-us_topic_0000001336314380_li2028124241413">For clusters of version 7.6.2, run the following command to obtain the status code statistics:<pre class="screen" id="css_01_0179__en-us_topic_0000001336314380_screen1157216529158">GET /_nodes/http_stats</pre>
|
|
<p id="css_01_0179__en-us_topic_0000001336314380_p314812429194">Example response:</p>
|
|
<pre class="screen" id="css_01_0179__en-us_topic_0000001336314380_screen16192181232119">{
|
|
"_nodes" : {
|
|
"total" : 1,
|
|
"successful" : 1,
|
|
"failed" : 0 },
|
|
"cluster_name" : "css-8362",
|
|
"nodes" : {
|
|
"F9IFdQPARaOJI7oL7HOXtQ" : {
|
|
"http_code" : {
|
|
"200" : 114,
|
|
"201" : 5,
|
|
"429" : 0,
|
|
"400" : 7,
|
|
"404" : 0,
|
|
"405" : 0
|
|
}
|
|
}
|
|
}
|
|
}</pre>
|
|
</li><li id="css_01_0179__en-us_topic_0000001336314380_li13175163410154">For clusters of version 7.10.2, run the following command to obtain the status code statistics:<pre class="screen" id="css_01_0179__en-us_topic_0000001336314380_screen9264102616180">GET _nodes/stats/http </pre>
|
|
<p id="css_01_0179__en-us_topic_0000001336314380_p7264226121819">Example response:</p>
|
|
<pre class="screen" id="css_01_0179__en-us_topic_0000001336314380_screen19264172611181">{
|
|
// ...
|
|
"cluster_name" : "css-2985",
|
|
"nodes" : {
|
|
// ...
|
|
"omvR9_W-TsGApraMApREjA" : {
|
|
|
|
// ...
|
|
"http" : {
|
|
"current_open" : 4,
|
|
"total_opened" : 37,
|
|
"http_code" : {
|
|
"200" : 25,
|
|
"201" : 7,
|
|
"429" : 0,
|
|
"400" : 3,
|
|
"404" : 0,
|
|
"405" : 0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
</li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_01_0177.html">Enhanced Cluster Monitoring</a></div>
|
|
</div>
|
|
</div>
|
|
|