Another one JS lib, to know if a service is down. I want to make services status information open data. With a whole bunch of metrics like the number of reports, average report, in which region ...
More than 230 services is available in 2 coontry (FR & US).
This api is based on the website Is The Service Down ?, is a bug reporting website, considered the data unreliable at 100% And please not abused to spam ping request the website.
Before lanching, you need to install some package :
npm install axios
npm install cheerio
Place the unzipped folder "ServiceDown-js-apî" at your project root Call this lib in your js file like that :
const ServiceDown_api = require('./ServiceDown-js-api/lib/ServiceDown_api.js');
const API = new ServiceDown_api();
and enjoy !
Use the function getServiceStatus()
in a asynchronous callback, with the service name to get the service status and the country (by default is .com pinged).
(async () => {
serviceStatus = await API.getServiceStatus("facebook", "fr");
}) ()
You received a JSON response :
{
service_name : "Facebook",
service_status : "warning",
status_cause : "login and website",
status_report_stats: {
0 : { name : "Internet", purcent : "30" },
1 : { name : "Wi-Fi", purcent : "25" },
...
},
country : "fr",
latest_reports_cities : [
{
"city": Tours,
"country": "fr",
"reason_tag": "Televsion",
"last_time": "2022-03-19T10:08:55-04:00"
},
{
"city": Poitiers,
"country": "fr",
"reason_tag": "Wi-Fi",
"last_time": "2022-03-19T15:23:01-04:00"
},
...
]
src : "https://istheservicedown.fr/statut/facebook",
datetime : 2022-01-03T10H00:00.000Z
}
- Send a request to get a service statut
- Define status (Down, Ok, Warning, None)
- Response return the service name that we have just ask
- Response return the cause of the status of the service we have just ask
- Metrics: report stats info
- Get cities of latest report and reason tag
- Get report numbers (max, min, average, now)
- Get down area (city and number of report)
- Add multi-country service down ?
- Sort services by category (stream, bank, hoster...)
- 1.6.0 : "Latest reports cities" Add new property : 'latest_report_cities' for getting the cities of latest reports more information
- v1.5.1 : "i18n-US" Add servicelist from US
- v1.5.0 : "i18n" Change config file and add report stats info in the response (most repporting troubles) more information
- v1.2.0 : Add statut cause to the responde object more imformation
- v1.1.0 : Add service name to the response object and get the statut of a service by his canonic name more imformation
- v1.0.0 : First one release ! You can now get the status of an service more imformation
If you like this project and if you want, make a donnation