You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the below example, the request object gets passed directly to Axios
If you don't specify an HTTP Method in the request, it will default to GET
If you don't specify an interval it will default to 60 seconds
constuptime=require('@jwdotjs/uptime');uptime({monitoring: [{request: {url: '',method?: 'GET'|'POST'|'PUT'|'DELETE',headers?: {},data?: {},},interval?: 60000,},],maxAttempts: 2,// how many total times a request should fail consecutively before we log an error}).init();
Example Usage
constuptime=require("@jwdotjs/uptime");uptime({monitoring: [{request: {url: "http://www.google.com"}},{request: {url: "http://www.yahoo.com"}},{request: {url: "http://www.sitewithanoutage.com"}}],maxAttempts: 2// how many total times a request should fail consecutively before we log an error}).init();
About
Uptime monitoring using Distraught that reports to Sentry when HTTP requests fail