Netdata: add fail2ban monitoring
This commit is contained in:
@ -26,9 +26,11 @@ services:
|
|||||||
- "/run/dbus:/run/dbus:ro"
|
- "/run/dbus:/run/dbus:ro"
|
||||||
- "/sys:/host/sys:ro"
|
- "/sys:/host/sys:ro"
|
||||||
- "/var/log:/host/var/log:ro"
|
- "/var/log:/host/var/log:ro"
|
||||||
|
- "/var/run:/host/var/run:ro"
|
||||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||||
environment:
|
environment:
|
||||||
PGID: "{{ netdata_docker_group_output.stdout | default(999) }}"
|
PGID: "{{ netdata_docker_group_output.stdout | default(999) }}"
|
||||||
|
NETDATA_EXTRA_DEB_PACKAGES: "fail2ban"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
{{ web_proxy_network }}:
|
{{ web_proxy_network }}:
|
||||||
|
3
files/netdata/go.d/fail2ban.conf
Normal file
3
files/netdata/go.d/fail2ban.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
jobs:
|
||||||
|
- name: fail2ban
|
||||||
|
update_every: 5 # Collect Fail2Ban jails statistics every 5 seconds
|
@ -50,6 +50,14 @@
|
|||||||
group: "{{ app_user }}"
|
group: "{{ app_user }}"
|
||||||
mode: "0640"
|
mode: "0640"
|
||||||
|
|
||||||
|
- name: "Copy fail2ban plugin config file"
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "files/{{ app_name }}/go.d/fail2ban.conf"
|
||||||
|
dest: "{{ config_go_d_dir }}/fail2ban.conf"
|
||||||
|
owner: "{{ app_user }}"
|
||||||
|
group: "{{ app_user }}"
|
||||||
|
mode: "0640"
|
||||||
|
|
||||||
- name: "Grab docker group id."
|
- name: "Grab docker group id."
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: |
|
cmd: |
|
||||||
|
Reference in New Issue
Block a user