Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported item key in Zabbix 5.0 #18

Open
Tehniels2000 opened this issue Apr 28, 2021 · 11 comments
Open

Unsupported item key in Zabbix 5.0 #18

Tehniels2000 opened this issue Apr 28, 2021 · 11 comments

Comments

@Tehniels2000
Copy link

I'm getting the error Unsupported item key in Zabbix 5.0. I have the following configuration:

root@server:~# dpkg -l | grep fail2ban
ii fail2ban 0.11.1-1 all ban hosts that cause multiple authentication errors

root@server:~# fail2ban-client status
Status
|- Number of jail: 9
`- Jail list: apache-badbots, apache-botsearch, apache-fakegooglebot, apache-modsecurity, apache-nohome, apache-noscript, apache-overflows, apache-shellshock, sshd

root@server:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal

root@server:~# dpkg -l | grep zabbix
ii zabbix-agent 1:5.0.8-1+focal amd64 Zabbix network monitoring solution - agent
ii zabbix-release 1:5.0-1+focal all Zabbix official repository configuration

I downloaded the Version 5.0 template from the zabbix share. I followed all of the installation steps.

@hermanekt
Copy link
Owner

Hi,

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

Tom

@Tehniels2000
Copy link
Author

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

@HiTm4n
Copy link

HiTm4n commented Sep 8, 2021

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

@HiTm4n
Copy link

HiTm4n commented Sep 8, 2021

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

@altmas5
Copy link
Contributor

altmas5 commented Sep 21, 2021

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

@pappabetalar
Copy link

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

@hermanekt
Copy link
Owner

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

@hermanekt
Copy link
Owner

hermanekt commented Nov 29, 2023 via email

@bertalanimre
Copy link

bertalanimre commented Nov 30, 2023

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.

@hermanekt
Copy link
Owner

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

@bertalanimre
Copy link

bertalanimre commented Nov 30, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants