Hi to all,
my collegue just made script and template for fail2ban jails.
It automaticaly discovers jails and return basic informations about it.
Feel free to use/discuss!
Here is README:
my collegue just made script and template for fail2ban jails.
It automaticaly discovers jails and return basic informations about it.
Feel free to use/discuss!
Here is README:
Code:
Zabbix fail2ban lld 2014 dron, [email protected] copy fail2ban_jail_discovery and fail2ban_jail_banned to /etc/zabbix/scripts. Be sure that zabbix-agent can run these scripts. add this to UserParameter section of zabbix-agentd.conf UserParameter=fail2ban.jail.banned[*],/etc/zabbix/scripts/fail2ban_jail_banned $1 UserParameter=fail2ban.jail.discovery,/etc/zabbix/scripts/fail2ban_jail_discovery import zbx_fail2ban_lld_template.xml template TODO: Fail2ban create socket (/var/run/fail2ban/fail2ban.sock) with 700 perms. zabbix-agent needs read permission to read jails from fail2ban-client so my workaround is to modify init.d script (add chown zabbix:root ${socket}) start() { echo -n $"Starting fail2ban: " ${FAIL2BAN} -x start > /dev/null RETVAL=$? if [ $RETVAL = 0 ]; then chown zabbix:root ${socket} touch ${lockfile} echo_success else echo_failure fi echo return $RETVAL }


Comment