2016-07-20 23:07:59 +00:00
|
|
|
import ./make-test.nix ({ pkgs, ...} : {
|
|
|
|
name = "smokeping";
|
|
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
|
|
|
maintainers = [ cransom ];
|
|
|
|
};
|
|
|
|
|
|
|
|
nodes = {
|
|
|
|
sm =
|
2018-07-20 20:56:59 +00:00
|
|
|
{ ... }:
|
2016-07-20 23:07:59 +00:00
|
|
|
{
|
|
|
|
services.smokeping = {
|
|
|
|
enable = true;
|
|
|
|
port = 8081;
|
2016-10-08 15:04:27 +00:00
|
|
|
mailHost = "127.0.0.2";
|
2016-07-20 23:07:59 +00:00
|
|
|
probeConfig = ''
|
|
|
|
+ FPing
|
2017-01-29 10:11:01 +00:00
|
|
|
binary = /run/wrappers/bin/fping
|
2016-07-20 23:07:59 +00:00
|
|
|
offset = 0%
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
startAll;
|
|
|
|
$sm->waitForUnit("smokeping");
|
|
|
|
$sm->waitForUnit("thttpd");
|
|
|
|
$sm->waitForFile("/var/lib/smokeping/data/Local/LocalMachine.rrd");
|
|
|
|
$sm->succeed("curl -s -f localhost:8081/smokeping.fcgi?target=Local");
|
|
|
|
$sm->succeed("ls /var/lib/smokeping/cache/Local/LocalMachine_mini.png");
|
2016-10-08 15:04:27 +00:00
|
|
|
$sm->succeed("ls /var/lib/smokeping/cache/index.html");
|
2016-07-20 23:07:59 +00:00
|
|
|
'';
|
|
|
|
})
|