swarmbot

command module
v0.0.0-...-6d13933 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

README

SwarmBot

SwarmBot is a Slack bot PoC to aid Red Hat SREP in initiating and facilitating Swarms for Primary and Secondary.

The SwarmBot's main goals are:

  • Monitor PagerDuty and Jira Incident queues and determine workload levels
  • Upon hitting a pre-defined metric that indicates On-Call is under pressure, pages out to SREP in Slack to initiate a Swarm
  • Provides a simple interface for SREP Engineers to list incidents and assign one to themselves to work

Commands:

  • /swarm-init: Manually starts the Swarm process
  • /list-incs: Lists all incidents available to be worked
  • /assign {INC-ID}: Assigns incident INC-ID to the requestor

Note: This POC was done using a personal Slack Workspace and trial PagerDuty account. Key environment variables would need to be updated for your envrionment if you wished to test this, its merely for demo/code sample purposes. It also uses probably not recommended auth methods but good for testing.

export PAGERDUTY_TOKEN="YOUR_PD_API_TOKEN"
export SLACK_AUTH_TOKEN="YOUR_SLACK_AUTH_TOKEN"
export SLACK_CHANNEL_ID="YOUR_SLACK_CHANNEL_ID (Not name but actual ID listed in API)"
export SLACK_APP_TOKEN="YOUR_SLACK_APP_TOKEN" 
export JIRA_PAT_TOKEN="YOUR_JIRA_PAT_TOKEN"

export JIRA_BASE_URL="YOUR_JIRA_BASE_URL"
export PD_SCHEDULE_ID="YOUR_PAGERDUTY_SCHEDULE_ID"
export PD_ESCALATION_POLICY="YOUR_PAGERDUTY_ESCALATION_POLICY_ID"
export PD_BASE_URL="YOUR_PAGERDUTY_BASE_URL"

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL