forked from mirrors_public/oddlama_nix-config
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,7 +1,20 @@
|
|||
{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.me;
|
||||
|
||||
globals.monitoring.ping.sentinel = {
|
||||
hostv4 = lib.net.cidr.ip icfg.hostCidrv4;
|
||||
hostv6 = lib.net.cidr.ip icfg.hostCidrv6;
|
||||
location = "external";
|
||||
network = "internet";
|
||||
};
|
||||
|
||||
# Forwarding required for forgejo 9922->22
|
||||
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
|
||||
|
||||
|
@ -11,9 +24,7 @@
|
|||
};
|
||||
|
||||
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