mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-05 09:58:50 +03:00
* 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 = {
|
||||
|
||||
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.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user