Anyone please ?
On Sunday, April 29, 2018 at 3:27:40 PM UTC+3, Jeremie Levy wrote:
>
> Hi
> Trying to send request to my internal zabbix server and i get this error -
> if anyone knows how to fix it.
>
> # pip list |grep zabbix
> zabbix-api 0.5.3
>
>
>
> # ansible-playbook qb-agent-fw.yml --limit hasgqba025.DOMAIN -vvvv
> ansible-playbook 2.5.0
>
> config file = /ansible/scripts/ansible.cfg
>
> configured module search path = [u
> '/usr/local/lib/python2.7/dist-packages/ara/plugins/modules']
>
> ansible python module location = /usr/lib/python2.7/dist-packages/ansible
>
> executable location = /usr/bin/ansible-playbook
>
> python version = 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0
> 20160609]
> Using /ansible/scripts/ansible.cfg as config file
>
> setting up inventory plugins
>
> Parsed /ansible/scripts/inventory/windows.yml inventory source with yaml
> plugin
> Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2
> .7/dist-packages/ansible/plugins/callback/default.pyc
> Loading callback plugin ara of type notification, v2.0 from /usr/local/lib
> /python2.7/dist-packages/ara/plugins/callbacks/log_ara.pyc
>
>
> TASK [common : add host to zabbix server]
> **********************************************************************************************************************************************************************************************************************************************************
> task path: /nfs/iil/disks/eis/ansible/scripts/roles/common/tasks/zabbix.
> yml:2
>
>
> Using module file /usr/lib/python2.7/dist-packages/ansible/modules/
> monitoring/zabbix/zabbix_host.py
>
>
> <localhost> ESTABLISH LOCAL CONNECTION FOR USER: sys_ansible
>
>
>
> <localhost> EXEC /bin/sh -c 'echo ~ && sleep 0'
>
>
>
> <localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo
> /nfs/site/home/sys_ansible/.ansible/tmp/ansible-tmp-1524991995.58-156273026676281
>
> `" && echo ansible-tmp-1524991995.58-156273026676281="` echo
> /nfs/site/home/sys_ansible/.ansible/tmp/ansible-tmp-1524991995.58-156273026676281
>
> `" ) && sleep 0'
>
>
>
> <localhost> PUT /nfs/site/home/sys_ansible/.ansible/tmp/ansible-local-
> 37581eafvWL/tmpU8jpCH TO /nfs/site/home/sys_ansible/.ansible/tmp/ansible-
> tmp-1524991995.58-156273026676281/zabbix_host.py
>
> <localhost> EXEC /bin/sh -c 'chmod u+x
> /nfs/site/home/sys_ansible/.ansible/tmp/ansible-tmp-1524991995.58-156273026676281/
>
> /nfs/site/home/sys_ansible/.ansible/tmp/ansible-tmp-1524991995.58-156273026676281/zabbix_host.py
>
> && sleep 0'
> <localhost> EXEC /bin/sh -c '/usr/bin/python
> /nfs/site/home/sys_ansible/.ansible/tmp/ansible-tmp-1524991995.58-156273026676281/zabbix_host.py
>
> && sleep 0'
>
> <localhost> EXEC /bin/sh -c 'rm -f -r
> /nfs/site/home/sys_ansible/.ansible/tmp/ansible-tmp-1524991995.58-156273026676281/
>
> > /dev/null 2>&1 && sleep 0'
>
>
> The full traceback is:
>
>
>
> File "/tmp/ansible_Yqkkau/ansible_module_zabbix_host.py", line 704, in
> main
>
>
> zbx.login(login_user, login_password)
>
>
>
> File "/usr/local/lib/python2.7/dist-packages/zabbix_api.py", line 207,
> in login
>
>
> result = self.do_request(obj)
>
>
>
> File "/usr/local/lib/python2.7/dist-packages/zabbix_api.py", line 255,
> in do_request
>
>
> raise APITimeout("HTTP read timeout",)
>
>
>
>
>
> fatal: [hasgqba025.DOMAIN -> localhost]: FAILED! => {
> "changed": false,
> "invocation": {
> "module_args": {
> "description": "hasgqba025.DOMAIN",
> "force": true,
> "host_groups": [
> "CI_Windows_QuickBuild_Agents"
> ],
> "host_name": "hasgqba025.DOMAIN",
> "http_login_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
> "http_login_user": "sys_ansible",
> "interfaces": [
> {
> "dns": "hasgqba025.DOMAIN",
> "ip": "10.0.0.1",
> "main": 1,
> "port": 10050,
> "type": "agent",
> "useip": 0
> }
> ],
> "inventory_mode": "automatic",
> "inventory_zabbix": null,
> "ipmi_authtype": null,
> "ipmi_password": null,
> "ipmi_privilege": null,
> "ipmi_username": null,
> "link_templates": [
> "win_qb_agent"
> ],
> "login_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
> "login_user": "sys_ansible",
> "proxy": null,
> "server_url": "http://zabbix.COMPANY.com/zabbix",
> "state": "present",
> "status": "enabled",
> "timeout": 10,
> "tls_accept": 1,
> "tls_connect": 1,
> "tls_issuer": null,
> "tls_psk": null,
> "tls_psk_identity": null,
> "tls_subject": null,
> "validate_certs": true,
> "visible_name": "hasgqba025.DOMAIN"
> }
> },
> "msg": "Failed to connect to Zabbix server: HTTP read timeout"
> }
>
>
>
>
>
>
>
>
>
> Here is my code:
> - name: add host to zabbix server
> local_action:
> module: zabbix_host
> server_url: http://zabbix.company.com/zabbix
> login_user: sys_ansible
> login_password: '{{ ansible_become_password }}'
> http_login_user: sys_ansible
> http_login_password: '{{ ansible_become_password }}'
> host_name: '{{ ansible_fqdn }}'
> visible_name: '{{ ansible_fqdn }}'
> description: '{{ ansible_fqdn }}'
> host_groups:
> - '{{ zabbix_grp }}'
> link_templates:
> - '{{ zabbix_tmplt }}'
> status: enabled
> state: present
> inventory_mode: automatic
> # inventory_zabbix:
> # tag: "{{ your_tag }}"
> # alias: "{{ your_alias }}"
> # notes: "Special Informations: {{ your_informations | default('None') }}"
> # location: "{{ your_location }}"
> # site_rack: "{{ your_site_rack }}"
> # os: "{{ your_os }}"
> # hardware: "{{ your_hardware }}"
> # ipmi_authtype: 2
> # ipmi_privilege: 4
> # ipmi_username: username
> # ipmi_password: password
> interfaces:
> - type: agent
> main: 1
> useip: 0
> ip: '{{ ansible_ip_addresses[0] }}'
> dns: '{{ ansible_fqdn }}'
> port: 10050
>
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/29fc8cca-5bf6-42f0-99b1-0898a226bfb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.