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

后端 未结 6 1756
一向
一向 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:33

    use monitoring tools like zabbix, nagios, blah blah which can metric various parameters of your servers in mass numbers.

    if u would like to implement it in js, u can do a time interval-ed http request, then to determine http return status code, and use xpath or regex to validate certain element is correct

    for ruby, a daemon process and use a thread pool (multithreading idea) and URI open to view the http code and the content, use xpath to validate if the content is behave correctly.

提交回复
热议问题