Giter VIP home page Giter VIP logo

monitoshi's Introduction

Monitoshi, website uptime monitoring

About

Ping URLs and send email alerts when it is down or goes up again.

I have an instance online here, feel free to use it - I use it myself to monitor my websites.

How does it work?

You submit an URL to Monitoshi, along with your email adress, to receive a confirmation link by email. Then Monitoshi will send emails when the URL goes down or up again. In the emails you also have a link to remove your URL and email from Monitoshi's list.

Links

Roadmap is here and feature requests can be done here.

Badges

In the email you will receive upon creation of a new monitor, there will be the URL of a badge like this one:

silexlabs.org status by monitoshi

Use it with markdown to display if your service is up or down, on a status page or in the README of your project.

Install locally

Requirements

  • Node.js
  • MongoDB installed and running (npm run serve or mongod --dbpath ./data)

1- Checkout this repository (git clone https://github.com/lexoyo/Monitoshi.git && cd Monitoshi)

2- copy config-sample.js to sample.js, and edit this file to change at least the mail options to send emails. Monitoshi uses Nodemailer to send emails, and you have to define nodemailer's config in the nodemailer object of your config file. (Monitoshi does nodemailer.createTransport(config.nodemailer). Check nodemailer docs or Using Gmail section (gmail is really a poor solution, I use SMTP).

Ask me any questions about this in the github issues of the project.

For production, see bellow the "Other way to change the config".

3- run this to install dependecies:

    $ npm install

4- Then start the server with this command (mongodb needs to be running)

    $ node app

Alternatively you can use the excellent pm2 process manager to start the server:

    $ pm2 start .pm2.json

Other way to change the config

The MT_CONFIG environment variable may contain a config json string, like the provided sample config-sample.js but without line breaks. Alternatively you can provide the path of a json file (also like config-sample.js) in the environment variable MT_CONFIG_FILE. Last method you can use for the config: if you use Heroku for hosting, see how to set environment variables on your VM, and this useful plugin to handle config.

Use NUM_RUNNERS env var or "num_runners": 100, in the config to set the number of monitors running simultanneously, each one checking 1 website at a time.

Example of config

{
    "interval": 10000,
    "timeout": 10000,
    "attempts": 3
}

Contributions and road map

Let's talk about it in this thread.

Notes for developers

Routes

You can use monitoshi as is, reaching the routes listed bellow with a web browser or use it as an API with &format=json at the end of the URLs in order to have JSON responses instead of HTML messages.

Here are the app routes

  • POST /monitor => add a monitor
  • GET /monitor/:id/enable => enable a monitor, has to be called after a new monitor is added
  • GET /monitor/:id/disable => disable a monitor, for tests
  • GET /monitor/:id/del => remove a monitor, for tests
  • GET /monitor/[MONITOSHI_ADMIN_PASS] => debug only (when the env var MONITOSHI_ADMIN_PASS is defined), displays all monitors

License

license: GPL v2

Roadmap

todo: move these ideas to #1

dev

  • cleanup index.js, create Router, use email aert...
  • check if exist before add
  • badge "http://...........com is UP"
  • remove unconfirmed monitors
  • on "/" display how many urls are tracked and the medium tracking interval
  • list all URLs monitored by a given email adress
  • Concurrent HTTP requests in node.js - doduck http://doduck.com/concurrent-requests-node-js/
  • monitoshi.org ?
  • embed on monitoshi's home page
  • embed in silex?

emails

  • better design
  • footer with links: to the badge, github issues, home page, list of monitored urls
  • call to contribution or ads for free software

more features


com

  • pub pour silex dans les mails (du même auteur que monitoshi), ou pour d'autres projets foss...
  • partage FB / Twitter /...? Pour supporter le projet ? Garantir ping 30 min ?

monitoshi's People

Contributors

jbips avatar lexoyo avatar singchan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

monitoshi's Issues

同学,您这个项目引入了437个开源组件,存在31个漏洞,辛苦升级一下

检测到 lexoyo/Monitoshi 一共引入了437个开源组件,存在31个漏洞

漏洞标题:requests 代码注入漏洞
缺陷组件:[email protected]
漏洞编号:CVE-2020-28502
漏洞描述:Dan DeFelippi node-XMLHttpRequest是  (Dan DeFelippi)开源的一个应用软件。用于模拟浏览器XMLHttpRequest对象。
node-XMLHttpRequest before 1.7.0 存在代码注入漏洞,攻击者可利用该漏洞导致任意代码注入并运行。
影响范围:(∞, 1.7.0)
最小修复版本:1.7.0
缺陷组件引入路径:[email protected]>[email protected]>[email protected]>[email protected]>[email protected]>[email protected]

另外还有31个漏洞,详细报告:https://mofeisec.com/jr?p=i5c51b

/del deletes the wrong monitor

when I click in the email to delete a monitor it deletes another one (I receive a "delete confirmation" email with the wrong URL)

Down alert every 3 hours

Hi,

I'm using Monitoshi to monitor a Node.JS server run with pm2.

Every 3h, (0h05, 3h05, 6h05, 9h05,...) Monitoshi sends me a mail that the service is down. It looked suspicious (due to the regularity) so I looked at the Keymetrics dashboard: no error and service up for a week.

So now I'm suspecting some false positive on Monitoshi. Any leads?

Typo in site's title 'Montior'

Hi,

It's not much but I hope it helps.

I was looking for uptime monitoring resources when I saw your project (by visiting the website monitoshi).
Seems really cool, did not test it yet, but I think I saw a (probable) typo in the site's title and content at this URL:
https://monitoshi.com/app/

Screenshot from 2023-01-17 20-30-13
Screenshot from 2023-01-17 20-29-39

If montior is a thing that I'm just not aware of, please forgive me and close this issue.

npm install fails

When I run npm install it fails.

Linux - Ubuntu 18.04
node version 10.2.1
npm version 5.6.0

../node_modules/nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::Callback::Call_(v8::Isolate*, v8::Local<v8::Object>, int, v8::Local<v8::Value>*) const’:
../node_modules/nan/nan.h:1477:5: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
     ));
     ^
