2013-10-20 23:16:13 +04:00
|
|
|
# This test runs basic munin setup with node and cron job running on the same
|
|
|
|
# machine.
|
|
|
|
|
2014-04-14 16:02:44 +04:00
|
|
|
import ./make-test.nix {
|
2014-06-28 18:04:49 +04:00
|
|
|
name = "munin";
|
2014-04-14 16:02:44 +04:00
|
|
|
|
|
|
|
nodes = {
|
2013-10-20 23:16:13 +04:00
|
|
|
one =
|
|
|
|
{ config, pkgs, ... }:
|
2014-04-14 16:02:44 +04:00
|
|
|
{
|
2013-10-20 23:16:13 +04:00
|
|
|
services = {
|
|
|
|
munin-node.enable = true;
|
|
|
|
munin-cron = {
|
|
|
|
enable = true;
|
|
|
|
hosts = ''
|
|
|
|
[${config.networking.hostName}]
|
|
|
|
address localhost
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2014-09-28 16:25:05 +04:00
|
|
|
systemd.services.munin-node.serviceConfig.TimeoutStartSec = "3min";
|
2013-10-20 23:16:13 +04:00
|
|
|
};
|
|
|
|
};
|
2014-04-14 16:02:44 +04:00
|
|
|
|
2013-10-20 23:16:13 +04:00
|
|
|
testScript = ''
|
|
|
|
startAll;
|
2014-04-14 16:02:44 +04:00
|
|
|
|
2013-10-20 23:16:13 +04: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");
|
|
|
|
'';
|
|
|
|
}
|