Add graphite beacon package and module
This commit is contained in:
parent
4e51a466bd
commit
b7d8d5dd30
@ -354,6 +354,16 @@ in {
|
|||||||
type = types.lines;
|
type = types.lines;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
beacon = {
|
||||||
|
enable = mkEnableOption "Whether to enable graphite beacon.";
|
||||||
|
|
||||||
|
config = mkOption {
|
||||||
|
description = "Graphite beacon configuration.";
|
||||||
|
default = {};
|
||||||
|
type = types.attrs;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
@ -535,10 +545,25 @@ in {
|
|||||||
environment.systemPackages = [ pkgs.pythonPackages.graphite_pager ];
|
environment.systemPackages = [ pkgs.pythonPackages.graphite_pager ];
|
||||||
})
|
})
|
||||||
|
|
||||||
|
(mkIf cfg.beacon.enable {
|
||||||
|
systemd.services.graphite-beacon = {
|
||||||
|
description = "Grpahite Beacon Alerting Daemon";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = ''
|
||||||
|
${pkgs.pythonPackages.graphite_beacon}/bin/graphite-beacon \
|
||||||
|
--config ${pkgs.writeText "graphite-beacon.json" (builtins.toJSON cfg.beacon.config)}
|
||||||
|
'';
|
||||||
|
User = "graphite";
|
||||||
|
Group = "graphite";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
(mkIf (
|
(mkIf (
|
||||||
cfg.carbon.enableCache || cfg.carbon.enableAggregator || cfg.carbon.enableRelay ||
|
cfg.carbon.enableCache || cfg.carbon.enableAggregator || cfg.carbon.enableRelay ||
|
||||||
cfg.web.enable || cfg.api.enable ||
|
cfg.web.enable || cfg.api.enable ||
|
||||||
cfg.seyren.enable || cfg.pager.enable
|
cfg.seyren.enable || cfg.pager.enable || cfg.beacon.enable
|
||||||
) {
|
) {
|
||||||
users.extraUsers = singleton {
|
users.extraUsers = singleton {
|
||||||
name = "graphite";
|
name = "graphite";
|
||||||
|
@ -4307,7 +4307,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with self; [ django_1_7 ];
|
propagatedBuildInputs = with self; [ django_1_7 ];
|
||||||
|
|
||||||
# tests appear to be broken on 0.6.1 at least
|
# tests appear to be broken on 0.6.1 at least
|
||||||
doCheck = ( version != "0.6.1" );
|
doCheck = ( version != "0.6.1" );
|
||||||
|
|
||||||
@ -6956,12 +6956,12 @@ let
|
|||||||
nameparser = buildPythonPackage rec {
|
nameparser = buildPythonPackage rec {
|
||||||
name = "nameparser-${version}";
|
name = "nameparser-${version}";
|
||||||
version = "0.3.4";
|
version = "0.3.4";
|
||||||
|
|
||||||
src = pkgs.fetchurl {
|
src = pkgs.fetchurl {
|
||||||
url = "https://pypi.python.org/packages/source/n/nameparser/${name}.tar.gz";
|
url = "https://pypi.python.org/packages/source/n/nameparser/${name}.tar.gz";
|
||||||
sha256 = "1zi94m99ziwwd6kkip3w2xpnl05r2cfv9iq68inz7np81c3g8vag";
|
sha256 = "1zi94m99ziwwd6kkip3w2xpnl05r2cfv9iq68inz7np81c3g8vag";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "A simple Python module for parsing human names into their individual components";
|
description = "A simple Python module for parsing human names into their individual components";
|
||||||
homepage = https://github.com/derek73/python-nameparser;
|
homepage = https://github.com/derek73/python-nameparser;
|
||||||
@ -13867,6 +13867,26 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
graphite_beacon = buildPythonPackage rec {
|
||||||
|
name = "graphite_beacon-0.22.1";
|
||||||
|
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
url = "https://pypi.python.org/packages/source/g/graphite_beacon/${name}.tar.gz";
|
||||||
|
md5 = "3d7b2bf8a41b6c3ec5ba2c14db321096";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ self.tornado ];
|
||||||
|
|
||||||
|
preBuild = "> requirements.txt";
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "A simple alerting application for Graphite metrics";
|
||||||
|
homepage = https://github.com/klen/graphite-beacon;
|
||||||
|
maintainers = [ maintainers.offline ];
|
||||||
|
license = licenses.mit;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
graphite_influxdb = buildPythonPackage rec {
|
graphite_influxdb = buildPythonPackage rec {
|
||||||
name = "graphite-influxdb-0.3";
|
name = "graphite-influxdb-0.3";
|
||||||
|
|
||||||
@ -14715,7 +14735,7 @@ let
|
|||||||
licences = [ licenses.mit licenses.gpl2 ];
|
licences = [ licenses.mit licenses.gpl2 ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
dicttoxml = buildPythonPackage rec {
|
dicttoxml = buildPythonPackage rec {
|
||||||
name = "dicttoxml-1.6.4";
|
name = "dicttoxml-1.6.4";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user