tailscale-exporter

A Prometheus exporter that collects metrics from both Tailscale and Headscale tailnets.

What is tailscale-exporter?

A Prometheus exporter that collects metrics from both Tailscale and Headscale tailnets.

Overview of tailscale-exporter

What it is

tailscale-exporter is a Prometheus exporter that collects metrics from both Tailscale and Headscale tailnets. It uses the Tailscale API and the Headscale gRPC API to gather tailnet-level data. The repository also includes the tailscale-mixin, which provides Prometheus alerts, rules, and Grafana dashboards for tailnet-level and client-side machine metrics. The dashboards are located in ./tailscale-mixin/dashboards_out/ and cover both Tailscale and Headscale environments. The exporter supports metrics from Tailscale (official cloud) and Headscale (self-hosted). For Tailscale, it collects device metrics, API key management, DNS configuration, user management, service inventory, tailnet settings, and API health. For Headscale, it collects node metrics, user and API key metrics, preauth keys metrics, and health status. The exporter can be run as a binary, a Docker container, or deployed via Helm. It listens on port 9250 by default and exposes metrics at the /metrics path. The project is licensed under Apache-2.0 and is open source.

Key features

  • Collects tailnet-level metrics from Tailscale via the Tailscale API - Collects tailnet-level metrics from Headscale via the Headscale gRPC API - Provides a tailscale-mixin with Prometheus alerts, rules, and Grafana dashboards for both tailnet and client-side machine metrics - Supports client-side machine metrics from Tailscale clients (v1.102+) via their /metrics endpoint - Can be deployed as a binary, Docker container, or Helm chart - Supports both Tailscale and Headscale in the same exporter instance

Use cases

  • Monitoring the health and usage of a Tailscale tailnet, including devices, users, DNS, and services - Monitoring a Headscale tailnet, including nodes, users, API keys, and preauth keys - Setting up Prometheus alerts and Grafana dashboards for tailnet-level metrics - Collecting client-side machine metrics from individual Tailscale devices for per-device insights - Integrating with existing Prometheus and Grafana monitoring stacks

Getting started

See the repository README for detailed installation instructions. Below are quick-start commands for the binary and Docker. Binary (Tailscale): bash curl -L https://github.com/adinhodovic/tailscale-exporter/releases/latest/download/tailscale-exporter-linux-amd64 -o tailscale-exporter chmod +x tailscale-exporter export TAILSCALE_OAUTH_CLIENT_ID='your-client-id' export TAILSCALE_OAUTH_CLIENT_SECRET='your-client-secret' export TAILSCALE_TAILNET='example.com' ./tailscale-exporter Docker (Tailscale): bash docker run -d --name tailscale-exporter -p 9250:9250 -e TAILSCALE_OAUTH_CLIENT_ID='your-client-id' -e TAILSCALE_OAUTH_CLIENT_SECRET='your-client-secret' -e TAILSCALE_TAILNET='your-tailnet-name' adinhodovic/tailscale-exporter:latest

License and pricing

The project is licensed under Apache-2.0. It is open source with no stated pricing.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/adinhodovictailscale-exporter.svg)](https://yunodb.com/tools/adinhodovictailscale-exporter?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/adinhodovictailscale-exporter?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/adinhodovictailscale-exporter.svg" alt="Featured on YunoDB" height="20"></a>