- Notifications
You must be signed in to change notification settings - Fork1
An exporter for Prometheus that collects metrics from Pingdom.
License
kokuwaio/pingdom-exporter
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Prometheus exporter for uptime metrics exposed by the Pingdom API.
This is a fork ofhttps://github.com/camptocamp/prometheus-pingdom-exporter which seems to be unmaintained.We will mostly only do dependency or maintenance updates here.
A Helm chart for this exporter can be found at:https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-pingdom-exporter
Make sure you expose the Pingdom API Token via thePINGDOM_API_TOKEN
environment variable:
# Expose the Pingdom API Tokenexport PINGDOM_API_TOKEN=<api-token># Run the binary with the default optionsbin/pingdom-exporter
bin/pingdom-exporter -hUsage of bin/pingdom-exporter: -default-uptime-slo float default uptime SLO to be used when the check doesn't provide a uptime SLO tag (i.e. uptime_slo_999 to 99.9% uptime SLO) (default 99) -metrics-path string path under which to expose metrics (default "/metrics") -outage-check-period int time (in days) in which to retrieve outage data from the Pingdom API (default 7) -parser-tags Enable tag formatting based on a regular expression -port int port to listen on (default 9158) -tag-extra-labels string Extra labels to be added to the tags -tag-format string Regular expression used to format tags. (default "^([a-zA-Z0-9_]+):(.+)$") -tags string tag list separated by commas
This will instruct pingdom-exporter to use a custom SLO for the given checkinstead of the default one of 99%. Some tag examples and their correspondingSLOs:
uptime_slo_99
- 99%, same as defaultuptime_slo_995
- 99.5%uptime_slo_999
- 99.9%
Checks with this tag won't have their metrics exported. Use this when you don'twant to disable some check just to have it excluded from the pingdom-exportermetrics.
You can also set the-tags
flag to only return metrics for checks that containthe given tags.
When the-parser-tags
flag is enabled, thepingdom_tags
metric will no longer be generated in favor of thepingdom_tags_label
metric.
With this flag, the tag will be formatted based on the regular expression specified in the-tag-format
flag.
If the tag is formatted correctly, the metric returns the value1
; if not, it returns the value0
.
Additionally, the-tag-extra-labels
flag allows extracting extra labels from tags.The labels must be specified as a comma-separated list, and each extracted label is converted to snake_case and prefixed withlabel_
.
For example, using:
-tag-extra-labels="region,team"
A Pingdom tag likeregion:us-east
would result in the following metric:
pingdom_tags_label{id="123", label_region="us-east"}
Docker image tags are published toGHCR as changes are incorporated into the main branch.
Metric Name | Description |
---|---|
pingdom_down_seconds | Total down time within the outage check period, in seconds |
pingdom_outages_total | Number of outages within the outage check period |
pingdom_slo_period_seconds | Outage check period, in seconds (see-outage-check-period flag) |
pingdom_tags_label | Formats a tag based on a regular expression (-parser-tags and-tag-format ) (1: formatted, 0: unformatted) |
pingdom_tags | The current tags of the check |
pingdom_up_seconds | Total up time within the outage check period, in seconds |
pingdom_up | Was the last query on Pingdom API successful |
pingdom_uptime_response_time_seconds | The response time of last test, in seconds |
pingdom_uptime_slo_error_budget_available_seconds | Number of seconds of downtime we can still have without breaking the uptime SLO |
pingdom_uptime_slo_error_budget_total_seconds | Maximum number of allowed downtime, in seconds, according to the uptime SLO |
pingdom_uptime_status | The current status of the check (1: up, 0: down) |
All relevant commands are exposed via Makefile targets:
# Build the binarymake# Run the testsmaketest# Check linting rulesmake lint# Build Docker imagemake image# Push Docker images to registrymake publish
About
An exporter for Prometheus that collects metrics from Pingdom.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.