Skip to content

module path, permissions and config #2

@xm1234567

Description

@xm1234567

Some feedback. I tested this plugin under centos 7.8/fail2ban v0.11.1-10. I did the following changes to make it working:

  1. module path:
    import sys, string, os, logging
    import socket
    import collectd
    from fail2ban.client.csocket import CSocket
    from fail2ban.client.configurator import Configurator
  1. grant some permissons for collectd:
    r permission /etc/fail2ban/fail2ban.local
    rw permisson for /var/run/fail2ban/fail2ban.sock
    Every time, fail2ban service restart, the rw permission on /var/run/fail2ban/fail2ban.sock for collectd is lost. need to find some permanent, good and safe solution?

  2. a conf example :
    cat /etc/collectd.d/collectd.conf.d/fail2ban.conf
    LoadPlugin python
    <Plugin python>
    ModulePath "/opt/collectd/lib_develop"
    Import fail2ban2collectd
    </Plugin>

Test your collectd.

ls -al /opt/collectd/lib_develop/fail2ban2collectd.py
-rwxr-xr-x 1 root root 3923 Oct 12 11:19 /opt/collectd/lib_develop/fail2ban2collectd.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions