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
uptimerobot_ssl_expire gauge (unix timestamp), if applicable
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.3.0 (2023-04-04)
Changes
Drop Python-2 support (py2)
Switch from setup.py to pyproject.toml (wheel)
1.2.0 (2021-10-22)
Update to current prometheus_client API
1.1.0 (2018-09-17)
Add ssl expiration metrics
1.0.1 (2018-04-02)
Support pagination of API results.
1.0.0 (2018-04-01)
First release.
Release files for ws.prometheus_uptimerobot 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ws.prometheus_uptimerobot-1.3.0.tar.gz | 5.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ws.prometheus_uptimerobot-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.9 kB
Release files / ws.prometheus_uptimerobot-1.3.0.tar.gz
| Download URL | ws.prometheus_uptimerobot-1.3.0.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e8daddbd524e26839091c53d22fdd7497ea77e99d3a3c434f1a3992302a95843
|
|
BLAKE2b-256 checksum How to use checksums |
1dd048fdc4553262af7d52cdb51bc57d85012ff494e4f23e6c6ca6c1064d3a44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.23.3
|
Release files / ws.prometheus_uptimerobot-1.3.0-py3-none-any.whl
| Download URL | ws.prometheus_uptimerobot-1.3.0-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bb0ba1f9affabf2842cd509c6e07c9631a3d4041470c7181c43006bafdc192af
|
|
BLAKE2b-256 checksum How to use checksums |
a9944f66ee9a74189c65f392eaba3a2b468af6468f57b00f8268c2abda1142bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.23.3
|