<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://kb.rvmgroup.it/index.php?action=history&amp;feed=atom&amp;title=Monitoraggio_di_Fail2Ban_con_Nagios</id>
	<title>Monitoraggio di Fail2Ban con Nagios - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://kb.rvmgroup.it/index.php?action=history&amp;feed=atom&amp;title=Monitoraggio_di_Fail2Ban_con_Nagios"/>
	<link rel="alternate" type="text/html" href="https://kb.rvmgroup.it/index.php?title=Monitoraggio_di_Fail2Ban_con_Nagios&amp;action=history"/>
	<updated>2026-05-06T05:42:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://kb.rvmgroup.it/index.php?title=Monitoraggio_di_Fail2Ban_con_Nagios&amp;diff=9712&amp;oldid=prev</id>
		<title>Gabriele.vivinetto: Created page with &quot;* Scaricare il plugin:  sudo wget &quot;https://raw.githubusercontent.com/fail2ban/fail2ban/master/files/nagios/check_fail2ban&quot; -O /usr/local/lib/nagios/plugins/check_fail2ban  sud...&quot;</title>
		<link rel="alternate" type="text/html" href="https://kb.rvmgroup.it/index.php?title=Monitoraggio_di_Fail2Ban_con_Nagios&amp;diff=9712&amp;oldid=prev"/>
		<updated>2016-04-11T17:59:47Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;* Scaricare il plugin:  sudo wget &amp;quot;https://raw.githubusercontent.com/fail2ban/fail2ban/master/files/nagios/check_fail2ban&amp;quot; -O /usr/local/lib/nagios/plugins/check_fail2ban  sud...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;* Scaricare il plugin:&lt;br /&gt;
 sudo wget &amp;quot;https://raw.githubusercontent.com/fail2ban/fail2ban/master/files/nagios/check_fail2ban&amp;quot; -O /usr/local/lib/nagios/plugins/check_fail2ban&lt;br /&gt;
 sudo chmod +x /usr/local/lib/nagios/plugins/check_fail2ban&lt;br /&gt;
&lt;br /&gt;
* Abilitare l&amp;#039;esecuzione tramite sudo:&lt;br /&gt;
 sudo visudo -f /etc/sudoers.d/check_fail2ban&lt;br /&gt;
&lt;br /&gt;
 nagios          ALL=(root) NOPASSWD: /usr/local/lib/nagios/plugins/check_fail2ban&lt;br /&gt;
&lt;br /&gt;
* Testare:&lt;br /&gt;
 sudo -u nagios sudo /usr/local/lib/nagios/plugins/check_fail2ban &lt;br /&gt;
&lt;br /&gt;
 CHECK FAIL2BAN ACTIVITY - CRITICAL - 12 detected jails with 88 current banned IP(s)&lt;br /&gt;
&lt;br /&gt;
=Check Locale=&lt;br /&gt;
* Definire il check_command locale:&lt;br /&gt;
 sudoedit /etc/nagios-plugins/config/fail2ban.cfg&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# check_fail2ban&lt;br /&gt;
define command{&lt;br /&gt;
        command_name    check_fail2ban&lt;br /&gt;
        command_line    /usr/bin/sudo /usr/lib/nagios/plugins/local/check_fail2ban -w $ARG1$ -c $ARG2$&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# &amp;#039;check_fail2ban_jail&amp;#039; command definition&lt;br /&gt;
define command{&lt;br /&gt;
    command_name    check_fail2ban_jail&lt;br /&gt;
    command_line    /usr/bin/sudo /usr/local/lib/nagios/plugins/check_fail2ban -p -j $ARG1$ -w $ARG2$ -c $ARG3$&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Definire il service check locale:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define service{&lt;br /&gt;
    use                 generic-service&lt;br /&gt;
    host_name           hostname.example.com&lt;br /&gt;
    service_description FAIL2BAN&lt;br /&gt;
    check_command       check_fail2ban!200!250&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Check NRPE=&lt;br /&gt;
* Definire i check-command nrpe:&lt;br /&gt;
 sudoedit /etc/nagios/nrpe.d/check-fail2ban.cfg&lt;br /&gt;
&lt;br /&gt;
 command[check-fail2ban]=/usr/bin/sudo /usr/local/lib/nagios/plugins/check_fail2ban -p -D FAIL2BAN-GLOBAL -w 200 -c 250 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Riavviare nrpe&lt;br /&gt;
 sudo /etc/init.d/nagios-nrpe-server restar&lt;br /&gt;
&lt;br /&gt;
* Definire il service check con nrpe:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define service{&lt;br /&gt;
    use                 generic-service&lt;br /&gt;
    host_name           hostname.example.com&lt;br /&gt;
    service_description FAIL2BAN&lt;br /&gt;
    check_command       check-nrpe-check-fail2ban&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gabriele.vivinetto</name></author>
	</entry>
</feed>