diff options
author | Jaka Hudoklin <jakahudoklin@gmail.com> | 2015-11-16 14:08:10 +0100 |
---|---|---|
committer | Jaka Hudoklin <jakahudoklin@gmail.com> | 2015-11-16 14:24:02 +0100 |
commit | 0775a89c11791314adb6454430b89f693bb808ad (patch) | |
tree | e85d4708aa32f0e4ef7f371657395316e0c3fcf7 /nixos/modules/services/monitoring/bosun.nix | |
parent | c8d1e900d6c18b985240c4e681d4c5c8462b46b2 (diff) | |
download | nixpkgs-0775a89c11791314adb6454430b89f693bb808ad.tar nixpkgs-0775a89c11791314adb6454430b89f693bb808ad.tar.gz nixpkgs-0775a89c11791314adb6454430b89f693bb808ad.tar.bz2 nixpkgs-0775a89c11791314adb6454430b89f693bb808ad.tar.lz nixpkgs-0775a89c11791314adb6454430b89f693bb808ad.tar.xz nixpkgs-0775a89c11791314adb6454430b89f693bb808ad.tar.zst nixpkgs-0775a89c11791314adb6454430b89f693bb808ad.zip |
bosun module: update module
Diffstat (limited to 'nixos/modules/services/monitoring/bosun.nix')
-rw-r--r-- | nixos/modules/services/monitoring/bosun.nix | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/nixos/modules/services/monitoring/bosun.nix b/nixos/modules/services/monitoring/bosun.nix index ebe4741f01b..214a19d9483 100644 --- a/nixos/modules/services/monitoring/bosun.nix +++ b/nixos/modules/services/monitoring/bosun.nix @@ -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" ]; |