Remove old journalbeat config, enable more node-exporter modules

This commit is contained in:
Sandro - 2022-12-10 20:47:39 +01:00
parent 7f120207d5
commit 93806bd148
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
3 changed files with 10 additions and 36 deletions

View File

@ -723,7 +723,7 @@
./modules/backup.nix
./modules/c3d2.nix
./modules/nncp.nix
./modules/logging.nix
./modules/monitoring.nix
./modules/stats.nix
];
c3d2.hosts = hostRegistry.hosts;

View File

@ -1,35 +0,0 @@
{ config, pkgs, lib, ... }:
{
# add central logging
services.journalbeat = {
enable = false;
extraConfig = ''
journalbeat.inputs:
# Paths that should be crawled and fetched. Possible values files and directories.
# When setting a directory, all journals under it are merged.
# When empty starts to read from local journal.
- paths: []
journalbeat:
seek_position: cursor
cursor_seek_fallback: tail
write_cursor_state: true
cursor_flush_period: 5s
clean_field_names: true
convert_to_numbers: false
move_metadata_to_field: journal
default_type: journal
kernel: true
output.logstash:
# Boolean flag to enable or disable the output module.
enabled: true
hosts: ["${config.c3d2.hosts.logging.ip4}:5044"]
'';
};
services.prometheus.exporters.node = lib.mkIf (pkgs.system != "riscv64-linux") {
enable = true;
openFirewall = true;
};
}

9
modules/monitoring.nix Normal file
View File

@ -0,0 +1,9 @@
{ pkgs, lib, ... }:
{
services.prometheus.exporters.node = lib.mkIf (pkgs.system != "riscv64-linux") {
enable = true;
enabledCollectors = [ "ethtool" "systemd" ];
openFirewall = true;
};
}