mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-10 23:00:39 +02:00
feat: define global monitoring for each service and automatically configure telegraf based on it
This commit is contained in:
parent
79e1e782c4
commit
e35daee76d
23 changed files with 403 additions and 83 deletions
|
@ -1,17 +1,28 @@
|
|||
{config, ...}: {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
icfg = config.repo.secrets.local.networking.interfaces.wan;
|
||||
in {
|
||||
networking.hostId = config.repo.secrets.local.networking.hostId;
|
||||
networking.domain = config.repo.secrets.global.domains.mail.primary;
|
||||
networking.hosts."127.0.0.1" = ["mx1.${config.repo.secrets.global.domains.mail.primary}"];
|
||||
|
||||
globals.monitoring.ping.envoy = {
|
||||
hostv4 = lib.net.cidr.ip icfg.hostCidrv4;
|
||||
hostv6 = lib.net.cidr.ip icfg.hostCidrv6;
|
||||
location = "external";
|
||||
network = "internet";
|
||||
};
|
||||
|
||||
boot.initrd.systemd.network = {
|
||||
enable = true;
|
||||
networks = {inherit (config.systemd.network.networks) "10-wan";};
|
||||
};
|
||||
|
||||
systemd.network.networks = {
|
||||
"10-wan" = let
|
||||
icfg = config.repo.secrets.local.networking.interfaces.wan;
|
||||
in {
|
||||
"10-wan" = {
|
||||
address = [
|
||||
icfg.hostCidrv4
|
||||
icfg.hostCidrv6
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue