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

Hi :) #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Hi :) #4

wants to merge 2 commits into from

Conversation

andyzasl
Copy link

I've find an issue and fixed it. The problem raises when running sync_host against already hosts, which already exists.

failed: [111.11.11.11] => {"failed": true, "parsed": false} Traceback (most recent call last): File "/root/.ansible/tmp/ansible-tmp-1432113100.98-34784592966175/zabbix-api", line 2205, in <module> main() File "/root/.ansible/tmp/ansible-tmp-1432113100.98-34784592966175/zabbix-api", line 576, in main templates, File "/root/.ansible/tmp/ansible-tmp-1432113100.98-34784592966175/zabbix-api", line 385, in sync_host self.__compare_ip(hostdump, ip) File "/root/.ansible/tmp/ansible-tmp-1432113100.98-34784592966175/zabbix-api", line 312, in __compare_ip if interface['main'] == '1': TypeError: string indices must be integers

@r0bj
Copy link
Owner

r0bj commented May 20, 2015

Thanks @andyzasl
Unfortunately I cannot replicate this issue. What version of zabbix do you use? Could you provide a xml dump of host causing this issue?

In my case hostdump['interfaces'] is a list (not dict) so index iteration is a proper one.

@andyzasl
Copy link
Author

I have 2.0.11
Code was ran under python 2.7

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.

2 participants