In file included from ../lib/kerberos.h:4:0,
                 from ../lib/kerberos.cc:1:
/home/brian/.node-gyp/10.2.1/include/node/node.h:172:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/home/brian/.node-gyp/10.2.1/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
kerberos.target.mk:99: recipe for target 'Release/obj.target/kerberos/lib/kerberos.o' failed
make: *** [Release/obj.target/kerberos/lib/kerberos.o] Error 1
make: Leaving directory '/home/brian/Monitoshi/node_modules/kerberos/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 4.15.0-20-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/brian/Monitoshi/node_modules/kerberos
gyp ERR! node -v v10.2.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 

> [email protected] install /home/brian/Monitoshi/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory '/home/brian/Monitoshi/node_modules/ws/build'

Any help is appreciated.

to do next / ideas / roadmap

Contributions welcome :octocat:
..and let me know what seems important to you

optimize

  • when an URL never got up, remove it after a while - warn the user maybe

docs

  • check that Monitoshi can be plugged in Zapier to send emails or a tweet - it works fine
  • check that Monitoshi can be plugged in huginn to send emails or a tweet - it works fine and this is open source software 💘
  • write a guide on how to setup Monitoshi with Zapier to send emails or a tweet
  • write a guide on how to setup Monitoshi with huginn to send emails or a tweet

UI

  • A route to display the user's monitors, and maybe some stats (could be http://monitoshi.lexoyo.me/user/580df32bc68272aae01ee9). In each email, remind the user about his route. Then add links to enable/disable each monitor like in the debug page.

bagdes

  • Add a "up" or "down" badge -
  • Add a badge "up since"
  • Add a badge "99.9% uptime"
  • Add a badge with the loading time

alert types

  • Web hooks would be great to use in conjuction with Zapier or Huginn to take actions in case of an URL changing status (service up or down)
  • send emails with smtp, pop3, imap directly
  • bot to replace emails: slack, mattermost, facebook workplace... the bots should probably be able to create monitors

integrations

  • a great idea from this comment: "find another problem that monitoshi can solve and build an offer around that specific issue. Like allowing marketer to automatically pause their CPC campaigns on adwords or Facebook when their site is down."
  • try to hook to bip.io in order to take actions when a service goes down - and this is open source software
  • try to hook to Stashboard in order to make status pages with only free software
  • try to hook to mailchimp and use nice email templates like this
  • silex: during publication, if the user define his domain name, propose to monitor

monitor types

(other that the current ping)

  • full page load: use phantomjs or Slimerjs to compute page load time including assets, scripts, fonts...
  • ftp
  • dns
  • tcp
  • ssh
  • smtp, pop3, imap
  • mysql
  • other like cpu, memory, etc. which would need to include a Monitoshi library in the monitored app

Other

  • in the debug page, log the time between pings
  • docker container at docker hub
  • Did you consider using the timing of the ping and maybe setup an alert when a service is slower than a user-defined threshold? Or maybe send daily(/weekly/monthly) report with the average, min & max response time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.