Sign inSign up

qlaffont/monity

By qlaffont

•Updated over 6 years ago

Docker image of Github project https://github.com/qlaffont/monity

Image
0

1.2K

qlaffont/monity repository overview

⁠🖥 Monity

Open Source Love Maintenance Travis (.com) David

GitHub issues PRs Welcome

GitHub stars Docker Pulls

Website and Server Monitor

  • Check Website Status + Response Time
  • Check if port is open + Response Time
  • Export Metrics in Prometheus
  • Send Webhook when status code change (Slack/Discord)

Technology Used: Fastify, Next (React), Bulma


⁠Install

Requirements :

  • MongoDB
  • Node.JS (v13)
npm run build && npm run start

Or you can use docker image (don't contain mongodb server)

  docker pull qlaffont/monity

⁠Documentation

REST Documentation is accessible at the address http://localhost:5000/documentation⁠.

To setup checkers, you can go to http://localhost:5000/setup⁠.

To know the process to get auth token, you can go to http://localhost:5000/setup/auth⁠.


⁠Environment Variables

Environment Variable (* = required)DescriptionExample
PORTChange default port

(Default: 5000)
process.env.PORT=5000
MONGODB_URI *MongoDB Connection URIprocess.env.MONGODB_URI=""
NODE_ENVIf NODE_ENV === "production", it will disable rest documentation access.process.env.NODE_ENV="production"
AUTH_SECRETDefine JWT Secret Key.
We strongly recommend to generate one.


(Default: 'monity-secret')
process.env.AUTH_SECRET="MySecretJWTKey"
DEBUG_WORKERDisplay Command send to Worker.

(Default: false)
process.env.DEBUG_WORKER=true
DISABLE_AUTHDisable Authentication and block access to API.

(Default: false)
process.env.DISABLE_AUTH=true
WEBHOOK_URLURL to call when Status Code Change (ex: Slack/Discord)process.env.WEBHOOK_URL="myurl"
WEBHOOK_MESSAGEMarkdown Message to use for webhookprocess.env.WEBHOOK_MESSAGE="NEW STATUS"
DISABLE_PROMETHEUSDisable Prometheus Exportprocess.env.DISABLE_PROMETHEUS=true
DISABLE_AUTOCLEANDisable Auto Clean Metrics (default: false)process.env.DISABLE_AUTOCLEAN=true

⁠Webhook

To activate webhook, you need to add WEBHOOK_URL in your environment variable.

To create a custom WEBHOOK_MESSAGE, you can use these variables in your message:

Template VariablesDescription
*|checkerName|*Checker Name
*|checkerAddress|*Checker Address
*|oldStatusCode|*Old Status Code
*|newStatusCode|*New Status Code

Default Message :

:information_source: **Status Changed** :information_source: \n __Checker__ : **|checkerName|** \n __Status Code__ : ~~*|oldStatusCode|*~~ to ***|newStatusCode|*** \n __Address__ : ***|checkerAddress|*** \n\n Powered by Monity

⁠Issues

If you have any problems, please contact us through a GitHub issue⁠.

⁠Contributing

You are invited to contribute new features, fixes, or updates, large or small. Regarding a pull request, tests need to pass to be merged.

Tag summary

Content type

Image

Digest

Size

181.2 MB

Last updated

over 6 years ago

docker pull qlaffont/monity