2022-12-04 08:53:28 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
2019-07-06 02:10:46 +02:00
|
|
|
|
2022-12-04 08:53:28 +01:00
|
|
|
{
|
2019-07-06 02:10:46 +02:00
|
|
|
# add central logging
|
|
|
|
services.journalbeat = {
|
2022-06-01 22:35:51 +02:00
|
|
|
enable = false;
|
2019-07-06 02:10:46 +02:00
|
|
|
extraConfig = ''
|
2019-11-05 18:44:39 +01:00
|
|
|
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: []
|
|
|
|
|
2019-07-06 02:10:46 +02:00
|
|
|
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
|
2022-01-16 13:26:37 +01:00
|
|
|
hosts: ["${config.c3d2.hosts.logging.ip4}:5044"]
|
2021-10-06 19:12:32 +02:00
|
|
|
'';
|
2019-07-06 02:10:46 +02:00
|
|
|
};
|
|
|
|
|
2022-06-22 00:46:02 +02:00
|
|
|
services.prometheus.exporters.node = lib.mkIf (pkgs.system != "riscv64-linux") {
|
2019-07-06 02:10:46 +02:00
|
|
|
enable = true;
|
|
|
|
openFirewall = true;
|
2022-06-12 17:26:32 +02:00
|
|
|
};
|
2019-07-06 02:10:46 +02:00
|
|
|
}
|