[
https://issues.apache.org/jira/browse/IGNITE-2919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15231842#comment-15231842
]
Vasiliy Sisko commented on IGNITE-2919:
---------------------------------------
Implemented execution of script on alert.
To configure use arguments:
*-n* Alert name (opt.).
*-s* Path to script file.
*-i* Minimal interval of script execution that should be passed
Script is executed on unsuccessful check of alert condition after successful.
When alert check is unsuccessful longer than interval time script is not
executed second time.
To script passed the next arguments: 1) Alert name, 2) alert condition, 3, ...)
checked values of alert conditions.
For example for script: {code}alert -t=5 -r -n=Test -nc=gte2 -cc=lte16 -i=15
-s=/home/user/1.sh{code}
with script:
{code:title=1.sh}echo ALERT [$1] CONDITION [$2] alarmed with node count [$3]
and cpu count [$4] > test.txt{code}
will generated string: {code}ALERT [Test] CONDITION [-nc=gte2 -cc=lte16]
alarmed with node count [2] and cpu count [8]{code}
> Visor CMD: Add ability to attach custom scripts to alerts
> ---------------------------------------------------------
>
> Key: IGNITE-2919
> URL: https://issues.apache.org/jira/browse/IGNITE-2919
> Project: Ignite
> Issue Type: Bug
> Components: visor
> Affects Versions: 1.5.0.final
> Reporter: Denis Magda
> Assignee: Vasiliy Sisko
> Labels: community, important
> Fix For: 1.6
>
>
> Visor cmd support "alert" command that allows to listen on particular
> triggers (heap usage, nodes count, ...).
> If a trigger is fired Visor will print info into the log file.
> However it makes sense specify a custom script that will be triggered when a
> trigger is fired.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)