nixos/zabbixAgent: add a few minor tweaks to make configuration file compatible with both zabbix agent 1 and 2
This commit is contained in:
parent
debbd84333
commit
d6fd7c6613
1 changed files with 8 additions and 3 deletions
|
@ -128,11 +128,16 @@ in
|
|||
{
|
||||
LogType = "console";
|
||||
Server = cfg.server;
|
||||
ListenIP = cfg.listen.ip;
|
||||
ListenPort = cfg.listen.port;
|
||||
LoadModule = builtins.attrNames cfg.modules;
|
||||
}
|
||||
(mkIf (cfg.modules != {}) { LoadModulePath = "${moduleEnv}/lib"; })
|
||||
(mkIf (cfg.modules != {}) {
|
||||
LoadModule = builtins.attrNames cfg.modules;
|
||||
LoadModulePath = "${moduleEnv}/lib";
|
||||
})
|
||||
|
||||
# the default value for "ListenIP" is 0.0.0.0 but zabbix agent 2 cannot accept configuration files which
|
||||
# explicitly set "ListenIP" to the default value...
|
||||
(mkIf (cfg.listen.ip != "0.0.0.0") { ListenIP = cfg.listen.ip; })
|
||||
];
|
||||
|
||||
networking.firewall = mkIf cfg.openFirewall {
|
||||
|
|
Loading…
Reference in a new issue