Can we use script with compare in the condition field of a watch?

alerting

(Gearoid Lennon) #1

Hi Is it possible to use an indexed script in the condition field of a watch with the "compare" condition type?
My indexed script does not return a boolean (true/false) but a value which I want to compare to another value in the watch condition.
I know I could do this within the script, but I want to use this script for several watches and would rather not have individual scripts per watch. Please note I do not have inline scripting enabled and this is not an option for security purposes.

Thanks


(Alexander Reelsen) #2

Hey,

the compare condition has nothing to do with scripting - it was created to not have scripting enabled.

The script condition supports indexed scripts. If the value changes, you could access the metadata field in your script, which is configured when creating a watch.

--Alex


(system) #3

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