Difference between revisions of "Monitor fail2ban with check mk 1.6"
(Created page with "For monitoring the status of fail2ban with check_mk there is an external plugin, which can be found [https://notes.benv.junerules.com/fail2ban/ here]. Follow the instructions...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 8: | Line 8: | ||
</code><p> | </code><p> | ||
That should fix the issue and fail2ban monitoring is working again. | That should fix the issue and fail2ban monitoring is working again.</br></br> | ||
'''Update for check_mk 2.x'''</br> | |||
In check_mk 2.x the performance data will not show. This is because of some missing imports. In <tt>/omd/sites/<Site>/local/share/check_mk/web/plugins/perfometer/fail2ban.py</tt> add this at the beginning of the file: | |||
<pre> | |||
from cmk.gui.plugins.views.perfometers import ( | |||
perfometers, | |||
render_perfometer, | |||
perfometer_linear, | |||
perfometer_logarithmic, | |||
perfometer_logarithmic_dual, | |||
perfometer_logarithmic_dual_independent, | |||
) | |||
</pre> | |||
[[Category:Linux]][[Category:Monitoring]] |
Latest revision as of 07:34, 16 September 2021
For monitoring the status of fail2ban with check_mk there is an external plugin, which can be found here. Follow the instructions on the site to install the plugin. This works fine on versions of check_mk up to 1.5.x.
However, in check_mk 1.6 a change is made to the inventory function of the check_mk plugin. In order to fix this, edit /omd/sites/Home/local/share/check_mk/checks/fail2ban, and make the following change:
def inventory_fail2ban(checkname, info):
to:
def inventory_fail2ban(info):
That should fix the issue and fail2ban monitoring is working again.
Update for check_mk 2.x
In check_mk 2.x the performance data will not show. This is because of some missing imports. In /omd/sites/<Site>/local/share/check_mk/web/plugins/perfometer/fail2ban.py add this at the beginning of the file:
from cmk.gui.plugins.views.perfometers import ( perfometers, render_perfometer, perfometer_linear, perfometer_logarithmic, perfometer_logarithmic_dual, perfometer_logarithmic_dual_independent, )