samples
turbot/flowpipe-samples/notify-on-call-engineer-with-pagerduty
Get Involved
Version
License
Notify On-Call Engineer With PagerDuty
Allows anyone to see who is on-call for a particular escalation policy, send them an email, notify a Slack channel.
Installation
Download and install Flowpipe (https://flowpipe.io/downloads). Or use Brew:
brew tap turbot/tapbrew install flowpipe
Clone:
git clone https://github.com/turbot/flowpipe-samples.gitcd incident_response/notify_on_call_engineer_with_pagerduty
flowpipe mod install
Credentials
By default, the following environment variables will be used for authentication:
PAGERDUTY_TOKEN
SENDGRID_API_KEY
SLACK_TOKEN
You can also create credential
resources in configuration files:
vi ~/.flowpipe/config/pagerduty.fpc
credential "pagerduty" "pagerduty_cred" { api_key = "u+_szhL..."}
vi ~/.flowpipe/config/sendgrid.fpc
credential "sendgrid" "default" { api_key = "SG.R6pHsRv..."}
vi ~/.flowpipe/config/slack.fpc
credential "slack" "default" { token = "xoxp-12345-..."}
For more information on credentials in Flowpipe, please see Managing Credentials.
Usage
Run the pipeline and specify the slack_message
, slack_channel
, email_subject
, email_text
and from
pipeline arguments:
flowpipe pipeline run notify_on_call_engineer_with_pagerduty \ --arg slack_message="On-call engineer" \ --arg slack_channel="CH12345ABC" \ --arg email_subject="On-call engineer" \ --arg email_text="On-call engineer" \ --arg from="foo@bar.com"