diff --git a/ansible/hypervisor.yml b/ansible/hypervisor.yml index 8004c1ab..444256c1 100644 --- a/ansible/hypervisor.yml +++ b/ansible/hypervisor.yml @@ -3,3 +3,55 @@ - hosts: hypervisor roles: - proxmox + - { role: "elastic.beats", beat: "filebeat", + become: true, + tags: ["filebeat", "logging"], + beat_conf: { + filebeat: { + "inputs":[{ + "type": log, + "enabled": true, + "paths": [ + "/var/log/ceph/*.log", + "/var/log/pve/tasks/*/*", + "/var/log/vzdump/*.log", + + ], + tags: ["hypervisor", "proxmox"] + }] + } + }, + "output_conf": { + "logstash": { + "hosts": ["logging.serv.zentralwerk.org:5044", "172.20.73.13:5044"] + } + }, + logging_conf: { + level: warning, + to_files: false + } + } + - { role: "elastic.beats", beat: "journalbeat", + become: true, + tags: ["journalbeat", "logging"], + beat_conf: { + journalbeat: { + "inputs":[{ + seek: cursor, + "paths": [] + }] + }, + tags: ["hypervisor", "proxmox"] + }, + "output_conf": { + "logstash": { + "hosts": ["logging.serv.zentralwerk.org:5044", "172.20.73.13:5044"] + } + }, + logging_conf: { + level: warning, + to_files: false, + } + } + vars: + beats_version: 7.2.0 diff --git a/hosts/containers/logging/configuration.nix b/hosts/containers/logging/configuration.nix index df01eaf6..01a81738 100644 --- a/hosts/containers/logging/configuration.nix +++ b/hosts/containers/logging/configuration.nix @@ -67,6 +67,8 @@ user = "root"; }; + systemd.services.graylog.serviceConfig.Restart = "always"; + system.stateVersion = "19.03"; # Did you read the comment? }