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>
95 lines
5.1 KiB
HTML
95 lines
5.1 KiB
HTML
<a name="css_01_0169"></a><a name="css_01_0169"></a>
|
|
|
|
<h1 class="topictitle1">Other Management APIs</h1>
|
|
<div id="body0000001203015830"><ul id="css_01_0169__en-us_topic_0000001223754412_ul9493547103713"><li id="css_01_0169__en-us_topic_0000001223754412_li13301539173112"><strong id="css_01_0169__en-us_topic_0000001223754412_b1270675419319">Querying the created patterns</strong>.<p id="css_01_0169__en-us_topic_0000001223754412_p16425910163410">This API is used to query the pattern list and query a specified pattern by name.</p>
|
|
<p id="css_01_0169__en-us_topic_0000001223754412_p10725108133415">An example request is as follows:</p>
|
|
<pre class="screen" id="css_01_0169__en-us_topic_0000001223754412_screen1687311816458">GET auto_sync/pattern
|
|
GET auto_sync/pattern/{pattern_name}</pre>
|
|
<p id="css_01_0169__en-us_topic_0000001223754412_p1782054184413">The following is an example of the response:</p>
|
|
<pre class="screen" id="css_01_0169__en-us_topic_0000001223754412_screen8444413134518">{
|
|
"patterns" : [
|
|
{
|
|
"name" : "pattern1",
|
|
"pattern" : {
|
|
"remote_cluster" : "leader",
|
|
"remote_index_patterns" : [
|
|
"log*"
|
|
],
|
|
"local_index_pattern" : "{{remote_index}}-sync",
|
|
"settings" : { }
|
|
}
|
|
}
|
|
]
|
|
}</pre>
|
|
</li><li id="css_01_0169__en-us_topic_0000001223754412_li172942323211"><strong id="css_01_0169__b85061323161019">Deleting a created schema</strong>.<p id="css_01_0169__en-us_topic_0000001223754412_p191671135153416">This API is used to delete a specified pattern.</p>
|
|
<p id="css_01_0169__en-us_topic_0000001223754412_p1828333415348">An example request is as follows:</p>
|
|
<pre class="screen" id="css_01_0169__en-us_topic_0000001223754412_screen5658180104516">DELETE auto_sync/pattern/{pattern_name}</pre>
|
|
</li><li id="css_01_0169__en-us_topic_0000001223754412_li532063316329"><strong id="css_01_0169__en-us_topic_0000001223754412_b14661644163211">Obtaining the automatic synchronization status</strong>.<p id="css_01_0169__en-us_topic_0000001223754412_p3772144123516">This API is used to obtain the synchronization status of matched indexes.</p>
|
|
<p id="css_01_0169__en-us_topic_0000001223754412_p093811213511">An example request is as follows:</p>
|
|
<pre class="screen" id="css_01_0169__en-us_topic_0000001223754412_screen1446182803712">GET auto_sync/stats</pre>
|
|
<p id="css_01_0169__en-us_topic_0000001223754412_p141842516375">The following is an example of the response:</p>
|
|
<pre class="screen" id="css_01_0169__en-us_topic_0000001223754412_screen16820122310374">{
|
|
"success_count" : 3,
|
|
"failed_count" : 0,
|
|
"failed_remote_cluster_state_requests_count" : 0,
|
|
"last_fail_exception" : { },
|
|
"last_fail_remote_cluster_requests_exception" : { }
|
|
}</pre>
|
|
</li><li id="css_01_0169__en-us_topic_0000001223754412_li10669105219327"><strong id="css_01_0169__en-us_topic_0000001223754412_b688345183312">Obtaining the synchronization status of the index that is being synchronized</strong>.<p id="css_01_0169__en-us_topic_0000001223754412_p1925919245357">An example request is as follows:</p>
|
|
<pre class="screen" id="css_01_0169__en-us_topic_0000001223754412_screen15143152684719">GET {index_name}/sync_stats</pre>
|
|
<p id="css_01_0169__en-us_topic_0000001223754412_p102933159471">The following is an example of the response:</p>
|
|
<pre class="screen" id="css_01_0169__en-us_topic_0000001223754412_screen1102144314719">{
|
|
"indices" : {
|
|
"data1_follower" : {
|
|
"shards" : {
|
|
"0" : [
|
|
{
|
|
"primary" : false,
|
|
"total_synced_times" : 27,
|
|
"total_empty_times" : 25,
|
|
"total_synced_files" : 4,
|
|
"total_synced_bytes" : 3580,
|
|
"total_paused_nanos" : 0,
|
|
"total_paused_times" : 0,
|
|
"current" : {
|
|
"files_count" : 0,
|
|
"finished_files_count" : 0,
|
|
"bytes" : 0,
|
|
"finished_bytes" : 0
|
|
}
|
|
},
|
|
{
|
|
"primary" : true,
|
|
"total_synced_times" : 28,
|
|
"total_empty_times" : 26,
|
|
"total_synced_files" : 20,
|
|
"total_synced_bytes" : 17547,
|
|
"total_paused_nanos" : 0,
|
|
"total_paused_times" : 0,
|
|
"current" : {
|
|
"files_count" : 0,
|
|
"finished_files_count" : 0,
|
|
"bytes" : 0,
|
|
"finished_bytes" : 0
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}</pre>
|
|
</li><li id="css_01_0169__en-us_topic_0000001223754412_li340847113310"><strong id="css_01_0169__en-us_topic_0000001223754412_b38181012153315">Changing the synchronization period</strong>.<p id="css_01_0169__en-us_topic_0000001223754412_p214154518462">The synchronization period is 30 seconds by default and can be modified.</p>
|
|
<p id="css_01_0169__en-us_topic_0000001223754412_p1517434513510">An example request is as follows (change the synchronization period to 2 seconds):</p>
|
|
<pre class="screen" id="css_01_0169__en-us_topic_0000001223754412_screen1049271212486">PUT {index_name}/_settings
|
|
{
|
|
"index.remote_sync.sync_interval": "2s"
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_01_0164.html">Instructions</a></div>
|
|
</div>
|
|
</div>
|
|
|