diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/monitoring')
6 files changed, 62 insertions, 33 deletions
diff --git a/nixpkgs/pkgs/servers/monitoring/grafana-agent/default.nix b/nixpkgs/pkgs/servers/monitoring/grafana-agent/default.nix index faa42933facd..620d3aebc4a1 100644 --- a/nixpkgs/pkgs/servers/monitoring/grafana-agent/default.nix +++ b/nixpkgs/pkgs/servers/monitoring/grafana-agent/default.nix @@ -1,27 +1,36 @@ { lib , buildGoModule , fetchFromGitHub +, fetchYarnDeps +, fixup_yarn_lock , grafana-agent , nixosTests +, nodejs , stdenv , systemd , testers +, yarn }: buildGoModule rec { pname = "grafana-agent"; - version = "0.35.4"; + version = "0.36.0"; src = fetchFromGitHub { owner = "grafana"; repo = "agent"; rev = "v${version}"; - hash = "sha256-3pUKqmqnRm3/e/fhAV5cq16wcK/f7KWb3aoFbPXCC3o="; + hash = "sha256-YUEla8VvLi0H0Utu0vQNqSbZH8C9BeF8BGWRb2R61P8="; }; - vendorHash = "sha256-vzrp20Mg6AA0h3+5+qbKRa7nhx/hgiIHG6RNXLATpHE="; + vendorHash = "sha256-Si7qZYq23XlWFPp+C5qIJw7n0Zk/Rx+yo643m+gSRcg="; proxyVendor = true; # darwin/linux hash mismatch + frontendYarnOfflineCache = fetchYarnDeps { + yarnLock = src + "/web/ui/yarn.lock"; + hash = "sha256-sUFxuliLupGEJY1xFA2V4W2gwHxtUgst3Vrywh1owAo="; + }; + ldflags = let prefix = "github.com/grafana/agent/pkg/build"; in [ @@ -34,7 +43,10 @@ buildGoModule rec { "-X ${prefix}.BuildDate=1980-01-01T00:00:00Z" ]; + nativeBuildInputs = [ fixup_yarn_lock nodejs yarn ]; + tags = [ + "builtinassets" "nonetwork" "nodocker" "promtail_journal_enabled" @@ -43,8 +55,27 @@ buildGoModule rec { subPackages = [ "cmd/grafana-agent" "cmd/grafana-agentctl" + "web/ui" ]; + preBuild = '' + export HOME="$TMPDIR" + + pushd web/ui + fixup_yarn_lock yarn.lock + yarn config --offline set yarn-offline-mirror $frontendYarnOfflineCache + yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive + patchShebangs node_modules + yarn --offline run build + popd + ''; + + # do not pass preBuild to go-modules.drv, as it would otherwise fail to build. + # but even if it would work, it simply isn't needed in that scope. + overrideModAttrs = (_: { + preBuild = null; + }); + # uses go-systemd, which uses libsystemd headers # https://github.com/coreos/go-systemd/issues/351 env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isLinux [ "-I${lib.getDev systemd}/include" ]); diff --git a/nixpkgs/pkgs/servers/monitoring/grafana/default.nix b/nixpkgs/pkgs/servers/monitoring/grafana/default.nix index 9fa03091c866..980e95f57fb3 100644 --- a/nixpkgs/pkgs/servers/monitoring/grafana/default.nix +++ b/nixpkgs/pkgs/servers/monitoring/grafana/default.nix @@ -15,7 +15,7 @@ buildGoModule rec { srcStatic = fetchurl { url = "https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz"; - hash = "sha256-lgCSJgFcrZb4ki4/YdVRgXvVBjQrmEoTPf/KficA3sM="; + hash = "sha256-QFRahjDyL7BNikK2cCsFLfu4/odDbkCxplf6f7yCezE="; }; vendorHash = "sha256-mnrGnQ7clzu2dkAHyCuxfX0sGU5EcHybut6GfpmOSoU="; diff --git a/nixpkgs/pkgs/servers/monitoring/net-snmp/default.nix b/nixpkgs/pkgs/servers/monitoring/net-snmp/default.nix index 6f7e696c5d6d..2a49eda4530f 100644 --- a/nixpkgs/pkgs/servers/monitoring/net-snmp/default.nix +++ b/nixpkgs/pkgs/servers/monitoring/net-snmp/default.nix @@ -10,11 +10,11 @@ in stdenv.mkDerivation rec { pname = "net-snmp"; - version = "5.9.3"; + version = "5.9.4"; src = fetchurl { url = "mirror://sourceforge/net-snmp/${pname}-${version}.tar.gz"; - sha256 = "sha256-IJfym34b8/EwC0uuUvojCNC7jV05mNvgL5RipBOi7wo="; + sha256 = "sha256-i03gE5HnTjxwFL60OWGi1tb6A6zDQoC5WF9JMHRbBUQ="; }; patches = diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/unbound-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/unbound-exporter.nix index 3f8206b14edf..a7575e809b3a 100644 --- a/nixpkgs/pkgs/servers/monitoring/prometheus/unbound-exporter.nix +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/unbound-exporter.nix @@ -1,36 +1,34 @@ -{ lib, stdenv, rustPlatform, fetchFromGitHub, openssl, pkg-config, nixosTests, Security }: +{ lib +, buildGoModule +, fetchFromGitHub +, nixosTests +}: -rustPlatform.buildRustPackage rec { - pname = "unbound-telemetry"; - version = "unstable-2021-09-18"; +let + version = "0.4.4"; +in +buildGoModule { + pname = "unbound_exporter"; + inherit version; src = fetchFromGitHub { - owner = "svartalf"; - repo = pname; - rev = "19e53b05828a43b7062b67a9cc6c84836ca26439"; - sha256 = "sha256-wkr9T6GlJP/PSv17z3MC7vC0cXg/Z6rGlhlCUHH3Ua4="; + owner = "letsencrypt"; + repo = "unbound_exporter"; + rev = "refs/tags/v${version}"; + hash = "sha256-0eo56z5b+hzKCY5OKg/9F7rjLyoSKPJoHLoXeMjCuFU="; }; - cargoLock = { - lockFile = ./Cargo.lock; - outputHashes = { - "native-tls-0.2.3" = "sha256-I1+ZNLDVGS1x9Iu81RD2//xnqhKhNGBmlrT0ryNFSlE="; - }; - }; - - nativeBuildInputs = [ pkg-config ]; - - buildInputs = [ openssl ] - ++ lib.optional stdenv.isDarwin Security; + vendorHash = "sha256-4aWuf9UTPQseEwDJfWIcQW4uGMffRnWlHhiu0yMz4vk="; passthru.tests = { inherit (nixosTests.prometheus-exporters) unbound; }; meta = with lib; { + changelog = "https://github.com/letsencrypt/unbound_exporter/releases/tag/v${version}"; description = "Prometheus exporter for Unbound DNS resolver"; - homepage = "https://github.com/svartalf/unbound-telemetry"; - license = licenses.mit; - maintainers = with maintainers; [ ]; + homepage = "https://github.com/letsencrypt/unbound_exporter/tree/main"; + license = licenses.asl20; + maintainers = with maintainers; [ hexa ]; }; } diff --git a/nixpkgs/pkgs/servers/monitoring/unpoller/default.nix b/nixpkgs/pkgs/servers/monitoring/unpoller/default.nix index 021bed53eb87..741142cf8fd7 100644 --- a/nixpkgs/pkgs/servers/monitoring/unpoller/default.nix +++ b/nixpkgs/pkgs/servers/monitoring/unpoller/default.nix @@ -6,16 +6,16 @@ buildGoModule rec { pname = "unpoller"; - version = "2.8.0"; + version = "2.8.1"; src = fetchFromGitHub { owner = "unpoller"; repo = "unpoller"; rev = "v${version}"; - hash = "sha256-1LfpMjKf1pLW2loyXWIJEQclYgNnXhSchlOD4JWRCEc="; + hash = "sha256-w0DcU27wrqzWxPwoY/as2vBtJQytz1482tNIXdyvHbY="; }; - vendorHash = "sha256-mRuJ9B4u62VENQmQJTkVZHzNba224ZqewjUjGZBjdz4="; + vendorHash = "sha256-2uvQhEEtsnGPQxYnNND6kM1HeN3kFlHzUXiehM+GpMs="; ldflags = [ "-w" "-s" diff --git a/nixpkgs/pkgs/servers/monitoring/vmagent/default.nix b/nixpkgs/pkgs/servers/monitoring/vmagent/default.nix index a5a473db8a39..95736f726b9f 100644 --- a/nixpkgs/pkgs/servers/monitoring/vmagent/default.nix +++ b/nixpkgs/pkgs/servers/monitoring/vmagent/default.nix @@ -1,13 +1,13 @@ { lib, fetchFromGitHub, buildGoModule }: buildGoModule rec { pname = "vmagent"; - version = "1.91.3"; + version = "1.93.0"; src = fetchFromGitHub { owner = "VictoriaMetrics"; repo = "VictoriaMetrics"; rev = "v${version}"; - sha256 = "sha256-xW31Lm+WiJ1quMaIDa7tbZuKhILTMdUviIDTRJT1Cqg="; + sha256 = "sha256-NkpMGsNz4knt5QY6B9sPJ3GcXEgPNyNgAsNBs9F2GOQ="; }; ldflags = [ "-s" "-w" "-X github.com/VictoriaMetrics/VictoriaMetrics/lib/buildinfo.Version=${version}" ]; |