Merge pull request #67634 from mmahut/prometheus-cups-exporter

prometheus-cups-exporter: init at unstable-2019-03-17
This commit is contained in:
WilliButz 2019-08-28 21:07:16 +02:00 committed by GitHub
commit b602b5c067
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 0 deletions

View file

@ -0,0 +1,36 @@
{ lib, fetchFromGitHub, python3Packages }:
python3Packages.buildPythonApplication rec {
pname = "prometheus-cups-exporter-unstable";
version = "2019-03-17";
format = "other";
src = fetchFromGitHub {
owner = "ThoreKr";
repo = "cups_exporter";
rev = "8fd1c2517e9878b7b7c73a450e5e546f437954a9";
sha256 = "1cwk2gbw2svqjlzgwv5wqzhq7fxwrwsrr0kkbnqn4mfb0kq6pa8m";
};
propagatedBuildInputs = with python3Packages; [ prometheus_client pycups ];
installPhase = ''
mkdir -p $out/share/
cp cups_exporter.py $out/share/
'';
fixupPhase = ''
makeWrapper "${python3Packages.python.interpreter}" "$out/bin/prometheus-cups-exporter" \
--set PYTHONPATH "$PYTHONPATH" \
--add-flags "$out/share/cups_exporter.py"
'';
meta = with lib; {
description = "A simple prometheus exporter for cups implemented in python";
homepage = "https://github.com/ThoreKr/cups_exporter";
license = licenses.unfree;
maintainers = [ maintainers.mmahut ];
platforms = platforms.all;
};
}

View file

@ -15019,6 +15019,7 @@ in
prometheus-bind-exporter = callPackage ../servers/monitoring/prometheus/bind-exporter.nix { };
prometheus-blackbox-exporter = callPackage ../servers/monitoring/prometheus/blackbox-exporter.nix { };
prometheus-collectd-exporter = callPackage ../servers/monitoring/prometheus/collectd-exporter.nix { };
prometheus-cups-exporter = callPackage ../servers/monitoring/prometheus/cups-exporter.nix { };
prometheus-consul-exporter = callPackage ../servers/monitoring/prometheus/consul-exporter.nix { };
prometheus-dnsmasq-exporter = callPackage ../servers/monitoring/prometheus/dnsmasq-exporter.nix { };
prometheus-dovecot-exporter = callPackage ../servers/monitoring/prometheus/dovecot-exporter.nix { };