0.0.1 • Published 7 years ago
dashli-website-status-collector v0.0.1
Website Status Collector for Dashli
Requests a url and returns the status and the response time.
Installation
yarn add dashli-website-status-collector
Usage
import websiteStatus from 'dashli-website-status-collector';
dashli.addCollector(
'google-status',
websiteStatus({ title: 'Google', url: 'https://www.google.com' }),
{ cron: '* * * * *' });
Configuration Options
Property | Optional | Default | Description |
---|---|---|---|
title | no | - | Title |
url | no | - | url to request |
method | yes | GET | http method to use |
headers | yes | - | http headers to use (format {a:'1'} or {b:'1','2','3'}) |
method | yes | GET | http method to use |
timeout | yes | 1000 | timout in milliseconds |
test | yes | - | string to search on the response body |
historySize | yes | 30 | number of values to store in the history |
License
This project is licensed under the MIT License - see the LICENSE file for details
0.0.1
7 years ago