Git Product home page Git Product logo

synergy's Introduction

Synergy

Synergy is a bot.

Caveats

No warranty is expressed or implied.

Installation and Usage

Install all the prereqs. This is mostly easily done with Carton.

$ carton install

You need to set up a configuration file in YAML or JSON format. Look at the example file to see what config options are expected, because they're not documented yet. Run the program like this, more or less:

$ carton exec perl synergy -c /path/to/config/file.json

Slack permissions

(Caveat: this is as of early August 2020. The Slack API changes pretty frequently, and in weird ways, so your mileage may vary.)

If you want to make your own Synergy clone:

  1. Go to https://api.slack.com/rtm, scroll all the way to the bottom, click "Create a classic app." Synergy is built on top of Slack's Real-Time Messaging API, which uses a websocket connection. Slack is now discouraging this for new apps, which is too bad because eventually I suspect they'll get rid of it and we'll have to rewrite hunks of Synergy again.
  2. On the app page, click "Bots," then "Add a legacy bot user." Give it a name.
  3. Maybe: update scopes. Important: you must do this from the "OAuth & Permissions" page, not the bot user page. Go there, click "add an OAuth scope" (not "Update Scopes"), and add what you need. At time of writing, Synergy only needs the usergroups:write scope, for exactly one thing: the VictorOps reactor uses it to update the oncall Slack usergroup. If you're not messing with that code, you shouldn't need to add this.
  4. Once the app is installed, the OAuth & Permissions page should have two tokens. The "bot user access token" (starts with xoxb-) is used for the slack channel's api_key. The "OAuth Access Token" (starts with xoxp-, and is probably longer) is the privileged_api_key.

There may be other, slightly more obscure things, but the above should be enough to get you up and running.

Commands for Everyone

(Warning: this section is probably out of date, especially after the v2 rewrite.)

page USER: This will send an SMS to the user, who must be the master user. Anyone can use this command.

page USER: MESSAGE: This will send the message as an SMS to the user, who must be the master user. Anyone can use this command.

remind USER [ at TIME | in DURATION ] [with page]?: REMINDER: This command schedules a message to be send to the given user on the current channel. It doesn't check that the user is present now or later. It can be told to send a page, too.

alerts: This lists all active alerts in Circonus.

ack ALERTID for TIME: This acks the identified alert for a while.

oncall: This lists who is on call in Circonus.

oncall add USER [ USER... ]: Add users to the list of on call users.

oncall remove USER [ USER... ]: Remove users from the list of on call users.

oncall set USER [ USER... ]: Totally replace the contents of the on call group.

synergy's People

Contributors

ajaysusarla avatar brong avatar davis-a avatar dolmen avatar horstm22 avatar marcbradshaw avatar mmcclimon avatar perigrin avatar rashamou avatar rjbs avatar robn avatar tjwds avatar wolfsage avatar

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.