https://github.com/intelligo-mn/uptime.js
:octocat: Uptime monitor in Node.js that send status changes to Chatbots
https://github.com/intelligo-mn/uptime.js
nodejs slack-api slack-bot slack-webhook uptime uptime-monitor uptime-robot uptimerobot
Last synced: 3 months ago
JSON representation
:octocat: Uptime monitor in Node.js that send status changes to Chatbots
- Host: GitHub
- URL: https://github.com/intelligo-mn/uptime.js
- Owner: intelligo-mn
- License: mit
- Created: 2018-01-16T11:22:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-04-02T23:13:04.000Z (3 months ago)
- Last Synced: 2025-04-09T23:16:39.607Z (3 months ago)
- Topics: nodejs, slack-api, slack-bot, slack-webhook, uptime, uptime-monitor, uptime-robot, uptimerobot
- Language: TypeScript
- Homepage: https://uptime.js.org/
- Size: 1.68 MB
- Stars: 54
- Watchers: 5
- Forks: 14
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-starred - intelligo-mn/uptime.js - :octocat: Uptime monitor in Node.js that send status changes to Chatbots (nodejs)
README
# Node uptime bot
[](https://www.npmjs.com/package/uptime.js)
[](https://www.npmjs.com/package/uptime.js)
[](https://github.com/intelligo-systems/uptime.js/blob/master/LICENSE)
[](https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Fintelligo-systems%2Fintelligo)Uptime monitor in Node.js that send status changes to Chatbots
[](https://nodei.co/npm/uptime.js/)
| [Installation][] | [Usage][] | [Setting up Slack][] | [Contributors][] | [License][] |
|---|---|---|---|---|# Installation
```
npm install uptime.js --save
```# Usage
```js
const express = require('express'),
Uptime = require('uptime.js');const app = express();
app.set('port', process.env.PORT || 5000);
const bot = new Uptime({
SLACK_WEBHOOK_URL: 'SLACK_WEBHOOK_URL'
});bot.monitor([
{
url: 'https://www.intelligo.systems', // URL of service we'll be pining
timeout: 200 // threshold in milliseconds above which is considered degraded performance
}
]);app.listen(app.get('port'), () => {
console.log('Express is listening on port', app.get('port'));
});```
# Setting up Slack
Head on over to the Incoming WebHooks Slack app. If you're signed in to your Slack Workspace you should see an Add Configuration button. Hit it!

Select or create a new channel then hit the Add Incoming WebHooks integration

Grab the WebHook URL and paste it into the `SLACK_WEBHOOK_URL`, which would look like so:
`SLACK_WEBHOOK_URL=https://hooks.slack.com/services/XXXXXX/YYYYYY/XXXXXXXXXXXX`

You can update
```js
bot.monitor([
{
url: 'https://www.intelligo.systems', // URL of service we'll be pining
timeout: 200 // threshold in milliseconds above which is considered degraded performance
}
]);
```
with the services you wish to monitor and throw the code up on a server.
## Contributors
You may contribute in several ways like creating new features, fixing bugs, improving documentation and examples
or translating any document here to your language. [Find more information in CODE_OF_CONDUCT.md](.github/CODE_OF_CONDUCT.md).
Contributors## License
> Copyright (C) 2019 Intelligo LLC.
> uptime.js is open-sourced software licensed under the [MIT](https://opensource.org/licenses/MIT) license.
> (See the [LICENSE](https://github.com/intelligo-systems/uptime.js/blob/master/LICENSE) file for the whole license text.)**[⬆ back to top](#node-uptime-bot)**
[Installation]:#installation
[Usage]:#usage
[Setting up Slack]:#setting-up-slack
[Contributors]:#contributors
[License]:#license