From 3cf06162939317595c3c8c9a979a40fceb522e57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20-=20Le=20Filament?= <theo@le-filament.com> Date: Wed, 29 Mar 2023 12:58:32 +0200 Subject: [PATCH] change(fail2ban): add extension to file and set better thresholds --- templates/nrpe.cfg.j2 | 2 +- vars/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/nrpe.cfg.j2 b/templates/nrpe.cfg.j2 index b17edda..2b2fd16 100644 --- a/templates/nrpe.cfg.j2 +++ b/templates/nrpe.cfg.j2 @@ -41,7 +41,7 @@ command[check_version]=/usr/lib/nagios/custom-plugins/check_version.sh {% if inventory_hostname in groups.docker | default([]) and inventory_hostname not in groups.docker_nextcloud | default([]) %} {% set fail2ban_jails = fail2ban_jails + ['traefik-auth'] %} {% endif %} -command[check_fail2ban]=/usr/lib/nagios/custom-plugins/check_fail2ban.sh {{ fail2ban_jails | join(',') }} +command[check_fail2ban]=/usr/lib/nagios/custom-plugins/check_fail2ban.sh --warning 250 --critical 500 {{ fail2ban_jails | join(',') }} {% if inventory_hostname in groups.docker_gitlab | default([]) %} command[check_procs_sshd]=/usr/lib/nagios/plugins/check_procs -w 4 -c 2: -C sshd -a -D {% else %} diff --git a/vars/main.yml b/vars/main.yml index b778e18..df295db 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -4,7 +4,7 @@ nagios_plugins_version: "2.3.3" plugins_to_download: - name: check_docker.sh url: https://sources.le-filament.com/lefilament/nagios-plugin/-/raw/master/check_docker.sh - - name: check_fail2ban + - name: check_fail2ban.sh url: https://sources.le-filament.com/lefilament/nagios-plugin/-/raw/master/check_fail2ban.sh - name: check_gitlab.rb url: https://sources.le-filament.com/lefilament/nagios-plugin/-/raw/master/check_gitlab.rb -- GitLab