Giter Club home page Giter Club logo

pingdom-exporter's Introduction

Pingdom Metrics Exporter for Prometheus

Prometheus exporter for uptime metrics exposed by the Pingdom API.

Running

Make sure you expose the Pingdom API Token via the PINGDOM_API_TOKEN environment variable:

# Expose the Pingdom API Token
export PINGDOM_API_TOKEN=<api-token>

# Run the binary with the default options
bin/pingdom-exporter

Usage

bin/pingdom-exporter -h

Usage 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)
  -port int
    	port to listen on (default 9158)
  -tags string
    	tag list separated by commas

Supported Pingdom Tags

uptime_slo_xxx

This will instruct pingdom-exporter to use a custom SLO for the given check instead of the default one of 99%. Some tag examples and their corresponding SLOs:

  • uptime_slo_99 - 99%, same as default
  • uptime_slo_995 - 99.5%
  • uptime_slo_999 - 99.9%
pingdom_exporter_ignored

Checks with this tag won't have their metrics exported. Use this when you don't want to disable some check just to have it excluded from the pingdom-exporter metrics.

You can also set the -tags flag to only return metrics for checks that contain the given tags.

Docker Image

We no longer provide a public Docker image. See the Development section on how to build your own image and push it to your private registry.

Exported Metrics

Metric Name Description
pingdom_up Was the last query on Pingdom API successful
pingdom_uptime_status The current status of the check (1: up, 0: down)
pingdom_uptime_response_time_seconds The response time of last test, in seconds
pingdom_slo_period_seconds Outage check period, in seconds (see -outage-check-period flag)
pingdom_outages_total Number of outages within the outage check period
pingdom_down_seconds Total down time within the outage check period, in seconds
pingdom_up_seconds Total up time within the outage check period, in seconds
pingdom_uptime_slo_error_budget_total_seconds Maximum number of allowed downtime, in seconds, according to the uptime SLO
pingdom_uptime_slo_error_budget_available_seconds Number of seconds of downtime we can still have without breaking the uptime SLO

Development

All relevant commands are exposed via Makefile targets:

# Build the binary
make

# Run the tests
make test

# Check linting rules
make lint

# Build Docker image
make image

# Push Docker images to registry
make publish

pingdom-exporter's People

Contributors

danielfm avatar damoun avatar josephsalisbury avatar rockyluke avatar cryptobioz avatar marians avatar nlamirault avatar sbower avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.