I have checked the documentation and searched in the internet but I could not find information how to schedule indexing a document in a specific datetime.
All I have found is following but not working
PUT _opendistro/_alerting/watch/index_document
{
"trigger": {
"schedule": {
"later": "2023-05-30T10:00:00" // The datetime for indexing
}
},
"input": {
"simple": {
"payload": {
"index": "your_index",
"document": {
"field1": "value1",
"field2": "value2"
// Add more fields as needed
}
}
}
},
"actions": {
"index_document": {
"index": {
"index": "your_index"
}
}
}
}
Can someone please point a source for this?
thanks in advance ā¦
dnelub
May 30, 2023, 12:35pm
2
So, I will change my question: is Opensearch able to schedule indexing a document for specific datetime? or it is just a urban legend!
Hey @dnelub
I havent seen that before, most if not all shippers send logs/messages/documents as soon as they arrive. Can I ask why you need a document at a specific time?
pablo
May 31, 2023, 11:36am
4
@dnelub By indexing you mean ingesting data to OpenSearch/OpenDistro?
If so, Iām not aware of such a function. OpenSearch/OpenDistro just accepts the data instead of pulling it.
You would have to configure your data source to push the data to the OpenSearch/OpenDistro at a specific time.
In regards to alerting, it is used to observe indices with already ingested data and trigger action based on the configured rules.
dnelub
May 31, 2023, 11:04pm
5
Thanks for the answers. I just wanted to be sure if there is a way to do it in Opensearch. So, I will do it by coding.
2 Likes