Merge pull request #205559 from SuperSandro2000/prometheus-xmpp-alerts

This commit is contained in:
Franz Pletz 2022-12-14 12:34:18 +01:00 committed by GitHub
commit 6727fe0f1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 2 deletions

View File

@ -0,0 +1,33 @@
{ lib
, buildPythonPackage
, fetchPypi
, aiohttp
, prometheus-client
}:
buildPythonPackage rec {
pname = "aiohttp-openmetrics";
version = "0.0.11";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-GIVUkjyn+iQSMZZ6dNmmimvbt+t+uxOYv2QEDk/dA+g=";
};
propagatedBuildInputs = [
aiohttp
prometheus-client
];
# no tests
doCheck = false;
pythonImportsCheck = [ "aiohttp_openmetrics" ];
meta = with lib; {
description = "OpenMetrics provider for aiohttp";
homepage = "https://github.com/jelmer/aiohttp-openmetrics/";
license = licenses.asl20;
maintainers = with maintainers; [ ];
};
}

View File

@ -6,19 +6,27 @@
python3Packages.buildPythonApplication rec {
pname = "prometheus-xmpp-alerts";
version = "0.5.3";
version = "0.5.6";
src = fetchFromGitHub {
owner = "jelmer";
repo = pname;
rev = "v${version}";
sha256 = "sha256-gb7lFRqqw4w/B+Sw0iteDkuGsPfw/ZZ+sRMTu5vxIUo=";
sha256 = "sha256-PwShGS1rbfZCK5OS6Cnn+mduOpWAD4fC69mcGB5GB1c=";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace "bs4" "beautifulsoup4"
'';
propagatedBuildInputs = [
prometheus-alertmanager
] ++ (with python3Packages; [
aiohttp
aiohttp-openmetrics
beautifulsoup4
jinja2
slixmpp
prometheus-client
pyyaml
@ -29,6 +37,8 @@ python3Packages.buildPythonApplication rec {
pytz
];
pythonImportsCheck = [ "prometheus_xmpp" ];
meta = {
description = "XMPP Web hook for Prometheus";
homepage = "https://github.com/jelmer/prometheus-xmpp-alerts";

View File

@ -198,6 +198,8 @@ self: super: with self; {
aiohttp-jinja2 = callPackage ../development/python-modules/aiohttp-jinja2 { };
aiohttp-openmetrics = callPackage ../development/python-modules/aiohttp-openmetrics { };
aiohttp-remotes = callPackage ../development/python-modules/aiohttp-remotes { };
aiohttp-retry = callPackage ../development/python-modules/aiohttp-retry { };