scollector module: Add extraOpts option
This commit is contained in:
parent
e8892b3ba5
commit
bdbdaee3c0
@ -20,6 +20,10 @@ let
|
|||||||
cfg.collectors)}
|
cfg.collectors)}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
cmdLineOpts = concatStringsSep " " (
|
||||||
|
[ "-h=${cfg.bosunHost}" "-c=${collectors}" ] ++ cfg.extraOpts
|
||||||
|
);
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
@ -79,6 +83,15 @@ in {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraOpts = mkOption {
|
||||||
|
type = with types; listOf str;
|
||||||
|
default = [];
|
||||||
|
example = [ "-d" ];
|
||||||
|
description = ''
|
||||||
|
Extra scollector command line options
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -95,9 +108,7 @@ in {
|
|||||||
PermissionsStartOnly = true;
|
PermissionsStartOnly = true;
|
||||||
User = cfg.user;
|
User = cfg.user;
|
||||||
Group = cfg.group;
|
Group = cfg.group;
|
||||||
ExecStart = ''
|
ExecStart = "${cfg.package}/bin/scollector ${cmdLineOpts}";
|
||||||
${cfg.package}/bin/scollector -h=${cfg.bosunHost} -c=${collectors}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user