HI,
Can I name the index in an indexaction, so I get an index per day? Like:
"index": {
"index": "alerts-%{+YYYY.MM.dd}",
"doc_type": "some_alert"
}
HI,
Can I name the index in an indexaction, so I get an index per day? Like:
"index": {
"index": "alerts-%{+YYYY.MM.dd}",
"doc_type": "some_alert"
}
Hey,
so this example works and creates an alert named index with a date component:
PUT _xpack/watcher/watch/_execute
{
"watch": {
"trigger": {
"schedule": {
"interval": "5h"
}
},
"input": {
"simple": {
"foo" : "bar"
}
},
"actions": {
"second" : {
"index": {
"index": "<alerts-{now/M}>",
"doc_type": "some_alert"
}
}
}
}
}
--Alex
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.