home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.81k stars 28.94k forks source link

Zabbix Integration dont work #103786

Open david883 opened 7 months ago

david883 commented 7 months ago

The problem

Hello, I would like to use the Zabbix integration from Home Assistant. I created a user homeassistant in Zabbix and granted the rights for the API. then I created the host and imported and applied the zabbix template. Lastly, I added the zabbix lines to the configuration.yaml and restarted the Homeassistant. Unfortunately the integration doesn't work and I get error messages in the log.

What version of Home Assistant Core has the issue?

core-2023.11.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Zabbix

Link to integration documentation on our website

https://www.home-assistant.io/integrations/zabbix

Diagnostics information

2023-11-11 11:47:58.312 ERROR (SyncWorker_5) [homeassistant.components.zabbix] Unable to login to the Zabbix API: {'code': -32602, 'message': 'Invalid params.', 'data': 'Invalid parameter "/": unexpected parameter "user".', 'json': "{'jsonrpc': '2.0', 'method': 'user.login', 'params': {'user': 'homeassistant', 'password': '****'}, 'id': '1'}"} 2023-11-11 11:47:58.461 ERROR (MainThread) [homeassistant.setup] Setup failed for zabbix: Integration failed to initialize.

Example YAML snippet

zabbix:
  host: mydomsin.de
  ssl: true
  username: homeassistant
  password: mypassword
  publish_states_host: homeassistant
  exclude:
    domains:
      - device_tracker
    entities:
      - sun.sun
      - sensor.time

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 7 months ago

zabbix documentation zabbix source

david883 commented 7 months ago

The following steps will solve the problem until the next core update. please fix the code!

docker exec -ti homeassistant bash

Patch File: vi /usr/local/lib/python3.11/site-packages/pyzabbix/api.py

Line 208 und 210 user to username

mbo18 commented 7 months ago

The issue is not in HA but in the py-zabbix lib. You should open an issue here: https://github.com/adubkov/py-zabbix/

Note that this library has not been updated since 2020 and seems abandoned…

david883 commented 7 months ago

It is possible to Change the libary from pyzabbix instead of py-zabbix.

issue-triage-workflows[bot] commented 4 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

david883 commented 4 months ago

Still an Issue

lvanhelden commented 1 month ago

Still no fix for this?