2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, nixosTests
|
2024-06-05 15:53:02 +00:00
|
|
|
, stdenv
|
2023-07-15 17:15:38 +00:00
|
|
|
, testers
|
|
|
|
, telegraf
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "telegraf";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.30.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
subPackages = [ "cmd/telegraf" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "influxdata";
|
|
|
|
repo = "telegraf";
|
|
|
|
rev = "v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-B3Eeh3eOYg58NnMpV6f04HFzOtOn/enBqzCJRst6u2U=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
vendorHash = "sha256-Cudnc5ZyCQUqgao58ww69gfF6tPW6/oGP9zXbuPSTAE=";
|
2021-08-06 21:57:35 +00:00
|
|
|
proxyVendor = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
ldflags = [
|
2023-07-15 17:15:38 +00:00
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X=github.com/influxdata/telegraf/internal.Commit=${src.rev}"
|
|
|
|
"-X=github.com/influxdata/telegraf/internal.Version=${version}"
|
2021-08-22 07:53:02 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
passthru.tests = {
|
|
|
|
version = testers.testVersion {
|
|
|
|
package = telegraf;
|
|
|
|
};
|
2024-06-05 15:53:02 +00:00
|
|
|
} // lib.optionalAttrs stdenv.isLinux {
|
|
|
|
inherit (nixosTests) telegraf;
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-10-19 00:13:06 +00:00
|
|
|
description = "The plugin-driven server agent for collecting & reporting metrics";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "telegraf";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.influxdata.com/time-series-platform/telegraf/";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/influxdata/telegraf/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ mic92 roblabla timstott zowoq ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
}
|