Переглянути джерело

[filebeat] Add filebeat to lots of jails

Colin Powell 6 місяців тому
батько
коміт
e84f2e4e99

+ 4 - 1
lab/ansible/hosts

@@ -28,7 +28,7 @@ linkace1.local
 muchsync1.local
 paperless1.local
 podgrab1.local
-syncthing.local
+syncthing0.local
 wger0.local
 test0.local
 
@@ -200,3 +200,6 @@ scratch0.local
 
 [test]
 test0.local
+
+[syncthing]
+syncthing0.local

+ 23 - 0
lab/ansible/playbook.yml

@@ -5,6 +5,7 @@
 
 - hosts: dns
   roles:
+    - role: filebeat
     - role: unbound
 
 - hosts: fakemail
@@ -13,15 +14,18 @@
 
 - hosts: db
   roles:
+    - role: filebeat
     - role: postgres
     - role: pgadmin4
 
 - hosts: rss
   roles:
+    - role: filebeat
     - role: miniflux
 
 - hosts: proxy
   roles:
+    - role: filebeat
     - role: caddy
 
 - hosts: logs
@@ -36,6 +40,11 @@
     - role: supervisor
     - role: pbp
 
+- hosts: syncthing
+  roles:
+    - role: filebeat
+    - role: syncthing
+
 - hosts: fifteenfive
   roles:
     - role: direnv
@@ -55,6 +64,7 @@
 
 - hosts: git
   roles:
+    - role: filebeat
     - role: gogs
 
 - hosts: photos
@@ -66,6 +76,7 @@
 
 - hosts: mail
   roles:
+    - role: filebeat
     - role: muchsync
 
 - hosts: geoloc
@@ -76,21 +87,25 @@
 
 - hosts: podcasts
   roles:
+    - role: filebeat
     - role: podgrab
 
 - hosts: mopidy
   roles:
+    - role: filebeat
     - role: immortal
     - role: beets
     - role: mopidy
 
 - hosts: snapcast
   roles:
+    - role: filebeat
     - role: immortal
     - role: snapcast
 
 - hosts: icecast
   roles:
+    - role: filebeat
     - role: icecast
 
 - hosts: pastebin
@@ -99,6 +114,7 @@
 
 - hosts: cache
   roles:
+    - role: filebeat
     - role: redis
 
 - hosts: kibana
@@ -120,10 +136,12 @@
 
 - hosts: s3
   roles:
+    - role: filebeat
     - role: minio
 
 - hosts: media
   roles:
+    - role: filebeat
     - role: jellyfin
 
 - hosts: consul-nodes-dc1
@@ -161,6 +179,7 @@
 
 - hosts: paper
   roles:
+    - role: filebeat
     - role: immortal
     - role: nginx
     - role: paperless
@@ -172,6 +191,7 @@
 
 - hosts: notify
   roles:
+    - role: filebeat
     - role: ntfy
 
 - hosts: bookmarks
@@ -191,6 +211,7 @@
 
 - hosts: vrobbler
   roles:
+    - role: filebeat
     - role: immortal
     - role: nginx
     - role: vrobbler
@@ -212,11 +233,13 @@
 
 - hosts: books
   roles:
+    - role: filebeat
     - role: immortal
     - role: calibre
 
 - hosts: library
   roles:
+    - role: filebeat
     - role: immortal
     - role: calibre-web
 

+ 0 - 2
lab/ansible/roles/filebeat/files/filebeat.yml

@@ -5,8 +5,6 @@ setup.template.pattern: "{{ansible_hostname}}-log-*"
 setup.template.overwrite: true
 
 filebeat.inputs:
-- type: log
-  enabled: true
 - type: log
   enabled: true
   paths:

+ 6 - 3
lab/ansible/roles/unbound/files/service.zones

@@ -8,14 +8,17 @@ local-data: "nfs.service        IN      A       192.168.40.142"
 local-data: "git.service        IN      A       192.168.40.244"
 local-data: "db.service         IN      A       192.168.40.145"
 local-data: "rss.service        IN      A       192.168.40.146"
-local-data: "jellyfin.service   IN      A       192.168.40.185"
+local-data: "jellyfin.service   IN      A       192.168.40.143"
+local-data: "syncthing.service  IN      A       192.168.40.158"
+local-data: "passit.service     IN      A       192.168.40.80"
 local-data: "podcasts.service   IN      A       192.168.40.47"
 local-data: "calibre.service    IN      A       192.168.40.243"
 local-data: "calibreweb.service IN      A       192.168.40.48"
-local-data: "wx.service         IN      A       192.168.40.46"
+local-data: "logging.service    IN      A       192.168.40.46"
 local-data: "laptop.service     IN      A       192.168.40.46"
 local-data: "kiosk.service      IN      A       192.168.40.102"
-local-data: "kitchen.service    IN      A      192.168.40.204"
+local-data: "kitchen.service    IN      A       192.168.40.204"
+local-data: "wx.service         IN      A       192.168.40.185"
 local-data: "linux.service      IN      A       192.168.40.185"
 
 

+ 1 - 0
lab/ansible/roles/unbound/files/unblink.zones

@@ -30,6 +30,7 @@ local-data: "emus.lab.unbl.ink	IN	    A	    192.168.40.46"
 local-data: "play.lab.unbl.ink	IN	    A	    192.168.40.46"
 local-data: "rss.lab.unbl.ink   IN      A       192.168.40.46"
 local-data: "archive.lab.unbl.ink        IN     A       192.168.40.46"
+local-data: "calibre.lab.unbl.ink        IN     A       192.168.40.46"
 local-data: "front.see.unbl.ink          IN     A       192.168.40.46"
 local-data: "dining.see.unbl.ink         IN     A       192.168.40.46"
 local-data: "backyard.see.unbl.ink       IN     A       192.168.40.46"