Our Elasticsearch instance has indexes that are named based on the date. For example "cal-root-2016-03-15", "cal-root-2016-03-16", etc.
I'd like to be able to use date formatting in Mustache templates to create the path on the input http clause.
For example, this unformatted Mustache template works in input http:
"request": { "host": "localhost", "method": "post", "path": "/cal-root-{{ctx.execution_time}}/logs/_search", "params": { "search_type": "count" }, "body": {...} }
To produce this kind of path for a put request path:
"path": "/cal-root-2016-03-16T14:08:51.720Z/logs/_search",
I would like to be able to do this formatted Mustache template in input http:
"request": { "host": "localhost", "method": "post", "path": "/cal-root-{{dateFormat ctx.execution_time format=\"TTTT-mm-DD\"}}/logs/_search", "params": { "search_type": "count" }, "body": {...} }
This would produce the desired formatted put request path
"path": "/cal-root-2016-03-16/logs/_search",
Is some sort of date formatting available on the Mustache templates in Watcher?
Thanks, beckerdo