Browse Source

updates to logging

pull/1/head
Daniel Poelzleithner 4 months ago
parent
commit
0fbfadf9cc
2 changed files with 54 additions and 0 deletions
  1. 52
    0
      ansible/hypervisor.yml
  2. 2
    0
      hosts/containers/logging/configuration.nix

+ 52
- 0
ansible/hypervisor.yml View File

@@ -3,3 +3,55 @@
3 3
 - hosts: hypervisor
4 4
   roles:
5 5
     - proxmox
6
+    - { role: "elastic.beats", beat: "filebeat",
7
+        become: true,
8
+        tags: ["filebeat", "logging"],
9
+        beat_conf: {
10
+          filebeat: {
11
+            "inputs":[{
12
+              "type": log,
13
+              "enabled": true,
14
+              "paths": [
15
+                  "/var/log/ceph/*.log",
16
+                  "/var/log/pve/tasks/*/*",
17
+                  "/var/log/vzdump/*.log",
18
+
19
+              ],
20
+              tags: ["hypervisor", "proxmox"]
21
+            }]
22
+          }
23
+        },
24
+        "output_conf": {
25
+          "logstash": {
26
+            "hosts": ["logging.serv.zentralwerk.org:5044", "172.20.73.13:5044"]
27
+          }
28
+        },
29
+        logging_conf: {
30
+          level: warning,
31
+          to_files: false
32
+        }
33
+    }
34
+    - { role: "elastic.beats", beat: "journalbeat",
35
+        become: true,
36
+        tags: ["journalbeat", "logging"],
37
+        beat_conf: {
38
+          journalbeat: {
39
+            "inputs":[{
40
+              seek: cursor,
41
+              "paths": []
42
+            }]
43
+          },
44
+          tags: ["hypervisor", "proxmox"]
45
+        },
46
+        "output_conf": {
47
+          "logstash": {
48
+            "hosts": ["logging.serv.zentralwerk.org:5044", "172.20.73.13:5044"]
49
+          }
50
+        },
51
+        logging_conf: {
52
+          level: warning,
53
+          to_files: false,
54
+        }
55
+    }
56
+  vars:
57
+    beats_version: 7.2.0

+ 2
- 0
hosts/containers/logging/configuration.nix View File

@@ -67,6 +67,8 @@
67 67
     user = "root";
68 68
   };
69 69
 
70
+  systemd.services.graylog.serviceConfig.Restart = "always";
71
+
70 72
   system.stateVersion = "19.03"; # Did you read the comment?
71 73
 
72 74
 }

Loading…
Cancel
Save