{"id":18103197,"url":"https://github.com/averagemarcus/tailscale-exporter","last_synced_at":"2025-04-13T19:09:47.638Z","repository":{"id":184723317,"uuid":"672368913","full_name":"AverageMarcus/tailscale-exporter","owner":"AverageMarcus","description":"Exports Prometheus metrics for Tailscale devices and keys.","archived":false,"fork":false,"pushed_at":"2023-10-02T09:26:54.000Z","size":13,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T09:46:24.729Z","etag":null,"topics":["metrics","prometheus","prometheus-exporter","tailscale"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AverageMarcus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-29T20:52:31.000Z","updated_at":"2023-11-24T09:01:45.000Z","dependencies_parsed_at":"2024-10-31T22:11:05.520Z","dependency_job_id":"d16cf4ad-a8d3-4ec1-9d52-49daec3ec67e","html_url":"https://github.com/AverageMarcus/tailscale-exporter","commit_stats":null,"previous_names":["averagemarcus/tailscale-exporter"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AverageMarcus%2Ftailscale-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AverageMarcus%2Ftailscale-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AverageMarcus%2Ftailscale-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AverageMarcus%2Ftailscale-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AverageMarcus","download_url":"https://codeload.github.com/AverageMarcus/tailscale-exporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248766736,"owners_count":21158301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["metrics","prometheus","prometheus-exporter","tailscale"],"created_at":"2024-10-31T22:10:54.981Z","updated_at":"2025-04-13T19:09:47.612Z","avatar_url":"https://github.com/AverageMarcus.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tailscale-exporter\n\nExports Prometheus metrics for Tailscale devices and keys.\n\n## Metrics\n\n* `tailscale_devices_expiry_seconds_remaining` - The number of seconds remaining until the device authentication expires\n* `tailscale_devices_expiry_time` - The timestamp (as Unix timestamp) that the device expires\n* `tailscale_devices_update_available` - Whether the device can be updated to a newer version of Tailscale or not\n* `tailscale_keys_expiry_seconds_remaining` - The number of seconds remaining until the key expires\n* `tailscale_keys_expiry_time` - The timestamp (as Unix timestamp) that the key expires\n\n## Configuration\n\nThe following environment variable can be used to configure the exporter:\n\n* `TAILSCALE_API_KEY` - A valid Tailscale API key [Required]\n* `TAILSCALE_TAILNET` - The Tailnet to export metrics for [Required]\n* `PORT` - The port to run the exporter on (Defaults to `8080`)\n\n## Running with Docker\n\n```shell\nexport TAILSCALE_API_KEY=\"my-tailscale-api-key\"\nexport TAILSCALE_TAILNET=\"my-tailnet.github\"\ndocker run --rm -it -p 8080:8080 -e TAILSCALE_API_KEY -e TAILSCALE_TAILNET ghcr.io/averagemarcus/tailscale-exporter:latest\n```\n\nThen visit: [http://localhost:8080/metrics](http://localhost:8080/metrics)\n\n## Deploying to Kubernetes\n\n```yaml\napiVersion: v1\nkind: Secret\nmetadata:\n  name: tailscale-exporter\n  labels:\n    app.kubernetes.io/name: tailscale-exporter\nstringData:\n  TAILSCALE_API_KEY: xxxx\n  TAILSCALE_TAILNET: xxxx\n---\napiVersion: v1\nkind: Service\nmetadata:\n  name: tailscale-exporter\n  labels:\n    app.kubernetes.io/name: tailscale-exporter\n  annotations:\n    prometheus.io/scrape: \"true\"\n    prometheus.io/port: \"8080\"\nspec:\n  type: ClusterIP\n  ports:\n  - port: 8080\n    targetPort: 8080\n  selector:\n    app: tailscale-exporter\n---\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: tailscale-exporter\n  labels:\n    app.kubernetes.io/name: tailscale-exporter\nspec:\n  replicas: 1\n  selector:\n    matchLabels:\n      app.kubernetes.io/name: tailscale-exporter\n  template:\n    metadata:\n      labels:\n        app.kubernetes.io/name: tailscale-exporter\n    spec:\n      containers:\n      - name: tailscale-exporter\n        image: ghcr.io/averagemarcus/tailscale-exporter:latest\n        imagePullPolicy: Always\n        ports:\n        - containerPort: 8080\n          name: metrics\n        envFrom:\n        - secretRef:\n            name: tailscale-exporter\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faveragemarcus%2Ftailscale-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faveragemarcus%2Ftailscale-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faveragemarcus%2Ftailscale-exporter/lists"}