1# This test runs basic munin setup with node and cron job running on the same
2# machine.
3
4import ./make-test.nix ({ pkgs, ...} : {
5 name = "munin";
6 meta = with pkgs.stdenv.lib.maintainers; {
7 maintainers = [ domenkozar eelco chaoflow ];
8 };
9
10 nodes = {
11 one =
12 { config, pkgs, ... }:
13 {
14 services = {
15 munin-node.enable = true;
16 munin-cron = {
17 enable = true;
18 hosts = ''
19 [${config.networking.hostName}]
20 address localhost
21 '';
22 };
23 };
24 systemd.services.munin-node.serviceConfig.TimeoutStartSec = "3min";
25 };
26 };
27
28 testScript = ''
29 startAll;
30
31 $one->waitForUnit("munin-node.service");
32 $one->waitForFile("/var/lib/munin/one/one-uptime-uptime-g.rrd");
33 $one->waitForFile("/var/www/munin/one/index.html");
34 '';
35})