Skip to content
A Prometheus exporter for the Fastly Real-time Analytics API
Go Dockerfile Shell
Branch: master
Clone or download
Pull request Compare This branch is 8 commits behind peterbourgon:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
compose
vendor
.build.yml
.gitignore
Dockerfile
LICENSE
README.md
docker-compose.yml
go.mod
go.sum
help_test.go
main.go
monitor.go
monitor_manager.go
monitor_manager_test.go
monitor_test.go
process.go
prometheus_metrics.go
release.fish
service_cache.go
service_queryer.go
service_queryer_test.go

README.md

fastly-exporter Latest Release builds.sr.ht status Docker Status

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.

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; 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

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

You can’t perform that action at this time.