Giter Club home page Giter Club logo

opsgin's Introduction

What is it

Utility for integrating on-duty Opsgenie and Slack

Works in two modes:

  • sync: syncs duty users from specific Opsgenie schedules with user groups in Slack.
  • daemon: calling on-duty in Slack channels and sending them notifications in Opsgenie via alerts

What is required for work

  • Opsgenie api key with access:
    • configuration access
    • read
  • Slack app OAuth token with scopes:
    • usergroups:read
    • usergroups:write
    • users:read
    • users:read.email
  • Docker / golang

Configuration example

# sync mode
slack_user_group_name1:
  - opsgenie schedule name 1
  - additional.user@num1
  - additional.user@num2
slack_user_group_name2:
  - opsgenie schedule name 2
  - additional.user@num1
  - additional.user@num2

# daemon mode
slack_app_name1:
  opsgenie:
    schedule: opsgenie schedule name 1
  slack:
    api_key: xoxb-***
    app_key: xapp-***
    user_group: user group name 1
slack_app_name2:
  opsgenie:
    schedule: opsgenie schedule name 2
  slack:
    api_key: xoxb-***
    app_key: xapp-***
    user_group: user group name 2

Usage with docker

  • Create a config.yaml in e.g. /opt/opsgin with the following content:
slack_user_group_name1:
  - opsgenie schedule name 1
  • Start the container by adding a directory with a configuration file:
docker run \
    -v /opt/opsgin:/opt/opsgin \
    -e OPSGIN_API_KEY=*** \
    -e OPSGIN_SLACK_API_KEY=*** \
    opsgin/opsgin:0.1-e6f2c10 sync

Build from source code

go install -v github.com/opsgin/[email protected]
opsgin
Utility for integrating on-duty Opsgenie and Slack

Usage:
  opsgin [command]

Available Commands:
  daemon      Calling on-duty in Slack channels and sending them notifications in Opsgenie via alerts
  help        Help about any command
  sync        Synchronization of the on-duty Opsgenie with Slack user groups

Flags:
      --config-file string   Set the configuration file name (default "config.yaml")
      --config-path string   Set the configuration file path (default "/Users/dkhalturin/repos/home/slack-utils/opsgin/build/package/etc/opsgin")
  -h, --help                 help for opsgin
      --log-format string    Set the log format: text, json (default "text")
      --log-level string     Set the log level: debug, info, warn, error, fatal (default "info")
      --log-pretty           Json logs will be indented
  -v, --version              version for opsgin

Use "opsgin [command] --help" for more information about a command.

opsgin's People

Contributors

dhalturin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

opsgin's Issues

Provide readme file

Hi!

Could you provide a readme with the software description, examples etc?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.