This program consumes from the Fastly Real-time Analytics API and makes the data available to Prometheus. It can provide metrics for every service accessible to your API token, or an explicitly-specified set of services. And it reflects when new services are created, old services are deleted, or existing services have their names or versions updated.
Avaliable as mrnetops/fastly-exporter from Docker Hub.
docker pull mrnetops/fastly-exporter
Go to the releases page.
If you have a working Go installation, you can install the latest revision from HEAD.
go get github.com/peterbourgon/fastly-exporter
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; also via FASTLY_API_TOKEN)
-version false print version information and exit
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 run -p 8080:8080 mrnetops/fastly-exporter -token $FASTLY_API_TOKEN
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.