prometheus-tailscale-exporter: init at 0.2.5

Introduce a new package for monitoring a Tailscale
Tailnet with Prometheus.

Signed-off-by: squat <lserven@gmail.com>
This commit is contained in:
squat
2025-10-18 11:52:11 +02:00
parent 44af11f6cc
commit 5a4698d5c7
@@ -0,0 +1,53 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nixosTests,
versionCheckHook,
}:
buildGoModule rec {
pname = "tailscale-exporter";
version = "0.2.5";
src = fetchFromGitHub {
owner = "adinhodovic";
repo = "tailscale-exporter";
tag = version;
hash = "sha256-6iQtGfQsXVmwFaSA7B1AG+kbtSyKVWFbEld1lMb0DnE=";
};
vendorHash = "sha256-Nbx6LyGGhdgI4oEtbyqhJ2H1lY6BfSL/ROH/Dh4UOk0=";
subPackages = [
"cmd/tailscale-exporter"
"collector"
];
env.CGO_ENABLED = 0;
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "version";
passthru.tests = {
inherit (nixosTests.prometheus-exporters) tailscale;
};
meta = {
description = "Tailscale Tailnet metric exporter for Prometheus";
homepage = "https://github.com/adinhodovic/tailscale-exporter";
changelog = "https://github.com/adinhodovic/tailscale-exporter/releases/tag/${src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
squat
];
mainProgram = "tailscale-exporter";
};
}