@cryptotaxi247 / netdata-1 / commits / ad248b883

fail2ban plugin: "/etc/fail2ban/jail.d/" added as default "conf_dir"; module readme update

Ilya committed Mar 26, 2017 at 22:55 UTC ad248b88306641b5b218f074cd9aefc3fbbdc76d
2 files changed +3 -11
conf.d/python.d/fail2ban.conf
+1 -10
@@ -58,15 +58,6 @@
58 #
59 # log_path: 'path to fail2ban.log' # Default: '/var/log/fail2ban.log'
60 # conf_path: 'path to jail.local/jail.conf' # Default: '/etc/fail2ban/jail.local'
61 -# conf_dir: 'path to jail.d/' # Default: '' empty
61 +# conf_dir: 'path to jail.d/' # Default: '/etc/fail2ban/jail.d/'
62 # exclude: 'jails you want to exclude from autodetection' # Default: '[]' empty list
63 #------------------------------------------------------------------------------------------------------------------
64 -# ------------------------------------------------------------------------------------------------------------------
65 -# AUTO-DETECTION JOBS
66 -# only one of them will run (they have the same name)
67 -
68 -local:
69 - log_path: '/var/log/fail2ban.log'
70 - conf_path: '/etc/fail2ban/jail.local'
71 -# conf_dir: '/etc/fail2ban/jail.d/'
72 -# exclude: 'dropbear apache'
python.d/fail2ban.chart.py
+2 -1
@@ -22,7 +22,7 @@ class Service(LogService):
22 self.order = ORDER
23 self.log_path = self.configuration.get('log_path', '/var/log/fail2ban.log')
24 self.conf_path = self.configuration.get('conf_path', '/etc/fail2ban/jail.local')
25 - self.conf_dir = self.configuration.get('conf_dir', '')
25 + self.conf_dir = self.configuration.get('conf_dir', '/etc/fail2ban/jail.d/')
26 self.bans = dict()
27 try:
28 self.exclude = self.configuration['exclude'].split()
@@ -86,6 +86,7 @@ class Service(LogService):
86 self.data.update(dict([(jail + '_in_jail', 0) for jail in self.jails_list]))
87 self.bans = dict([(jail, list()) for jail in self.jails_list])
88
89 + self._data_from_check = self.data
90 self.create_dimensions()
91 self.info('Plugin successfully started. Jails: %s' % self.jails_list)
92 return True