nixpkgs-suyu/nixos/tests/munin.nix

36 lines
881 B
Nix
Raw Normal View History

2013-10-20 21:16:13 +02:00
# This test runs basic munin setup with node and cron job running on the same
# machine.
import ./make-test.nix ({ pkgs, ...} : {
2014-06-28 16:04:49 +02:00
name = "munin";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ domenkozar eelco chaoflow ];
};
nodes = {
2013-10-20 21:16:13 +02:00
one =
{ config, pkgs, ... }:
{
2013-10-20 21:16:13 +02:00
services = {
munin-node.enable = true;
munin-cron = {
enable = true;
hosts = ''
[${config.networking.hostName}]
address localhost
'';
};
};
systemd.services.munin-node.serviceConfig.TimeoutStartSec = "3min";
2013-10-20 21:16:13 +02:00
};
};
2013-10-20 21:16:13 +02:00
testScript = ''
startAll;
2013-10-20 21:16:13 +02:00
$one->waitForUnit("munin-node.service");
$one->waitForFile("/var/lib/munin/one/one-uptime-uptime-g.rrd");
$one->waitForFile("/var/www/munin/one/index.html");
'';
})