2019-11-08 19:13:17 +03:00
|
|
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
2016-07-21 02:07:59 +03:00
|
|
|
name = "smokeping";
|
2021-01-10 22:08:30 +03:00
|
|
|
meta = with pkgs.lib.maintainers; {
|
2016-07-21 02:07:59 +03:00
|
|
|
maintainers = [ cransom ];
|
|
|
|
};
|
|
|
|
|
|
|
|
nodes = {
|
|
|
|
sm =
|
2018-07-20 23:56:59 +03:00
|
|
|
{ ... }:
|
2016-07-21 02:07:59 +03:00
|
|
|
{
|
2021-01-17 22:42:20 +03:00
|
|
|
networking.domain = "example.com"; # FQDN: sm.example.com
|
2016-07-21 02:07:59 +03:00
|
|
|
services.smokeping = {
|
|
|
|
enable = true;
|
|
|
|
port = 8081;
|
2016-10-08 18:04:27 +03:00
|
|
|
mailHost = "127.0.0.2";
|
2016-07-21 02:07:59 +03:00
|
|
|
probeConfig = ''
|
|
|
|
+ FPing
|
2017-01-29 13:11:01 +03:00
|
|
|
binary = /run/wrappers/bin/fping
|
2016-07-21 02:07:59 +03:00
|
|
|
offset = 0%
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
2019-11-08 19:13:17 +03:00
|
|
|
start_all()
|
|
|
|
sm.wait_for_unit("smokeping")
|
|
|
|
sm.wait_for_unit("thttpd")
|
|
|
|
sm.wait_for_file("/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")
|
|
|
|
sm.succeed("ls /var/lib/smokeping/cache/index.html")
|
2016-07-21 02:07:59 +03:00
|
|
|
'';
|
|
|
|
})
|