Compare commits

...

3 Commits

Author SHA1 Message Date
Simon Bruder 4c119f0b80
authoritative-dns: Drop INWX secondaries 2024-02-27 15:57:04 +01:00
Simon Bruder 939df6ae2a
wordclock-dimmer: Make logging less verbose
The time is already stored in the journal, so it does not need to be
logged. Only logging changed values makes the log less polluted once a
fixed value has been reached ((3, 3, 3) or (3, 0, 0)):
2024-02-24 20:57:49 +01:00
Simon Bruder 8f1d0a149c
node_exporter: Disable ARP netlink collector
It currently fails (logging an error message on every scrape). This
disables the netlink collector, making it fall back to reading ARP
entries from /proc/net/arp.
2024-02-24 20:52:38 +01:00
3 changed files with 16 additions and 18 deletions

View File

@ -67,12 +67,7 @@ in
id = host;
address = hostAddresses;
})
addresses) ++ lib.optional isPrimaryHost {
id = "inwx";
# INWX only allows the specification of one primary DNS,
# which limits the IP protocol usable for zone transfers to one.
address = lib.singleton "185.181.104.96";
};
addresses);
}
(lib.mkIf isPrimaryHost {
policy = lib.singleton {
@ -90,7 +85,7 @@ in
zonefile-load = "difference-no-serial";
journal-content = "all";
# secondary
notify = [ "inwx" ] ++ secondaryHosts;
notify = secondaryHosts;
# dnssec
dnssec-signing = true;
dnssec-policy = "default";

View File

@ -8,7 +8,10 @@
enable = config.sbruder.wireguard.home.enable;
listenAddress = config.sbruder.wireguard.home.address;
enabledCollectors = [ "systemd" ];
disabledCollectors = [ "rapl" ];
disabledCollectors = [
"arp.netlink" # https://github.com/prometheus/node_exporter/issues/2849
"rapl"
];
};
systemd.services.prometheus-node-exporter.after = [ "wireguard-wg-home.service" ];

View File

@ -61,15 +61,6 @@ def get_color_for_time(time: datetime.time, base=(60, 60, 60)) -> (int, int, int
)
def update(client: mqtt.Client):
time = datetime.datetime.now().time()
color = get_color_for_time(time)
print(f"{time}: setting color to {color}")
sys.stdout.flush()
set_color(client, *color)
pass
client = mqtt.Client("wordclock.py")
user = os.environ["WORDCLOCK_MQTT_USER"]
@ -83,6 +74,15 @@ host = os.environ["WORDCLOCK_MQTT_HOST"]
client.username_pw_set(user, password)
client.connect(host, 1883, 60)
color = (0, 0, 0)
while True:
update(client)
time = datetime.datetime.now().time()
new_color = get_color_for_time(time)
if new_color != color:
color = new_color
print(f"setting color to {color}")
sys.stdout.flush()
set_color(client, *color)
sleep(300)