From 93806bd14870c293b312bc40f789a2a9d01806d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 10 Dec 2022 20:47:39 +0100 Subject: [PATCH] Remove old journalbeat config, enable more node-exporter modules --- flake.nix | 2 +- modules/logging.nix | 35 ----------------------------------- modules/monitoring.nix | 9 +++++++++ 3 files changed, 10 insertions(+), 36 deletions(-) delete mode 100644 modules/logging.nix create mode 100644 modules/monitoring.nix diff --git a/flake.nix b/flake.nix index 9da6a673..78420d9c 100644 --- a/flake.nix +++ b/flake.nix @@ -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; diff --git a/modules/logging.nix b/modules/logging.nix deleted file mode 100644 index 683af85d..00000000 --- a/modules/logging.nix +++ /dev/null @@ -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; - }; -} diff --git a/modules/monitoring.nix b/modules/monitoring.nix new file mode 100644 index 00000000..c9cf9a49 --- /dev/null +++ b/modules/monitoring.nix @@ -0,0 +1,9 @@ +{ pkgs, lib, ... }: + +{ + services.prometheus.exporters.node = lib.mkIf (pkgs.system != "riscv64-linux") { + enable = true; + enabledCollectors = [ "ethtool" "systemd" ]; + openFirewall = true; + }; +}