Name: cachet-uptime-robot
Owner: Open Knowledge International
Description: Get data from UptimeRobot and send it to Cachet
Forked from: Axiacore/cachet-uptime-robot
Created: 2017-08-29 16:45:15.0
Updated: 2018-02-23 18:59:10.0
Pushed: 2017-09-05 14:36:08.0
Size: 34
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Cachet is an open source status page system, this repository is a Python script that does two things, first, it reads the status of a page in UptimeRobot and updates a cachet component based on that status and second, it updates a metric with the historic uptime ratio from Uptime Robot.
Component status: Uptime Robot (left), Cachet (right)
To get started, you have to specify your Cachet and UptimeRobot settings and in config.ini.
imeRobot]
meRobotMainApiKey = your-api-key
ps://url.in.uptime.robot.com]
etApiKey = cachet-api-key
etUrl = https://status.mycompany.com
icId = 1
onentId = 1
CachetApiKey
: Cachet API key.https://url.in.uptime.robot.com
: This exact “monitor” url set in UptimeRobot (eg. http://mywebsite.com)CachetUrl
: URL of the API of the status page you want to show the site availability in.MetricId
: Id of the Cachet metric with site availability.ComponentId
: (Optional) Id of the component you want to update on each check.Register a cron that runs update_status.py
every 5 minutes.
en cron file to edit.
tab -e
Edit the crontab file and add this line:
* * * * python3 ~/path/update_status.py ~/path/config.ini
Note that the path of the update_status.py & config.ini files may vary depending on the location you cloned the repository
You can also update your Cachet data manually by running this:
on3 update_status.py config.ini
Updating monitor MySite. URL: http://mysite.co. ID: 12345678
Metric created: {'data': {'calculated_value': 99.99, 'counter': 1, 'metric_id': 4, 'value': 99.99, 'created_at': '2016-08-12 08:23:10', 'updated_at': '2016-08-12 08:23:10', 'id': 99}}