* Option to set the Zabbix server IP.
svn path=/nixos/trunk/; revision=12012
This commit is contained in:
parent
ae4ead1a33
commit
6d380a8ce8
@ -2045,6 +2045,7 @@
|
|||||||
|
|
||||||
|
|
||||||
zabbixAgent = {
|
zabbixAgent = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
description = "
|
description = "
|
||||||
@ -2052,6 +2053,14 @@
|
|||||||
It will send monitoring data to a Zabbix server.
|
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.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
|
cfg = config.services.zabbixAgent;
|
||||||
|
|
||||||
stateDir = "/var/run/zabbix";
|
stateDir = "/var/run/zabbix";
|
||||||
|
|
||||||
logDir = "/var/log/zabbix";
|
logDir = "/var/log/zabbix";
|
||||||
@ -9,7 +11,7 @@ let
|
|||||||
pidFile = "${stateDir}/zabbix_agentd.pid";
|
pidFile = "${stateDir}/zabbix_agentd.pid";
|
||||||
|
|
||||||
configFile = pkgs.writeText "zabbix_agentd.conf" ''
|
configFile = pkgs.writeText "zabbix_agentd.conf" ''
|
||||||
Server = 127.0.0.1
|
Server = ${cfg.server}
|
||||||
|
|
||||||
LogFile = ${logDir}/zabbix_agentd
|
LogFile = ${logDir}/zabbix_agentd
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user