These sample watchers from here have additional scripts for the condition and transform. How do I add these to Kibana when creating a new advanced watcher?
You can use a dedicated API to store script, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/modules-scripting-using.html
POST _scripts/calculate-score
{
"script": {
"lang": "painless",
"source": "Math.log(_score * 2) + params.my_modifier"
}
}
Then you can refer to the script under the name you stored it as.
--Alex
Thank you. Is it possible to upload and manage these scripts via Kibana (eg. some Upload-Interface)?
The dev-tools console would be the UI to do so, but that is not a full UI, more of a helper to write JSON.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.