Tutorial for creating watcher scripts in Painless lab

Not sure where this question really belongs, but anyway.
Creating complex alerts in watcher, using multi level aggregations and painless scripts for the condition is a little unwieldy.
The Painless Lab could be used to develop and test these scripts. But some guidance is needed. How to convert aggregations result into painless syntax? Some tool to do that - and some tutorial - would be appreciated.

1 Like

Hi

There is currently no watcher context available in the Painless lab, I agree this would be useful, and more selectable contexts might be provided in the future

What you could do is use the Lab to debug your script by e.g. defining a custom ctx before the actual script you want to test. So you'd need to create a context inside the painless script, but of course this might be complicated. But that's the way I've debugged ruby scripts for Logstash a while ago.

Best,
Matthias

Ok I will create a custom ctx while waiting then. Thanks :slight_smile:

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.