Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slack app for monitoring backend services #1

Closed
3 tasks
jmensch1 opened this issue May 14, 2020 · 8 comments
Closed
3 tasks

Slack app for monitoring backend services #1

jmensch1 opened this issue May 14, 2020 · 8 comments
Labels
feature: monitoring Automated monitoring feature: slackbot role: Site Reliability Engineer aka Infrastructure Engineer size: 13+pt Must be broken down into smaller issues

Comments

@jmensch1
Copy link

Overview

When backend services go down, it would be convenient if the relevant team could be notified on Slack so they can address the issue.

Action Items

  • Create a Slack app with "incoming webhooks" enabled.
  • For each team that wants to use the Slack app, create a webhook that's connected to the channel they want to receive notifications in.
  • Each team can connect to their webhook from whatever backend services they're using. This would have to be done on a team-by-team basis.

Resources/Instructions

These are the Slack instructions for creating an app with incoming webhooks. https://api.slack.com/messaging/webhooks

Note that our slack account is limited to 10 apps, and we've already got 10 installed. So in order for this to work, one of those other apps would have to be bumped.

@ExperimentsInHonesty
Copy link
Member

ExperimentsInHonesty commented Feb 7, 2022

VRMS already has a app installed. We need to review this and update this app to take in webhooks and have a queue that processes messages, so that any project at hfla can use it for any message its wants to send either on a schedule or one time.

Related issues
hackforla/website#1543
hackforla/VRMS#146

We already have a vrms bot to start with
image

@fyliu
Copy link
Member

fyliu commented Feb 24, 2022

  1. Looks like slackbot.js is using the send message api to send messages to a channel rather than going through a webhook.
    https://github.com/hackforla/VRMS/blob/a4642fa7016ae0aff7a5c08a0c332b9538d3d903/backend/workers/slackbot.js#L51

  2. It's actually incredibly easy to create a slackbot and add webhooks to it that make posts to specific channels. It's all clicking buttons on the slack website. I've done so and did the quick test in less than 10 mins including creating a new separate workspace to test it in. Just follow the instructions in the Resources link.

  3. HfLA Projects will need to keep the webhook urls secret and can just post messages to them in order to have the messages appear in their channels.

  4. We will have to get access to the VRMS app as collaborators if we don't want to bump that app off the workspace. I'm not sure if VRMS still uses the app. The code in their repo that uses the token isn't deployment-ready, although it looks like it would've worked at one point from a local instance of VRMS. The code hardcodes localhost:3000.

@fyliu fyliu self-assigned this Mar 1, 2022
@fyliu
Copy link
Member

fyliu commented Mar 1, 2022

I went to the VRMS meeting just now and got confirmation from David Rubinstein and the VRMS team that they are not using the slack app for anything. They agreed that it's okay to remove it and make a new one.

Next steps:

  • make a list of projects that will use this app and their slack channel names
  • remove the VRMS app unless someone still has access to it (disable, maybe at the same time as installing the new app)
  • create a new app with webhooks to post messages to individual slack channels for the projects (app needs to be installed in the workspace before it has access to the channels to create webhooks)
  • add collaborators from OPS who can update the app in case people leave HfLA
  • create documentation on how to use the webhooks
  • send the webhook url and documentation link to HfLA projects
  • create documentation on how to update the slack app and the current list of collaborators who have access

@fyliu
Copy link
Member

fyliu commented Mar 8, 2022

  1. Progress - See above. The app is very easy to set up using the instructions in the Resources section
  2. Blockers
  • Decision: make a new app or replace the VRMS one. I think it's easier to make a new app, unless we can find the person who created the VRMS app.
  • Permissions: need permissions to first install the new app into the slack workspace by kicking out the VRMS app. This connects the app to the slack channels so that the webhooks can be set up in the app.
  • Question: How to determine which slack channels to set up webhooks for? List of active projects somewhere?
  1. Availability - An hour
  2. ETA - An hour after the empty app is installed into hackforla slack workspace

@fyliu
Copy link
Member

fyliu commented Jun 12, 2022

I stopped working on this and I've unassigned myself.

Here's my brain dump of where this left off.

Someone else seems to be working on the same thing over at VRMS although I can't find an issue for it on their issues tracker.

I had a slack conversation with Tim Shaker, must be before May 12, about his work on a similar or maybe the same slack app/bot we're talking about here. He replicated some VRMS tables like user, project, meeting and was going to generate reminder messages. This is roughly what I remember.

@fyliu
Copy link
Member

fyliu commented Jun 12, 2022

Somehow I'm not able to upload a screenshot right now, but here's the relevant VRMS message from May 16, 2022 about his slack app project that I'm still able to see:

7:11 PM
Tim Shaker
You can try out the Slackbot in this Slack workspace:
https://join.slack.com/t/vrms-dev/shared_invite/zt-19286euad-hDHJhzR4vttlJryxz1Is2g (edited)

@fyliu
Copy link
Member

fyliu commented Jul 17, 2022

Here is the issue where Tim is working on his Slack app 100Automations/futureautomations#8

@ExperimentsInHonesty
Copy link
Member

closing this issue in favor of a new format for gathering requirements for a new bot platform #67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: monitoring Automated monitoring feature: slackbot role: Site Reliability Engineer aka Infrastructure Engineer size: 13+pt Must be broken down into smaller issues
Projects
Development

No branches or pull requests

4 participants