Comments (11)
Hi
I am pretty sure I tested it with 2.2, so this should work with 2.4 too. Could you check you are using the 'right' zabbix python module?
Seems there are 2 with similar API. pyzabbix
and zabbix_api
. In the module the requirement is specified for zabbix_api. Please test this one first with an up to date version. But in my opinion pyzabbix should be used, it seems maintained and was updated recently.
Cloud you please test again with this infos?
from ansible-modules-extras.
Hi @resmo ,
The Ansible zabbix_maintenance module needs the zabbix-api install, if I remove zabbix-api and install pyzabbix I get :
msg: Missing requried zabbix-api module (check docs or install with: pip install zabbix-api)
By using zabbix-api I get the error :
msg: Failed to connect to Zabbix server: (u'Error -32602: Invalid params., Incorrect method "user.authenticate". while sending {"params": {"password": "zabbixpassword", "user": "zabbixuser"}, "jsonrpc": "2.0", "method": "user.authenticate", "auth": "", "id": 0}', -32602)
pyzabbix version :
pip show pyzabbix
---
Name: pyzabbix
Version: 0.7.2
Location: /usr/lib/python2.6/site-packages
Requires: requests
zabbix-api version
pip show zabbix-api
---
Name: zabbix-api
Version: 1.0
Location: /usr/lib/python2.6/site-packages
Requires:
Are you sure did you try with version 2.2 ? I found in the documentation it's mentioned the user.authenticate method is official deprecated (https://www.zabbix.com/documentation/2.0/manual/appendix/api/user/authenticate) and user.login should be used, I coulnd't find any reference for user.authenticate in documentation version 2.2 or 2.4 ...
from ansible-modules-extras.
How can I check what's the latest version of zabbix-api available ? Does anyone knows the home page of the project module ?
According to https://github.com/gnetsman/zabbix_api , it only supports Zabbix version 1.8 and 2.0 :(
from ansible-modules-extras.
@nicolas-g , I've a solution for this, but is BIZARRE. I'll try to explain:
1 - First execute this command:
$ sudo pip search zabbix
It will return a list of packages related to zabbix. In my case, it returned this list:
ludolph-zabbix - Ludolph: Zabbix API plugin
zm - Zabbix management command-line client
zabbix-api-erigones - Zabbix API Python Library
zabbix-client - Zabbix API wrapper
zabbixcli - Tool for manage zabbix templates as YAML files.
zbx-statsd - Clone of Etsy's statsd and Steve Ivy's py-statsd designed to work with Zabbix (http://www.zabbix.com/).
pyzabbix - Zabbix API Python interface
graphite-to-zabbix - This tool allow handle alerts based on graphite metrics. It works as a proxy between graphite and zabbix. It use graphite as data source and zabbix as an
alerting system.
py-zabbix - Python modules for work with zabbix.
ztc - Zabbix Template Collection
docker-zabbix-sender - Push Docker containers statistics to Zabbix efficiently
zabbixapi - a tool to communicate to zabbix
zabbix-powerline-status - Zabbix powerline extension to show current triggers
dbaas_zabbix - A Zabbix Integration for DBaaS.
zems - ZEMS (Zabbix Extended Monitoring Scripts) is a tool to retrieve all sorts of metrics from applications and deliver it to Zabbix in a generic way.
blackbird - Daemon that monitor each middleware by using ZABBIX-SENDER
zbx-dashboard - Simple Django applicattion that provides an alternative to the Zabbix screens.
zabbix-api-gnetsman - Zabbix API scripts for creation and deletion hosts
sentry-zabbix - A Sentry extension which send errors stats to Zabbix
zabbix-api - Zabbix API
INSTALLED: 1.0
LATEST: 0.4
zstat - A set of metrics to be sent to the Zabbix monitoring system
zbxsend - Module used to send metrics to Zabbix.
If you see, I've the zabbix-api 1.0 installed. Now the bizarre situation: the latest package is 0.4! So, I decide to remove and install it again:
$ sudo pip uninstall zabbix-api
Uninstalling zabbix-api:
/usr/local/lib/python2.7/dist-packages/setup.py
/usr/local/lib/python2.7/dist-packages/setup.pyc
/usr/local/lib/python2.7/dist-packages/zabbix_api-1.0.egg-info
/usr/local/lib/python2.7/dist-packages/zabbix_api.py
/usr/local/lib/python2.7/dist-packages/zabbix_api.pyc
/usr/local/lib/python2.7/dist-packages/zabbix_credentials.py
/usr/local/lib/python2.7/dist-packages/zabbix_credentials.pyc
/usr/local/lib/python2.7/dist-packages/zabbix_host_add.py
/usr/local/lib/python2.7/dist-packages/zabbix_host_add.pyc
/usr/local/lib/python2.7/dist-packages/zabbix_host_del.py
/usr/local/lib/python2.7/dist-packages/zabbix_host_del.pyc
/usr/local/lib/python2.7/dist-packages/zabbix_methods.py
/usr/local/lib/python2.7/dist-packages/zabbix_methods.pyc
Proceed (y/n)? y
Successfully uninstalled zabbix-api
$ sudo pip search zabbix
ludolph-zabbix - Ludolph: Zabbix API plugin
zm - Zabbix management command-line client
zabbix-api-erigones - Zabbix API Python Library
zabbix-client - Zabbix API wrapper
zabbixcli - Tool for manage zabbix templates as YAML files.
zbx-statsd - Clone of Etsy's statsd and Steve Ivy's py-statsd designed to work with Zabbix (http://www.zabbix.com/).
pyzabbix - Zabbix API Python interface
graphite-to-zabbix - This tool allow handle alerts based on graphite metrics. It works as a proxy between graphite and zabbix. It use graphite as data source and zabbix as an
alerting system.
py-zabbix - Python modules for work with zabbix.
ztc - Zabbix Template Collection
docker-zabbix-sender - Push Docker containers statistics to Zabbix efficiently
zabbixapi - a tool to communicate to zabbix
zabbix-powerline-status - Zabbix powerline extension to show current triggers
dbaas_zabbix - A Zabbix Integration for DBaaS.
zems - ZEMS (Zabbix Extended Monitoring Scripts) is a tool to retrieve all sorts of metrics from applications and deliver it to Zabbix in a generic way.
blackbird - Daemon that monitor each middleware by using ZABBIX-SENDER
zbx-dashboard - Simple Django applicattion that provides an alternative to the Zabbix screens.
zabbix-api-gnetsman - Zabbix API scripts for creation and deletion hosts
sentry-zabbix - A Sentry extension which send errors stats to Zabbix
zabbix-api - Zabbix API
zstat - A set of metrics to be sent to the Zabbix monitoring system
zbxsend - Module used to send metrics to Zabbix.
$ sudo pip install zabbix-api
Downloading/unpacking zabbix-api
Downloading zabbix-api-0.4.tar.gz
Running setup.py (path:/tmp/pip_build_root/zabbix-api/setup.py) egg_info for package zabbix-api
Installing collected packages: zabbix-api
Running setup.py install for zabbix-api
Successfully installed zabbix-api
Cleaning up...
Now the reported problem is solved. Maybe the package maintainer restarted his version control....
from ansible-modules-extras.
that explains everything. I was not able to reproduce. And now I see why.
from ansible-modules-extras.
@resmo . The hard part is to simulate this. I don't know how to install the version 1.0.0 (I don't know how this was installed on my desktop). But, I think this could be considered a solution for this case.
from ansible-modules-extras.
@galindro this is IMHO not ansible's business. Maybe a note in the zabbix modules would be good to inform users about this.
from ansible-modules-extras.
Agree @resmo. Could you please put this note in zabbix module?
from ansible-modules-extras.
yes, I'll take care of this.
from ansible-modules-extras.
Thanks!
from ansible-modules-extras.
closing this then as the problem seems to have been a packaging mishap of the underlying library. We'll merge in resmo's doc update to hopefully prevent other users from hitting this frustrating wall.
from ansible-modules-extras.
Related Issues (20)
- win_updates Not working on localized Windows Server 2012R2 (russian) HOT 3
- Pushover Hostname api.pushover.net:443 doesn't match HOT 2
- ipa_user: fails with 'repsonse user_mod: no modifications to be performed' if sshpubkey is an empty list and user has no public keys in FreeIPA HOT 2
- ovirt_clusters fails with 'NoneType' object has no attribute 'policy' HOT 2
- locale_gen fails with python3 HOT 1
- Region eu-west-2 missing on ansible-2.2 ec2 module HOT 1
- kubernetes library module doesn't support `apis/extensions/v1beta1/` HOT 2
- customer GW module HOT 1
- composer: Unable to use "working-dir" with spaces HOT 1
- Add instance_type to ec2_remote_facts result HOT 1
- v HOT 1
- openvswitch_bridge ansible 2.3.0 HOT 1
- win_regedit - Not adding new reg entries HOT 1
- EFS Name is blank when created with ansible efs module HOT 1
- pexpect 4.0.1 Ansible variable issue HOT 1
- module vmware_vm_facts folder HOT 1
- installing npm mongodb error HOT 3
- Ovirt_vms module to support custom VM UUID HOT 1
- vmware vsphere_guest with drs HOT 1
- Getting "HTTP Error 504": HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-modules-extras.