nixpkgs/pkgs/servers/monitoring/prometheus/mongodb-exporter.nix
2024-10-20 07:40:40 +00:00

40 lines
998 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "mongodb_exporter";
version = "0.41.2";
src = fetchFromGitHub {
owner = "percona";
repo = "mongodb_exporter";
rev = "v${version}";
hash = "sha256-d2/N/NqtRglRN/3E7B5FOMpcQXP/taKFYodc6mhW7A4=";
};
vendorHash = "sha256-hy2w1Ix202gSJyp/EQ6uKJC8y16nw8Y78kDaP9LbU/4=";
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
"-X main.commit=${src.rev}"
"-X main.Branch=unknown"
"-X main.buildDate=unknown"
];
subPackages = [ "." ];
# those check depends on docker;
# nixpkgs doesn't have mongodb application available;
doCheck = false;
meta = with lib;
{
description = "Prometheus exporter for MongoDB including sharding, replication and storage engines";
homepage = "https://github.com/percona/mongodb_exporter";
license = licenses.asl20;
maintainers = with maintainers; [ undefined-moe ];
mainProgram = "mongodb_exporter";
};
}