How to Monitor Uptime of 20 Websites (Ping or HTTP) in Node.js/RoR

后端 未结 6 1646
一向
一向 2021-02-02 02:51

What\'s the best way to ping a list of 20 websites every 5 minutes (for example) in order to know if the site responds with HTTP 202 or not?

The no brainer idea is to sa

6条回答
  •  执念已碎
    2021-02-02 03:42

    There is no "basic way", since you must handle a lot of use cases:

    • http redirects,
    • https pages,
    • request timeouts,
    • the cpu load of the server you use for pinging,
    • the type of report you need (availability? Uptime? Responsiveness? Downtime?)
    • how to aggregate qos measurements by time
    • lifetime of the data you collect (pinging dozens of targets every five minutes quickly produces a lot of data)
    • realtime alerts
    • etc.

    Pingdom and the like are not "basic" tools, and if you want something similar you may want to pay for it or rely on an existing open-source alternative. I know it for sure because I built a remote monitoring application myself. It's called Uptime, it's written in Node.js and MongoDB, and it's hosted on GitHub (https://github.com/fzaninotto/uptime). It took several weeks of hard work to develop it, so believe me: it is NOT a no-brainer.

提交回复
热议问题