Build precise queries to find exactly what you need
Press ESC to close
Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More
Your review has been submitted and is pending approval.
Hello, Here is a check SNMP Linux to know the status of fail2ban but also know the number of host block.
Current Version
1.0.0.1
Last Release Date
2012-10-27
Owner
said
Website
http://www.keysource.be
Download URL
https://exchange.nagios.org/wp-content/uploads/project-files/2012/11/check_snmp_fail2ban.sh
License
GPL
Compatible With
Script for Nagios
Script root for Crontab
Script user for SNMPD
Hello,
Here is a check SNMP Linux to know the status of fail2ban but also know the number of host block.
In order not to have to use root access via SNMP, I created two scripts. one created by the state via root crontab and other intéroge state via a simple cat.
Good fun,
1. Install SNMP Linux Agent
2. copie the script to /usb/local/sbin/snmpcountfail2ban
3. Active run for the script :
chmod +x /usb/local/sbin/snmpcountfail2ban
4. Add entry to crontab :
vi /etc/crontab
# every 3min */3 * * * * root /bin/sh /usb/local/sbin/snmpcountfail2ban
5. copie the script to /usr/local/bin/snmpcount
6. Active run for the script :
chmod +x /usr/local/bin/snmpcount
7. Active the function on SNMPD :
vi /etc/snmpd.conf :
For fail2ban status running :
proc fail2ban-server 10 1
For fail2ban count drop host :
exec .1.3.6.1.4.1.2021.50 fail2bancount /bin/sh /usr/local/bin/snmpcount
You must be logged in to submit a review.
To:
From: