Author: eelco
Date: Mon Feb 20 13:40:47 2012
New Revision: 32426
URL: https://nixos.org/websvn/nix/?rev=32426&sc=1
Log:
* Don't set DBHost if the database is on localhost, otherwise Zabbix
will use TCP/IP instead of a Unix domain socket.
* Simplify Zabbix's start condition. Zabbix now retries if the
database is down instead of bailing out.
Modified:
nixos/trunk/modules/services/monitoring/zabbix-server.nix
Modified: nixos/trunk/modules/services/monitoring/zabbix-server.nix
==============================================================================
--- nixos/trunk/modules/services/monitoring/zabbix-server.nix Mon Feb 20
13:37:33 2012 (r32425)
+++ nixos/trunk/modules/services/monitoring/zabbix-server.nix Mon Feb 20
13:40:47 2012 (r32426)
@@ -21,7 +21,9 @@
PidFile = ${pidFile}
- DBHost = ${cfg.dbServer}
+ ${optionalString (cfg.dbServer != "localhost") ''
+ DBHost = ${cfg.dbServer}
+ ''}
DBName = zabbix
@@ -76,8 +78,7 @@
description = "Zabbix server daemon";
- startOn = if cfg.dbServer == "localhost" then "started postgresql"
else "filesystem";
- stopOn = if cfg.dbServer == "localhost" then "stopping postgresql"
else "starting shutdown";
+ startOn = "filesystem";
preStart =
''
@@ -94,6 +95,8 @@
fi
'';
+ path = [ pkgs.nettools ];
+
# Zabbix doesn't have an option not to daemonize, and doesn't
# daemonize in a way that allows Upstart to track it. So to
# make sure that we notice when it goes down, we start Zabbix
@@ -102,7 +105,6 @@
# just monitor `cat'.
script =
''
- export PATH=${pkgs.nettools}/bin:$PATH
rm -f ${stateDir}/dummy
mkfifo ${stateDir}/dummy
cat ${stateDir}/dummy &
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits