I have created an advanced watcher script to check whether the data is getting updated for the last 30 minutes for multiple indices . Is there a way to display the index name in Action logging.
I want to display only es_indices_data_validation_2 in the below log since the index "es_indices_data_validation_2" not received any data for the last 30 minutes
Script :
{
"trigger": {
"schedule": {
"interval": "30m"
}
},
"input": {
"search": {
"request": {
"search_type": "query_then_fetch",
"indices": [
"es_indices_data_validation",
"es_indices_data_validation_2"
],
"types": ,
"body": {
"query": {
"range": {
"indexed_at": {
"from": "now-30m",
"to": "now"
}
}
}
}
}
}
},
"condition": {
"compare": {
"ctx.payload.hits.total": {
"lt": 1
}
}
},
"actions": {
"log": {
"logging": {
"level": "info",
"text": "ElasticSearch Index <<es_indices_data_validation_2>> does not receive data for the last 60 minutes "
}
}
}
}