Merge pull request #11051 from offlinehacker/pkgs/bosun/update_0.5.0
bosun: 0.3.0 -> 0.5.0-alpha, udpate module
This commit is contained in:
commit
7955be7a82
4 changed files with 49 additions and 16 deletions
|
@ -6,9 +6,11 @@ let
|
|||
cfg = config.services.bosun;
|
||||
|
||||
configFile = pkgs.writeText "bosun.conf" ''
|
||||
tsdbHost = ${cfg.opentsdbHost}
|
||||
${optionalString (cfg.opentsdbHost !=null) "tsdbHost = ${cfg.opentsdbHost}"}
|
||||
${optionalString (cfg.influxHost !=null) "influxHost = ${cfg.influxHost}"}
|
||||
httpListen = ${cfg.listenAddress}
|
||||
stateFile = ${cfg.stateFile}
|
||||
ledisDir = ${cfg.ledisDir}
|
||||
checkFrequency = ${cfg.checkFrequency}
|
||||
|
||||
${cfg.extraConfig}
|
||||
|
@ -54,10 +56,20 @@ in {
|
|||
};
|
||||
|
||||
opentsdbHost = mkOption {
|
||||
type = types.string;
|
||||
type = types.nullOr types.string;
|
||||
default = "localhost:4242";
|
||||
description = ''
|
||||
Host and port of the OpenTSDB database that stores bosun data.
|
||||
To disable opentsdb you can pass null as parameter.
|
||||
'';
|
||||
};
|
||||
|
||||
influxHost = mkOption {
|
||||
type = types.nullOr types.string;
|
||||
default = null;
|
||||
example = "localhost:8086";
|
||||
description = ''
|
||||
Host and port of the influxdb database.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -70,13 +82,21 @@ in {
|
|||
};
|
||||
|
||||
stateFile = mkOption {
|
||||
type = types.string;
|
||||
type = types.path;
|
||||
default = "/var/lib/bosun/bosun.state";
|
||||
description = ''
|
||||
Path to bosun's state file.
|
||||
'';
|
||||
};
|
||||
|
||||
ledisDir = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/lib/bosun/ledis_data";
|
||||
description = ''
|
||||
Path to bosun's ledis data dir
|
||||
'';
|
||||
};
|
||||
|
||||
checkFrequency = mkOption {
|
||||
type = types.str;
|
||||
default = "5m";
|
||||
|
@ -103,7 +123,7 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
|
||||
systemd.services.bosun = {
|
||||
description = "bosun metrics collector (part of Bosun)";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
|
24
pkgs/servers/monitoring/bosun/default.nix
Normal file
24
pkgs/servers/monitoring/bosun/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ lib, fetchFromGitHub, goPackages }:
|
||||
|
||||
goPackages.buildGoPackage rec {
|
||||
name = "bosun";
|
||||
rev = "0.5.0-alpha";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
inherit rev;
|
||||
owner = "bosun-monitor";
|
||||
repo = "bosun";
|
||||
sha256 = "0nkphzkwx5r974skn269nnsqr4gllws5z4z6n53sslj2x9rz57ml";
|
||||
};
|
||||
|
||||
subPackages = [ "cmd/bosun" "cmd/scollector" ];
|
||||
goPackagePath = "bosun.org";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Time Series Alerting Framework";
|
||||
license = licenses.mit;
|
||||
homepage = https://bosun.org;
|
||||
maintainers = with maintainers; [ offline ];
|
||||
platforms = with platforms; linux;
|
||||
};
|
||||
}
|
|
@ -9074,7 +9074,7 @@ let
|
|||
|
||||
bird = callPackage ../servers/bird { };
|
||||
|
||||
bosun = go14Packages.bosun.bin // { outputs = [ "bin" ]; };
|
||||
bosun = (callPackage ../servers/monitoring/bosun { }).bin // { outputs = [ "bin" ]; };
|
||||
scollector = bosun;
|
||||
|
||||
charybdis = callPackage ../servers/irc/charybdis {};
|
||||
|
|
|
@ -255,17 +255,6 @@ let
|
|||
sha256 = "193adhhsqdy0kyq1l1fi8pg2n6pwyrw4h607qm78qyi26f8i7vzf";
|
||||
};
|
||||
|
||||
bosun = buildFromGitHub {
|
||||
rev = "0.3.0";
|
||||
owner = "bosun-monitor";
|
||||
repo = "bosun";
|
||||
sha256 = "05qfhm5ipdry0figa0rhmg93c45dzh2lwpia73pfxp64l1daqa3a";
|
||||
goPackagePath = "bosun.org";
|
||||
# Todo: Split these derivations if worried about size on each machine
|
||||
subPackages = [ "cmd/bosun" "cmd/scollector" ];
|
||||
disabled = !isGo14;
|
||||
};
|
||||
|
||||
bufio = buildFromGitHub {
|
||||
rev = "24e7e48f60fc2d9e99e43c07485d9fff42051e66";
|
||||
owner = "vmihailenco";
|
||||
|
|
Loading…
Reference in a new issue