Coder Social home page Coder Social logo

python-zenoss's People

Contributors

carsongee avatar iamseth avatar tcaiazza avatar zen42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-zenoss's Issues

SSL: CERTIFICATE_VERIFY_FAILED

requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)

How to run request with verify=False ?

Installation error for 0.6.3

Hi There,
as of today, 11/09/2016, I have problem installing the package.
using pip failed at copying 'LICENSE.txt' :
........

running install_data

error: can't copy 'LICENSE.txt': doesn't exist or not a regular file


Cleaning up...
Command /usr/bin/python2.7 -c "import setuptools, tokenize;file='/tmp/pip_build_root/zenoss/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-vH0qAV-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/zenoss
Storing debug log for failure in /root/.pip/pip.log

Manual install --
running install_data
error: can't copy 'list_devices.py': doesn't exist or not a regular file

workaround:
I have to modify the 'setup.py' file with below change, then manual install succeeded:
From:
data_files = [('', ['LICENSE.txt']),('', ['README.md']),('examples', ['list_devices.py']),]
To:
data_files = [('', ['LICENSE.txt']),('', ['README.md']),('examples','', ['list_devices.py']),]

Can you please fix the installation issue?

Can't connect with SSL

We launched a new Zenoss instance and it now uses SSL. I'm trying to use your code to get devices from my new Zenoss instance but I keep getting this error message:

File "/usr/lib/python2.6/site-packages/requests/adapters.py", line 431, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: [Errno 1] _ssl.c:492: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

I have access to the certificate file from the new Zenoss instance and tried using it in the script but it does not work. Here is how I configured to use the certificate file:

def init(self, host, username, password, ssl_verify='/home/user/filename.cer'):
self.__host = host
self.__session = requests.Session()
self.__session.auth = (username, password)
self.__session.verify = ssl_verify
self.__req_count = 0

If I set ssl_verify equal to False the script works and pulls all the devices but does give a "InsecureRequestWarning: Unverified HTTPS request is being made." warning. I'm trying to use SSL but can't get it to work. Can you please point me in the right direction?

Thanks
Mohsin

json error message - ValueError: No JSON object could be decoded

error message using example function to list all devices in Zenoss

[test@xxxxx bin]$ ./zenoss_test.py
Traceback (most recent call last):
File "./zenoss_test.py", line 7, in
for device in zenoss.get_devices()['devices']:
File "/usr/lib/python2.6/site-packages/zenoss-0.6.2-py2.6.egg/zenoss.py", line 90, in get_devices
data=[{'uid': device_class, 'params': {}, 'limit': limit}])
File "/usr/lib/python2.6/site-packages/zenoss-0.6.2-py2.6.egg/zenoss.py", line 68, in router_request
return json.loads(response.content.decode("utf-8"))['result']
File "/usr/lib64/python2.6/json/__init
.py", line 307, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python2.6/json/decoder.py", line 319, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python2.6/json/decoder.py", line 338, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

RPS and version installed

Product: zenoss-resmgr-4.2.4 (id = zenoss-resmgr-4.2.4)
Home: /opt/zenoss
Revision: 863
Upgrading: None
Minimum: 863
Updated On: Thu Mar 10 09:06:40 2016

Would really like to use your package since it looks super useful. Any idea what this means?

Thanks

Ed

Get RRD Data for a period

Hi I would like to get the raw RRD Data as an input to my nvd3 visualisation.
I used the _rrd_request method but it returns only one value instead of retuning a time series values. Can some one point me on the right direction?. Is there any other method available?

Zenoss 5 Support?

We have a functional Zenoss 5.1.5 installation... I have been trying to get even a basic device list out of this module, but it's not working at all...

from getpass import getpass
from zenoss import Zenoss

password = getpass('Zenoss password for mpenning: ')
zz = Zenoss('https://zenoss.mycompany.local/', 'mpenning', password,
    ssl_verify=False)
print zz.get_devices('/zport/dmd/Devices/Network/Switch/')

Running this with valid credentials returns nothing... I just get:

ValueError: No JSON object could be decoded

I know there were some REST API changes between Zenoss4 and Zenoss5... was this module only coded and tested against Zenoss4?

Additional files to PyPI released tarball

Hey!
there are several files in git which are missing in the tarball released on PyPI: most importantly LICENSE.txt, but then also tests, examples and maybe README.md and requirements.txt would be helpful.

the absence of the license file, and the fact the license is not explicitly stated anywhere in the pypi tarball, makes it a rather important bug.

thanks for considering

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.