metadata.yaml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. plugin_name: python.d.plugin
  2. modules:
  3. - meta:
  4. plugin_name: python.d.plugin
  5. module_name: fail2ban
  6. monitored_instance:
  7. name: Fail2ban
  8. link: https://www.fail2ban.org/
  9. categories:
  10. - data-collection.authentication-and-authorization
  11. icon_filename: "fail2ban.png"
  12. related_resources:
  13. integrations:
  14. list: []
  15. info_provided_to_referring_integrations:
  16. description: ""
  17. keywords:
  18. - fail2ban
  19. - security
  20. - authentication
  21. - authorization
  22. most_popular: false
  23. overview:
  24. data_collection:
  25. metrics_description: |
  26. Monitor Fail2ban performance for prime intrusion prevention operations. Monitor ban counts, jail statuses, and failed login attempts to ensure robust network security.
  27. method_description: |
  28. It collects metrics through reading the default log and configuration files of fail2ban.
  29. supported_platforms:
  30. include: []
  31. exclude: []
  32. multi_instance: true
  33. additional_permissions:
  34. description: |
  35. The `fail2ban.log` file must be readable by the user `netdata`.
  36. - change the file ownership and access permissions.
  37. - update `/etc/logrotate.d/fail2ban`` to persist the changes after rotating the log file.
  38. To change the file ownership and access permissions, execute the following:
  39. ```shell
  40. sudo chown root:netdata /var/log/fail2ban.log
  41. sudo chmod 640 /var/log/fail2ban.log
  42. ```
  43. To persist the changes after rotating the log file, add `create 640 root netdata` to the `/etc/logrotate.d/fail2ban`:
  44. ```shell
  45. /var/log/fail2ban.log {
  46. weekly
  47. rotate 4
  48. compress
  49. delaycompress
  50. missingok
  51. postrotate
  52. fail2ban-client flushlogs 1>/dev/null
  53. endscript
  54. # If fail2ban runs as non-root it still needs to have write access
  55. # to logfiles.
  56. # create 640 fail2ban adm
  57. create 640 root netdata
  58. }
  59. ```
  60. default_behavior:
  61. auto_detection:
  62. description: |
  63. By default the collector will attempt to read log file at /var/log/fail2ban.log and conf file at /etc/fail2ban/jail.local. If conf file is not found default jail is ssh.
  64. limits:
  65. description: ""
  66. performance_impact:
  67. description: ""
  68. setup:
  69. prerequisites:
  70. list: []
  71. configuration:
  72. file:
  73. name: ""
  74. description: ""
  75. options:
  76. description: |
  77. There are 2 sections:
  78. * Global variables
  79. * One or more JOBS that can define multiple different instances to monitor.
  80. The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values.
  81. Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition.
  82. Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified.
  83. folding:
  84. title: Config options
  85. enabled: true
  86. list:
  87. - name: log_path
  88. description: path to fail2ban.log.
  89. default_value: /var/log/fail2ban.log
  90. required: false
  91. - name: conf_path
  92. description: path to jail.local/jail.conf.
  93. default_value: /etc/fail2ban/jail.local
  94. required: false
  95. - name: conf_dir
  96. description: path to jail.d/.
  97. default_value: /etc/fail2ban/jail.d/
  98. required: false
  99. - name: exclude
  100. description: jails you want to exclude from autodetection.
  101. default_value: ""
  102. required: false
  103. - name: update_every
  104. description: Sets the default data collection frequency.
  105. default_value: 1
  106. required: false
  107. - name: priority
  108. description: Controls the order of charts at the netdata dashboard.
  109. default_value: 60000
  110. required: false
  111. - name: autodetection_retry
  112. description: Sets the job re-check interval in seconds.
  113. default_value: 0
  114. required: false
  115. - name: penalty
  116. description: Indicates whether to apply penalty to update_every in case of failures.
  117. default_value: yes
  118. required: false
  119. - name: name
  120. description: Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works.
  121. default_value: ""
  122. required: false
  123. examples:
  124. folding:
  125. enabled: true
  126. title: Config
  127. list:
  128. - name: Basic
  129. folding:
  130. enabled: false
  131. description: A basic example configuration.
  132. config: |
  133. local:
  134. log_path: '/var/log/fail2ban.log'
  135. conf_path: '/etc/fail2ban/jail.local'
  136. troubleshooting:
  137. problems:
  138. list: []
  139. alerts: []
  140. metrics:
  141. folding:
  142. title: Metrics
  143. enabled: false
  144. description: ""
  145. availability: []
  146. scopes:
  147. - name: global
  148. description: |
  149. These metrics refer to the entire monitored application.
  150. labels: []
  151. metrics:
  152. - name: fail2ban.failed_attempts
  153. description: Failed attempts
  154. unit: "attempts/s"
  155. chart_type: line
  156. dimensions:
  157. - name: a dimension per jail
  158. - name: fail2ban.bans
  159. description: Bans
  160. unit: "bans/s"
  161. chart_type: line
  162. dimensions:
  163. - name: a dimension per jail
  164. - name: fail2ban.banned_ips
  165. description: Banned IP addresses (since the last restart of netdata)
  166. unit: "ips"
  167. chart_type: line
  168. dimensions:
  169. - name: a dimension per jail