2023-05-28 14:15:23 +00:00
|
|
|
{ lib
|
2024-09-13 07:04:44 +00:00
|
|
|
, buildGo123Module
|
2023-05-28 14:15:23 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, nixosTests
|
2024-05-21 20:17:56 +00:00
|
|
|
, stdenv
|
2023-05-28 14:15:23 +00:00
|
|
|
, testers
|
|
|
|
, telegraf
|
|
|
|
}:
|
2016-09-08 13:30:20 +00:00
|
|
|
|
2024-09-13 07:04:44 +00:00
|
|
|
buildGo123Module rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "telegraf";
|
2024-11-19 00:39:06 +00:00
|
|
|
version = "1.32.3";
|
2016-09-08 13:30:20 +00:00
|
|
|
|
2019-01-21 11:28:32 +00:00
|
|
|
subPackages = [ "cmd/telegraf" ];
|
|
|
|
|
2016-09-08 13:30:20 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "influxdata";
|
|
|
|
repo = "telegraf";
|
2020-03-27 07:18:52 +00:00
|
|
|
rev = "v${version}";
|
2024-11-19 00:39:06 +00:00
|
|
|
hash = "sha256-H/thJ88cfl75rRByLYIjpPx6lfBSSryhYii8jBl/PBA=";
|
2016-09-08 13:30:20 +00:00
|
|
|
};
|
|
|
|
|
2024-11-19 00:39:06 +00:00
|
|
|
vendorHash = "sha256-3Wcbl4DM4SHvctVvQTsqQNRkB3z+273kvM/KwypmB70=";
|
2021-07-25 09:33:21 +00:00
|
|
|
proxyVendor = true;
|
2020-08-04 00:26:27 +00:00
|
|
|
|
2021-08-21 08:23:48 +00:00
|
|
|
ldflags = [
|
2023-05-28 14:14:26 +00:00
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X=github.com/influxdata/telegraf/internal.Commit=${src.rev}"
|
|
|
|
"-X=github.com/influxdata/telegraf/internal.Version=${version}"
|
2021-08-21 08:23:48 +00:00
|
|
|
];
|
2017-10-01 09:19:39 +00:00
|
|
|
|
2023-05-28 14:15:23 +00:00
|
|
|
passthru.tests = {
|
|
|
|
version = testers.testVersion {
|
|
|
|
package = telegraf;
|
|
|
|
};
|
2024-05-21 20:17:56 +00:00
|
|
|
} // lib.optionalAttrs stdenv.hostPlatform.isLinux {
|
|
|
|
inherit (nixosTests) telegraf;
|
2023-05-28 14:15:23 +00:00
|
|
|
};
|
2020-01-28 14:08:38 +00:00
|
|
|
|
2016-09-08 13:30:20 +00:00
|
|
|
meta = with lib; {
|
2020-10-11 05:55:05 +00:00
|
|
|
description = "Plugin-driven server agent for collecting & reporting metrics";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "telegraf";
|
2020-03-27 07:18:52 +00:00
|
|
|
homepage = "https://www.influxdata.com/time-series-platform/telegraf/";
|
2023-05-28 14:15:23 +00:00
|
|
|
changelog = "https://github.com/influxdata/telegraf/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
2023-06-07 01:29:25 +00:00
|
|
|
maintainers = with maintainers; [ mic92 roblabla timstott zowoq ];
|
2016-09-08 13:30:20 +00:00
|
|
|
};
|
2020-07-31 03:58:04 +00:00
|
|
|
}
|