mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-20 12:42:24 +00:00
74558c88fb
The initial commit accidentally left in some commented code and if you were using alerts, they simply didn't work. Smokeping also includes some JS code for the webui allowing you to zoom into graphs and it was not passed into the homedir. Additionally, generate static html pages for other webservers to serve the cache directory. Add additional options to specify sendmail path or mailhost and verify that both are not set. Add one extra config hook that allows you to bypass all of the invidual config stanzas and just hand it a string.
34 lines
867 B
Nix
34 lines
867 B
Nix
import ./make-test.nix ({ pkgs, ...} : {
|
|
name = "smokeping";
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
|
maintainers = [ cransom ];
|
|
};
|
|
|
|
nodes = {
|
|
sm =
|
|
{ pkgs, config, ... }:
|
|
{
|
|
services.smokeping = {
|
|
enable = true;
|
|
port = 8081;
|
|
mailHost = "127.0.0.2";
|
|
probeConfig = ''
|
|
+ FPing
|
|
binary = /var/setuid-wrappers/fping
|
|
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");
|
|
$sm->succeed("ls /var/lib/smokeping/cache/index.html");
|
|
'';
|
|
})
|