I have a Watcher that filters on a timestamp range. I'd like to capture the searched timestamp range by saving something like "Start": "ctx.trigger.triggered_time - 23m" and "End": "ctx.trigger.triggered_time - 22m" into a variable so I can then use that start and end time in an alert message. I'd also like to make sure the times are in my current timezone.
I've been reading a bit on Watch script payload transforms but I'm not sure where in the Watcher to do this or how to properly do the math. I'd really appreciate some help.
@richcollier thank you that is helpful. I THINK I have adapted that to exactly what I need, but the Watcher UI is complaining about the action with error "Unknown action type provided for action "my-logging-action"." Is there a prerequisite I need to do before this will work?
However, they can be named anything. You can see in my example, the type is logging but the name is my-logging-action. There, of course, is also a transform in there as well.
Check your code to make sure your syntax is correct. Or, try your Watch in DevTools console to make sure the Watcher UI isn't the problem.
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.