I have used the lukecyca pyzabbix package for years, but just hit a possible bug, I happened to see on the Zabbix integrations page that their recommended package is the abubkov/py-zabbix. I wonder why that one is recommended, the lukecyca seems more popular.
Ad Widget
Collapse
Which python API module?
Collapse
X
-
Please tell more about the possible bug.
There is even discussion in GitHub issue that the packages are maybe merging: https://github.com/lukecyca/pyzabbix/issues/164
pyzabbix does not have a sender, maybe that's why Zabbix is "recommending" py-zabbix. (Yes, I hate that py-zabbix managed to select the same pyzabbix namespace...)
(And yes I'm using pyzabbix in my current projects)
Markku -
I just opened an issue on the lukecyca project. I'm trying to httptest.create with a longer name than I'd ever had before. This name is 68 characters long and I got errorI can create the web test via the Zabbix frontend, so it looks like a limit in the module, not Zabbix.HTML Code:pyzabbix.api.ZabbixAPIException: ('Error -32602: Invalid params., Invalid parameter "/1/name": value is too long.', -32602)Comment
-
z_url sanitized =API call: minimally sanitized, no guarantee on the indention here, this worked with shorter url's.Code:http://xxx-yyy-main.zzzz.zzzzzzzz.zzz/installation/default-en-US.htm
Code:web_resp = zapi.httptest.create( { "name": z_url, "hostid": hostId, "delay": "240", "verify_host": "1", "verify_peer": "1", "steps": [ { "name": "s1", "url": z_url, "status_codes": "200", "no": "1", } ], "tags": [ {"tag": "Some Tag1", "value": "urlpath"}, {"tag": "Application", "value": "Local Preciousness"}, ], } )​Last edited by LenR; 07-12-2022, 19:29.Comment
-
Have you tried
a) creating the "long" test in curl? That would mean that API is working but pyzabbix is not
​
b) creating the "long" test in GUI, reading it with pyzabbix, deleting in GUI, and recreating the test with the saved data in pyzabbix? (That would ensure that your input data is otherwise correct for the case)
Markku
Comment

Comment