summary refs log tree commit diff
path: root/pkgs/servers/monitoring/prometheus
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/monitoring/prometheus')
-rw-r--r--pkgs/servers/monitoring/prometheus/influxdb-exporter.nix35
-rw-r--r--pkgs/servers/monitoring/prometheus/jmx-httpserver.nix11
-rw-r--r--pkgs/servers/monitoring/prometheus/node-exporter.nix21
-rw-r--r--pkgs/servers/monitoring/prometheus/postgres-exporter.nix6
-rw-r--r--pkgs/servers/monitoring/prometheus/tor-exporter.nix2
5 files changed, 52 insertions, 23 deletions
diff --git a/pkgs/servers/monitoring/prometheus/influxdb-exporter.nix b/pkgs/servers/monitoring/prometheus/influxdb-exporter.nix
new file mode 100644
index 00000000000..35c67af92b1
--- /dev/null
+++ b/pkgs/servers/monitoring/prometheus/influxdb-exporter.nix
@@ -0,0 +1,35 @@
+{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
+
+buildGoModule rec {
+  pname = "influxdb_exporter";
+  version = "0.8.0";
+  rev = "v${version}";
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "prometheus";
+    repo = "influxdb_exporter";
+    sha256 = "sha256-aNj4ru3yDet+jdcEpckFVaymmjWmKzTMPcTxPMNFbgo=";
+  };
+
+  vendorSha256 = null;
+
+  ldflags = [
+    "-s"
+    "-w"
+    "-X github.com/prometheus/common/version.Version=${version}"
+    "-X github.com/prometheus/common/version.Revision=${rev}"
+    "-X github.com/prometheus/common/version.Branch=unknown"
+    "-X github.com/prometheus/common/version.BuildUser=nix@nixpkgs"
+    "-X github.com/prometheus/common/version.BuildDate=unknown"
+  ];
+
+  passthru.tests = { inherit (nixosTests.prometheus-exporters) influxdb; };
+
+  meta = with lib; {
+    description = "Prometheus exporter that accepts InfluxDB metrics";
+    homepage = "https://github.com/prometheus/influxdb_exporter";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ hexa ];
+  };
+}
diff --git a/pkgs/servers/monitoring/prometheus/jmx-httpserver.nix b/pkgs/servers/monitoring/prometheus/jmx-httpserver.nix
index 459ddf01de3..9a311c02f33 100644
--- a/pkgs/servers/monitoring/prometheus/jmx-httpserver.nix
+++ b/pkgs/servers/monitoring/prometheus/jmx-httpserver.nix
@@ -1,16 +1,13 @@
 { lib, stdenv, fetchurl, jre, makeWrapper }:
 
-let
+stdenv.mkDerivation rec {
+  pname = "jmx-prometheus-httpserver";
   version = "0.15.0";
-  jarName = "jmx_prometheus_httpserver-${version}-jar-with-dependencies.jar";
-  mavenUrl = "mirror://maven/io/prometheus/jmx/jmx_prometheus_httpserver/${version}/${jarName}";
-in stdenv.mkDerivation {
-  inherit version jarName;
 
-  name = "jmx-prometheus-httpserver-${version}";
+  jarName = "jmx_prometheus_httpserver-${version}-jar-with-dependencies.jar";
 
   src = fetchurl {
-    url = mavenUrl;
+    url = "mirror://maven/io/prometheus/jmx/jmx_prometheus_httpserver/${version}/${jarName}";
     sha256 = "0fr3svn8kjp7bq1wzbkvv5awylwn8b01bngj04zvk7fpzqpgs7mz";
   };
 
diff --git a/pkgs/servers/monitoring/prometheus/node-exporter.nix b/pkgs/servers/monitoring/prometheus/node-exporter.nix
index f97485f9478..7f0e5c78eba 100644
--- a/pkgs/servers/monitoring/prometheus/node-exporter.nix
+++ b/pkgs/servers/monitoring/prometheus/node-exporter.nix
@@ -19,17 +19,15 @@ buildGoModule rec {
 
   excludedPackages = [ "docs/node-mixin" ];
 
-  buildFlagsArray = let
-    goPackagePath = "github.com/prometheus/node_exporter";
-  in ''
-    -ldflags=
-        -s -w
-        -X github.com/prometheus/common/version.Version=${version}
-        -X github.com/prometheus/common/version.Revision=${rev}
-        -X github.com/prometheus/common/version.Branch=unknown
-        -X github.com/prometheus/common/version.BuildUser=nix@nixpkgs
-        -X github.com/prometheus/common/version.BuildDate=unknown
-  '';
+  ldflags = [
+    "-s"
+    "-w"
+    "-X github.com/prometheus/common/version.Version=${version}"
+    "-X github.com/prometheus/common/version.Revision=${rev}"
+    "-X github.com/prometheus/common/version.Branch=unknown"
+    "-X github.com/prometheus/common/version.BuildUser=nix@nixpkgs"
+    "-X github.com/prometheus/common/version.BuildDate=unknown"
+  ];
 
   passthru.tests = { inherit (nixosTests.prometheus-exporters) node; };
 
@@ -38,6 +36,5 @@ buildGoModule rec {
     homepage = "https://github.com/prometheus/node_exporter";
     license = licenses.asl20;
     maintainers = with maintainers; [ benley fpletz globin Frostman ];
-    platforms = platforms.unix;
   };
 }
diff --git a/pkgs/servers/monitoring/prometheus/postgres-exporter.nix b/pkgs/servers/monitoring/prometheus/postgres-exporter.nix
index 9b3cda6e7ae..4db534add8c 100644
--- a/pkgs/servers/monitoring/prometheus/postgres-exporter.nix
+++ b/pkgs/servers/monitoring/prometheus/postgres-exporter.nix
@@ -2,16 +2,16 @@
 
 buildGoModule rec {
   pname = "postgres_exporter";
-  version = "0.9.0";
+  version = "0.10.0";
 
   src = fetchFromGitHub {
     owner = "wrouesnel";
     repo = "postgres_exporter";
     rev = "v${version}";
-    sha256 = "sha256-Kv+sjqhlmH36L4YvDuGYODR/eTHA2TKQ6IUCXAiItyo=";
+    sha256 = "sha256-QU/pPw0gOHF5SAET8S/v7nTPyEvBqkxwwGQ42PbQNvw=";
   };
 
-  vendorSha256 = "sha256-yMcoUl9NsiiZQyEHlLu79DzIyl6BbhLZ/xNFavaGrEs=";
+  vendorSha256 = "sha256-sSJjJR0wlW95I6bgzLKx4aVcqwKMRyzzWC4uz0BKLNY=";
 
   doCheck = true;
 
diff --git a/pkgs/servers/monitoring/prometheus/tor-exporter.nix b/pkgs/servers/monitoring/prometheus/tor-exporter.nix
index bc8022f9feb..663b532c8fc 100644
--- a/pkgs/servers/monitoring/prometheus/tor-exporter.nix
+++ b/pkgs/servers/monitoring/prometheus/tor-exporter.nix
@@ -1,7 +1,7 @@
 { lib, fetchFromGitHub, python3Packages, nixosTests }:
 
 python3Packages.buildPythonApplication rec {
-  name = "tor-exporter-${version}";
+  pname = "tor-exporter";
   version = "0.4";
 
   # Just a single .py file to use as the application's main entry point.