/fastly-exporter

A Prometheus exporter for the Fastly Real-time Analytics API

Primary LanguageGoApache License 2.0Apache-2.0

fastly-exporter Latest Release Travis CI Docker Status

This program consumes from the Fastly Real-time Analytics API and makes the data available to Prometheus.

  • Provides metrics for every service accessible to your API token.
  • Adapts to Fastly service creation and deletion.
  • Maintains labels dynamically (service_name).

Getting

Docker

Avaliable as mrnetops/fastly-exporter from Docker Hub.

docker pull mrnetops/fastly-exporter

Binary

Go to the releases page.

Source

if you have a working Go installation, you can install the latest revision from HEAD.

go get github.com/peterbourgon/fastly-exporter

Using

USAGE
  fastly-exporter [flags]

FLAGS
  -debug false                             Log debug information
  -endpoint http://127.0.0.1:8080/metrics  Prometheus /metrics endpoint
  -namespace fastly                        Prometheus namespace
  -service ...                             Specific Fastly service ID (optional, repeatable)
  -subsystem rt                            Prometheus subsystem
  -token ...                               Fastly API token (required)

VERSION
  2.1.0

A valid Fastly API token is mandatory. See this link for information on creating API tokens. The token can also be provided via the -token flag or the FASTLY_API_TOKEN environment variable.

Optional -service IDs can be specified to limit monitoring to specific services. Service IDs are available at the top of your Fastly dashboard.

Docker

docker run -p 8080:8080 mrnetops/fastly-exporter -token $FASTLY_API_TOKEN

Docker Compose

Docker Compose for a full fastly-exporter + Prometheus + Grafana + Fastly dashboard stack

FASTLY_API_TOKEN=${FASTLY_API_TOKEN} docker-compose up

Access the Grafana dashboard via http://localhost:3000.

Fastly Dashboard in Grafana