Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yashmeh/is-my-api-down

This is a small configurable bot that checks URL-x for status at every x-minutes and notifies any x-channel on your slack workspace. :innocent:
https://github.com/yashmeh/is-my-api-down

api api-status cron docker slack slack-bot status

Last synced: 18 days ago
JSON representation

This is a small configurable bot that checks URL-x for status at every x-minutes and notifies any x-channel on your slack workspace. :innocent:

Awesome Lists containing this project

README

        

## Api-Status Checker Slack BOT

This is a small configurable bot that checks URL-x for status at every x-minutes and notifies any x-channel on your slack workspace.

> You might end up modifying your API to have a separate /api/status GET route (check ./server.js)

### How to setup :construction_worker:

- Create a Slack App
- Create appropriate scope for the app(chats:read,chats:join)
- Get the token xoxb..
- Add the app to your workspace
- /invite the app to your channel

### How to run :runner: :whale:

#### Build the image

```
docker image build -t .
```

#### Run the container

```
docker run -d -e URL= -e SLACK_TOKEN= -e MINUTE= -e CHANNEL=
```

#### How to test

- Once everything is setup,you will get the error posted to your channel.

- In case you want to test, grab the id of your container and go inside it

```
docker exec -it sh
```

- run the server (at localhost:3002) and set the URL in the container as localhost:3002

```
npm run dev
```

### Screenshot