Any services status monitor. It will help answer the question "Is everything okay?"
- Easy configuration
- It's standalone service. You can use it to check resources on a private network
- You can write your own checkers and check whatever you want
- Groups of checks (for different types of checks or different environments for example)
- JavaScript (I'm so sorry)
- Alerts and notifications
- Retrospective
- Simple HTTP status checker
- Dockerflow
__heartbeat__
checker
You will need Node.js v12+.
Fork boilerplate app or just clone it.
git clone [email protected]:gwer/another-one-bites-the-dust-app.git
cd another-one-bites-the-dust-app
yarn
yarn start
Don't forget to write your own config.
Note: cloned repository is another-one-bites-the-dust
-app
. It is not recommended to clone the current repository for direct use.
yarn add another-one-bites-the-dust
// index.js
const server = require('another-one-bites-the-dust');
const config = require('./config');
server(config);
node index.js
Only url
is required.
{
url,
expectedHttpCode = 200,
timeout = 30000,
warningTimeout = 5000
}
Checker is async function that returns the result in the following format:
Promise<{
"status": "ok"|"warning"|"error",
"details"?: string,
}>
const myChecker = () => ({ status: 'ok' });
Let's imagine you need a strange checker that checks the performance of adding numbers.
const myChecker = (expectedExecutionTime, count) => () => {
const startTime = performance.now();
let sum = 0;
for (let i = 0; i < count; i++) {
sum += i;
}
const endTime = performance.now();
if ((endTime - startTime) > expectedExecutionTime) {
return { status: 'warning', details: 'So slow...' };
}
return { status: 'ok' };
};
const config = {
...
{
name: 'Strange check',
checker: myChecker({ expectedExecutionTime: 100, count: 10000 }),
},
...
}
If you need something simpler, try tinystatus.
If you need something more complicated, with alerts and checks history, try Gatus.