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

Fix creating LLD rule #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix creating LLD rule #65

wants to merge 1 commit into from

Conversation

varuzam
Copy link

@varuzam varuzam commented Oct 31, 2024

This PR fixes such errors

$  ./prepare.py -v
Connected to Zabbix API v.7.0.5
...
Traceback (most recent call last):
  File "/home/user/work/zabbix-threat-control/./prepare.py", line 652, in <module>
    create_hosts()
  File "/home/user/work/zabbix-threat-control/./prepare.py", line 231, in create_hosts
    create_zbx_host(
  File "/home/user/work/zabbix-threat-control/./prepare.py", line 136, in create_zbx_host
    lld_id = zapi.discoveryrule.create(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/work/zabbix-threat-control/.venv/lib/python3.12/site-packages/pyzabbix/__init__.py", line 217, in fn
    return self.parent.do_request(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/work/zabbix-threat-control/.venv/lib/python3.12/site-packages/pyzabbix/__init__.py", line 196, in do_request
    raise ZabbixAPIException(msg, response_json['error']['code'], error=response_json['error'])
pyzabbix.ZabbixAPIException: ('Error -32602: Invalid params., Invalid parameter "/1": unexpected parameter "units".', -32602)

and

...
 File "/home/user/work/zabbix-threat-control/.venv/lib/python3.12/site-packages/pyzabbix/__init__.py", line 196, in do_request
    raise ZabbixAPIException(msg, response_json['error']['code'], error=response_json['error'])
pyzabbix.ZabbixAPIException: ('Error -32602: Invalid params., Invalid parameter "/1": unexpected parameter "value_type".', -32602)

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

Successfully merging this pull request may close these issues.

1 participant