Send email notification upon "Migrate Traffic" event?

48 views
Skip to first unread message

Sky Diver

unread,
Jan 29, 2017, 11:25:19 AM1/29/17
to Google App Engine
Is there any way to trigger an email notification event once traffic is migrated to a different version?

Adam (Cloud Platform Support)

unread,
Jan 29, 2017, 4:41:41 PM1/29/17
to Google App Engine
This feature doesn't exist currently, however you could do something like set up a shell script that wraps gcloud app services set-traffic to do the traffic migration and also send an email using the UNIX mail command. As a trivial example:

#!/usr/bin/env sh

gcloud app services
set-traffic ${2} --splits ${1}=1 --migrate
cat
"Traffic migrated to version ${1}." | mail -s "Traffic migration alert" someemail@somedomain.com

This could be saved as migrate-traffic.sh and invoked as ./migrate-traffic.sh my-version or ./migrate-traffic.sh my-version my-service. 

Adam (Cloud Platform Support)

unread,
Jan 29, 2017, 4:43:26 PM1/29/17
to Google App Engine
If you'd like to see this feature implemented, you can also submit a request on the Google Cloud Platform issue tracker.
Reply all
Reply to author
Forward
0 new messages