[ https://issues.apache.org/jira/browse/AMBARI-21122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yao Lei updated AMBARI-21122: ----------------------------- Attachment: (was: AMBARI-21122.patch) > Part One: Specify the script directly in alert target for script-based alert > dispatchers > ----------------------------------------------------------------------------------------- > > Key: AMBARI-21122 > URL: https://issues.apache.org/jira/browse/AMBARI-21122 > Project: Ambari > Issue Type: Technical task > Affects Versions: trunk > Reporter: Yao Lei > Assignee: Yao Lei > Fix For: 3.0.0 > > Attachments: AMBARI-21122.1.patch > > > *Jave Codes Part* > This patch will support using property > *ambari.dispatch-property.script.filename* in alert target to tell > AlertScriptDispatcher to lookup script by filename,default in > /var/lib/ambari-server/resources/scripts directory. We can also change this > directory in ambari.properties by > *notification.dispatch.alert.script.directory* property. > Execute a command manually like following to create an alert target that > includes this property: > {code} > POST api/v1/alert_targets > { > "AlertTarget": { > "name": "syslogger", > "description": "Syslog Target", > "notification_type": "ALERT_SCRIPT", > "global": false, > "groups":[1,3] > "alert_states":["WARNING","CRITICAL","UNKNOWN"], > "properties": { > "ambari.dispatch-property.script.filename": "foo.py" > } > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)