/usr/share/pyshared/python_mk_livestatus-0.2.egg-info is in python-mk-livestatus 0.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | Metadata-Version: 1.1
Name: python-mk-livestatus
Version: 0.2
Summary: Helps to query MK livestatus and return results as dictionaries
Home-page: https://github.com/arthru/python-mk-livestatus
Author: Michael Fladischer
Author-email: michael@fladi.at
License: BSD
Download-URL: http://pypi.python.org/pypi/python-mk-livestatus
Description: Python MK Livestatus parser
===========================
:Author: Michael Fladischer
:Version: 0.2
.. contents::
Access the data returned from MK Livestatus queries as Python lists or dictionaries.
It does this by sending queries to the MK Livestatus UNIX socket and parses the returned rows.
Read/write permission to the UNIX socket are required.
Usage
-----
Here a simple example to fetch the name and hostgroups for all servers in the UP (0) state:
>>> from mk_livestatus import Socket
>>> s = Socket("/var/lib/icinga/rw/live")
>>> q = s.hosts.columns('name', 'groups').filter('state = 0')
>>> print q
GET hosts
Columns: name groups
Filter: state = 0
>>> q.call()
[{'name': 'example.com', 'groups': ['ssh', 'snmp', 'smtp-server', 'ping-server', 'http-server', 'debian-server', 'apache2']}]
``s.hosts`` returns a Query to the ``hosts`` resources on Nagios. The ``columns`` and ``filter`` methods modify our query and return it, so we can chain the calls. The call to `call` method returns the rows as a list of dictionaries.
If you use xinetd to bind the Unix socket to a TCP socket (like explained `here <http://mathias-kettner.de/checkmk_livestatus.html#Livestatus%20via%20xinetd>`_), you can create the socket like :
>>> s = Socket(('192.168.1.1', 6557))
For more information please visit the `python-mk-livestatus website`_. Information about MK Livestatus and it's query syntax is available at the `mk-livestatus website`_.
.. _python-mk-livestatus website: https://github.com/arthru/python-mk-livestatus
.. _mk-livestatus website: http://mathias-kettner.de/checkmk_livestatus.html
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Monitoring
|