aboutsummaryrefslogtreecommitdiff
path: root/modules/monitoring/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/monitoring/default.nix')
-rw-r--r--modules/monitoring/default.nix43
1 files changed, 26 insertions, 17 deletions
diff --git a/modules/monitoring/default.nix b/modules/monitoring/default.nix
index 68df69b..05ca338 100644
--- a/modules/monitoring/default.nix
+++ b/modules/monitoring/default.nix
@@ -11,22 +11,9 @@ with self.lib.nginx;
webExternalUrl = "https://prometheus.vapor.systems";
exporters = {
- node = {
- enable = true;
- enabledCollectors = [ "systemd" ];
- };
-
- zfs = {
- enable = true;
- };
-
postgres = {
enable = true;
};
-
- nginx = {
- enable = true;
- };
};
globalConfig = {
@@ -37,25 +24,35 @@ with self.lib.nginx;
{
job_name = "node";
static_configs = [
- { targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; }
+ { targets = [ "ettves:${toString config.services.prometheus.exporters.node.port}" ]; }
+ { targets = [ "phaenn:${toString config.services.prometheus.exporters.node.port}" ]; }
];
}
{
job_name = "zfs";
static_configs = [
- { targets = [ "localhost:${toString config.services.prometheus.exporters.zfs.port}" ]; }
+ { targets = [ "ettves:${toString config.services.prometheus.exporters.zfs.port}" ]; }
+ { targets = [ "phaenn:${toString config.services.prometheus.exporters.zfs.port}" ]; }
+ ];
+ }
+ {
+ job_name = "smartctl";
+ static_configs = [
+ { targets = [ "ettves:${toString config.services.prometheus.exporters.smartctl.port}" ]; }
+ { targets = [ "phaenn:${toString config.services.prometheus.exporters.smartctl.port}" ]; }
];
}
{
job_name = "postgres";
static_configs = [
- { targets = [ "localhost:${toString config.services.prometheus.exporters.postgres.port}" ]; }
+ { targets = [ "ettves:${toString config.services.prometheus.exporters.postgres.port}" ]; }
];
}
{
job_name = "nginx";
static_configs = [
- { targets = [ "localhost:${toString config.services.prometheus.exporters.nginx.port}" ]; }
+ { targets = [ "ettves:${toString config.services.prometheus.exporters.nginx.port}" ]; }
+ { targets = [ "phaenn:${toString config.services.prometheus.exporters.nginx.port}" ]; }
];
}
{
@@ -64,11 +61,23 @@ with self.lib.nginx;
{ targets = [ "localhost:${toString config.services.quassel.settings.metrics.port}" ]; }
];
}
+ {
+ job_name = "authentik";
+ static_configs = [
+ { targets = [ "ettves:9300" ]; }
+ { targets = [ "ettves:9303" ]; }
+ { targets = [ "ettves:9304" ]; }
+ ];
+ }
];
};
services.nginx.statusPage = true;
+ services.udev.extraRules = ''
+ SUBSYSTEM=="nvme", KERNEL=="nvme[0-9]*", GROUP="disk"
+ '';
+
security.acme.certs = {
"vapor.systems" = {
extraDomainNames = [ "*.vapor.systems" ];