at master 717 B view raw
1{ pkgs, ... }: 2{ 3 name = "gatus"; 4 meta.maintainers = with pkgs.lib.maintainers; [ pizzapim ]; 5 6 nodes.machine = 7 { ... }: 8 { 9 services.gatus = { 10 enable = true; 11 12 settings = { 13 web.port = 8080; 14 metrics = true; 15 16 endpoints = [ 17 { 18 name = "metrics"; 19 url = "http://localhost:8080/metrics"; 20 interval = "1s"; 21 conditions = [ 22 "[STATUS] == 200" 23 ]; 24 } 25 ]; 26 }; 27 }; 28 }; 29 30 testScript = '' 31 machine.wait_for_unit("gatus.service") 32 machine.wait_until_succeeds("curl -s http://localhost:8080/metrics | grep go_info", timeout=60) 33 ''; 34}