nixos/collectd: add plugin config
This commit is contained in:
parent
abf263fed7
commit
e2283d9533
1 changed files with 17 additions and 1 deletions
|
@ -16,8 +16,15 @@ let
|
|||
NotifyLevel "OKAY"
|
||||
</Plugin>
|
||||
|
||||
${concatStrings (mapAttrsToList (plugin: pluginConfig: ''
|
||||
LoadPlugin ${plugin}
|
||||
<Plugin "${plugin}">
|
||||
${pluginConfig}
|
||||
</Plugin>
|
||||
'') cfg.plugins)}
|
||||
|
||||
${concatMapStrings (f: ''
|
||||
Include "${f}"
|
||||
Include "${f}"
|
||||
'') cfg.include}
|
||||
|
||||
${cfg.extraConfig}
|
||||
|
@ -68,6 +75,15 @@ in {
|
|||
type = listOf str;
|
||||
};
|
||||
|
||||
plugins = mkOption {
|
||||
default = {};
|
||||
example = { cpu = ""; memory = ""; network = "Server 192.168.1.1 25826"; };
|
||||
description = ''
|
||||
Attribute set of plugin names to plugin config segments
|
||||
'';
|
||||
type = types.attrsOf types.str;
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
default = "";
|
||||
description = ''
|
||||
|
|
Loading…
Reference in a new issue