POST /_reindex
{
"source": {
"remote": {
"host": "http://source_elasticsearch:9200"
},
"index": "source_index"
},
"dest": {
"index": "destination_index"
}
}
POST _plugins/_anomaly_detection/detectors
{
"name": "example-detector",
"description": "Anomaly detector for example",
"time_field": "timestamp",
"indices": ["example-index"],
"feature_attributes": [
{
"feature_name": "mean_response_time",
"feature_enabled": true,
"aggregation_query": {
"response_time_avg": {
"avg": {
"field": "response_time"
}
}
}
}
]
}
POST _plugins/_alerting/monitors
{
"name": "example-monitor",
"type": "monitor",
"enabled": true,
"schedule": {
"period": {
"interval": 1,
"unit": "MINUTES"
}
},
"inputs": [
{
"search": {
"indices": ["example-index"],
"query": {
"size": 0,
"query": {
"bool": {
"filter": [
{
"range": {
"response_time": {
"gte": 1000
}
}
}
]
}
}
}
}
}
],
"triggers": [
{
"name": "example-trigger",
"severity": "1",
"condition": {
"script": {
"source": "ctx.results[0].hits.total.value > 0",
"lang": "painless"
}
},
"actions": []
}
]
}
_search
, _count
.elasticsearch-dump
for data migration and validation.