Code Monkey home page Code Monkey logo

Comments (11)

bertalanimre avatar bertalanimre commented on August 29, 2024 1

Are you reading howto? You skip step 1. Your zabbix agent dont have configuration... Please read howto carefully!

I humbly appologise, I have skipped a line and now it works like a charm. 😵 However, the install guide does need update because all the routes and filenames are not relevant on Ubuntu 22.04 for me and I've not modified the system in depts enought to be so much different than a standard install. Here are the modifications for my system:

1; Set configuration file

Zabbix Agent

wget https://raw.githubusercontent.com/hermanekt/zabbix-fail2ban-discovery-/master/fail2ban.conf -O /etc/zabbix/zabbix_agentd.conf.d/fail2ban.conf

2; Grant access to Fail2Ban

systemctl restart zabbix-agent

3; Test Zabbix Agent setting

Zabbix Agent

root@server:~# sudo -u zabbix zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf -t fail2ban.discovery
fail2ban.discovery                            [t|{"data":[{"{#JAIL}":"nginx-404"}, {"{#JAIL}":"nginx-499"}, {"{#JAIL}":"sshd"}]}]

root@server:~# sudo -u zabbix zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf -t fail2ban.status['sshd']
fail2ban.status[sshd]                         [t|0]

I again say sorry for my mistake and I hope my details will have positive effect on your work. 👍 If not in the readme, then maybe somebody comes by Google and finds this.

from zabbix-fail2ban-discovery-.

hermanekt avatar hermanekt commented on August 29, 2024

Hi,

please use template for Ubuntu from this GIT repository. This is problem with os differences.
https://github.com/hermanekt/zabbix-fail2ban-discovery-

Tom

from zabbix-fail2ban-discovery-.

Tehniels2000 avatar Tehniels2000 commented on August 29, 2024

I tried all of the templates in the repository that you listed. But i can't seem to get it working.

from zabbix-fail2ban-discovery-.

HiTm4n avatar HiTm4n commented on August 29, 2024

Hello !
Same here, I have Zabbix 5.4 and no template works for me.

from zabbix-fail2ban-discovery-.

HiTm4n avatar HiTm4n commented on August 29, 2024

More info would be great I imagine, so :
Its a debian 10.10 server
Zabbix is in last stable version of 5.4
Agent are in :
zabbix_agentd (daemon) (Zabbix) 5.4.4
Revision 1765c4f1bc 30 August 2021, compilation time: Jul 22 2021 12:17:45

Copyright (C) 2021 Zabbix SIA
License GPLv2+: GNU GPL version 2 or later http://gnu.org/licenses/gpl.html.
This is free software: you are free to change and redistribute it according to
the license. There is NO WARRANTY, to the extent permitted by law.

This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/).

Compiled with OpenSSL 1.1.1d 10 Sep 2019
Running with OpenSSL 1.1.1d 10 Sep 2019

from zabbix-fail2ban-discovery-.

altmas5 avatar altmas5 commented on August 29, 2024

and no template works for me.

Can you add an error message from the items, autodiscovery or template import? I am not sure on where are you facing the issue

from zabbix-fail2ban-discovery-.

pappabetalar avatar pappabetalar commented on August 29, 2024

I am using Template-Fail2ban50-UBUNTU20.xml, zabbix_agentd (daemon) (Zabbix) 4.0.17
with Ubuntu 20.04.4 LTS and Zabbix 5.4.12.
I also get
1
2

from zabbix-fail2ban-discovery-.

hermanekt avatar hermanekt commented on August 29, 2024

Unsupported item key = zabbix agent dont have correct configuration. Do you copy correct *.conf file and restart zabbix agent?

from zabbix-fail2ban-discovery-.

hermanekt avatar hermanekt commented on August 29, 2024

from zabbix-fail2ban-discovery-.

bertalanimre avatar bertalanimre commented on August 29, 2024

The command from https://github.com/hermanekt/zabbix-fail2ban-discovery-#3-test-zabbix-agent-setting namely sudo -u zabbix zabbix_agent -c /etc/zabbix/zabbix_agent.conf -t fail2ban.discovery is invalid on Ubuntu 22.04. The following works only at least for me: sudo -u zabbix zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf -t fail2ban.discovery and the output is:

root@web-1:~# sudo -u zabbix zabbix_agentd -c /etc/zabbix/zabbix_agent.conf -t fail2ban.discovery
fail2ban.discovery                            [m|ZBX_NOTSUPPORTED] [Unsupported item key.]

Notice that there is a D at the end of the agent binarys name and in the config files name.

from zabbix-fail2ban-discovery-.

hermanekt avatar hermanekt commented on August 29, 2024

Are you reading howto? You skip step 1. Your zabbix agent dont have configuration... Please read howto carefully!

from zabbix-fail2ban-discovery-.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.