Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_snmp_fail2ban

Current Version
1.0.0.1
Last Release Date
2012-10-27
Compatible With
  • Nagios 2.x
  • Nagios 3.x
License
GPL
Hits
51760
Files:
FileDescription
check_snmp_fail2ban.shScript for Nagios
snmpcountfail2banScript root for Crontab
snmpcountScript user for SNMPD
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
check_snmp_fail2ban
Hello,

Here is a check SNMP Linux to know the status of fail2ban but also know the number of host block.
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