aboutsummaryrefslogtreecommitdiffstats
path: root/tests/by-name/mo/monitoring/test.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/by-name/mo/monitoring/test.nix76
1 files changed, 76 insertions, 0 deletions
diff --git a/tests/by-name/mo/monitoring/test.nix b/tests/by-name/mo/monitoring/test.nix
new file mode 100644
index 0000000..0b2ed1c
--- /dev/null
+++ b/tests/by-name/mo/monitoring/test.nix
@@ -0,0 +1,76 @@
+{
+ extraModules,
+ pkgs,
+ vhack,
+ ...
+}: let
+ grafanaDomain = "grafana.server.org";
+ scrutinyDomain = "scrutiny.server.org";
+in
+ vhack.runTest {
+ name = "monitoring";
+
+ serverDomains = [
+ {server = grafanaDomain;}
+ {server = scrutinyDomain;}
+ ];
+
+ nodes = {
+ client = {};
+
+ server = {config, ...}: {
+ imports =
+ extraModules
+ ++ [
+ ../../../../modules
+ ];
+
+ # there are no SMART available disk in the VM, so this service always fails.
+ systemd.services."smartd".enable = false;
+
+ age.identityPaths = ["${../../../common/email/hostKey}"];
+
+ vhack = {
+ monitoring = {
+ grafana = {
+ enable = true;
+ contactPoints = ["me@example.com"];
+ fqdn = grafanaDomain;
+
+ adminPassword = ../../../common/email/dkim/alice.com/private.age;
+ secretKey = ../../../common/email/dkim/bob.com/private.age;
+
+ # TODO: Add a test for that <2026-07-19>
+ smtp = null;
+ };
+
+ loki = {
+ enable = true;
+ };
+
+ prometheus = {
+ enable = true;
+ };
+
+ scrutiny = {
+ enable = true;
+ fqdn = scrutinyDomain;
+ };
+ };
+ };
+ };
+ };
+
+ services = [
+ {server = "grafana.service";}
+ {server = "fluent-bit.service";}
+ {server = "loki.service";}
+ {server = "netdata.service";}
+ ];
+
+ testScript = {...}:
+ # Python
+ ''
+ # TODO: We should probably query some of the prometheus metrics here? <2026-07-19>
+ '';
+ }