* Option to set the Zabbix server IP.

svn path=/nixos/trunk/; revision=12012
This commit is contained in:
Eelco Dolstra 2008-06-08 22:21:56 +00:00
parent ae4ead1a33
commit 6d380a8ce8
2 changed files with 12 additions and 1 deletions

View File

@ -2045,6 +2045,7 @@
zabbixAgent = {
enable = mkOption {
default = false;
description = "
@ -2052,6 +2053,14 @@
It will send monitoring data to a Zabbix server.
";
};
server = mkOption {
default = "127.0.0.1";
description = ''
The IP address or hostname of the Zabbix server to connect to.
'';
};
};

View File

@ -2,6 +2,8 @@
let
cfg = config.services.zabbixAgent;
stateDir = "/var/run/zabbix";
logDir = "/var/log/zabbix";
@ -9,7 +11,7 @@ let
pidFile = "${stateDir}/zabbix_agentd.pid";
configFile = pkgs.writeText "zabbix_agentd.conf" ''
Server = 127.0.0.1
Server = ${cfg.server}
LogFile = ${logDir}/zabbix_agentd