Export uptimerobot.com monitor results as prometheus.io metrics
Project description
This packages exports Uptime Robot monitor results as Prometheus metrics.
Usage
Configure API key
You’ll need to provide the API key of your uptimerobot.com account using a configuration file:
[default] api_key = 123456789
See the Uptime Robot API documentation for details.
Set up HTTP service
Then you need to set up an HTTP server, either with a dedicated process:
$ uptimerobot_exporter --host localhost --port 9429 --config /path/to/config
or as a CGI script, if you have infrastructure for that set up anyway. Here’s an example apache configuration snippet to do this:
ScriptAlias /metrics/uptimerobot /path/to/uptimerobot_exporter_cgi <Location /metrics/uptimerobot> SetEnv PROMETHEUS_UPTIMEROBOT_CONFIG /path/to/config # SetEnv PROMETHEUS_UPTIMEROBOT_LOGFILE /path/to/log # optional, for debugging </Location>
Configure Prometheus
scrape_configs: - job_name: 'uptimerobot' scrape_interval: 300s static_configs: - targets: ['localhost:9429']
The following metrics are exported, each with labels {monitor_name="example.com",monitor_type="http",monitor_url="https://example.com"}:
uptimerobot_up gauge (1=up, 0=down)
uptimerobot_status gauge
uptimerobot_responsetime gauge
See the Uptime Robot API documentation section “Parameters” for details on the possible status values. The monitor_type is translated from its numeric code to one of http, http keyword, ping, or port.
Additionally, a uptimerobot_scrape_duration_seconds gauge is exported.
CHANGES
1.0.0 (2018-04-01)
First release.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for ws.prometheus_uptimerobot-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 922867cb1a52ca2604f459eb543c64da1218563333a662db841a6928ec97eddd |
|
MD5 | 3407cdd6d336226ae76b10acbd0a3b02 |
|
BLAKE2b-256 | 184ec83be501bdba96ca34f5b0673637c9c9c18b303f62104d8603fa75306b5b |