Skip to content

A Prometheus exporter for the Fastly Real-time Analytics API

License

Notifications You must be signed in to change notification settings

neufeldtech/fastly-exporter

 
 

Repository files navigation

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

About

A Prometheus exporter for the Fastly Real-time Analytics API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 97.9%
  • Dockerfile 1.3%
  • Shell 0.8%