{ "info": { "author": "Steve McMaster", "author_email": "mcmaster@hurricanelabs.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: System :: Systems Administration" ], "description": "Pycinga |Docs| |Build Status| |codecov.io|\n==========================================\n\nPycinga is a simple Python library meant to make writing\n`Icinga `_ plugins much easier. Icinga\nplugins have `quite a few guidelines `_\nto adhere to, and Pycinga provides helpers to make this\neasy.\n\nInstall\n-------\n\nTo install, simply use ``pip`` or ``easy_install``::\n\n pip install pycinga\n\nDocumentation\n-------------\n\nDocumentation for the latest version can always be found at\n`http://pycinga.readthedocs.io/en/latest `_.\n\nFeatures\n--------\n\nThe core features supported by Pycinga:\n\n- Parsing command line arguments such that the standard expected\n arguments (such as ``-H``, ``-w``, ``-c``) are accepted.\n- Returning proper POSIX exit code based on status.\n- Parsing Icinga range formats (such as \"@10:20\", \"~:50\", \"10\", etc.)\n- Outputting status and message.\n- Outputting performance data.\n\nExample\n-------\n\nWhat all these features result in is a concise, simple, and\nguidelines-compliant Python-based Icinga plugin::\n\n from pycinga import Plugin\n\n class UserCheck(Plugin):\n \"\"\"\n Icinga plugin to check how many users are logged into this\n machine.\n \"\"\"\n\n def check(self):\n # Get the number of logged in users, for now we hardcode\n users = 27\n\n # Build a response and exit. This `response_for_value` automatically\n # creates a response with the proper status given the value and the\n # warning/critical ranges passed in via the command line.\n response = self.response_for_value(users, \"%d users\" % users)\n response.set_perf_data(\"users\", users)\n response.set_perf_data(\"another metric\", 27, \"MB\")\n return response\n\n if __name__ == '__main__':\n # Build the plugin instance and run it. This will also parse\n # command line arguments by default.\n UserCheck().check().exit()\n\nWhile the above example subclasses ``Plugin``, you're of course welcome\nto simply call `Plugin`s methods directly and build a ``Response``\nyourself.\n\n\n.. |Docs| image:: https://readthedocs.org/projects/pycinga/badge/?version=latest\n :target: http://pycinga.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n.. |Build Status| image:: https://travis-ci.org/HurricaneLabs/python-pycinga.svg?branch=master\n :target: https://travis-ci.org/HurricaneLabs/python-pycinga\n.. |codecov.io| image:: https://codecov.io/gh/HurricaneLabs/python-pycinga/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/HurricaneLabs/python-pycinga", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hurricanelabs/python-pycinga", "keywords": "nagios,pynagios,icinga,pycinga,monitoring", "license": "MIT License", "maintainer": "Steve McMaster", "maintainer_email": "mcmaster@hurricanelabs.com", "name": "pycinga", "package_url": "https://pypi.org/project/pycinga/", "platform": "", "project_url": "https://pypi.org/project/pycinga/", "project_urls": { "Homepage": "https://github.com/hurricanelabs/python-pycinga" }, "release_url": "https://pypi.org/project/pycinga/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "Python library to write Icinga plugins.", "version": "1.0.1" }, "last_serial": 5461684, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "7a68141fe664a4db0abf34beaf5067ea", "sha256": "59d6bc99ef3d20f487bfc3a8114ace969d2db82f4e87340887e42f453d06267f" }, "downloads": -1, "filename": "pycinga-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7a68141fe664a4db0abf34beaf5067ea", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13512, "upload_time": "2017-12-09T22:25:05", "url": "https://files.pythonhosted.org/packages/b4/6f/a41a3b62fe14adf228d2f636005c408a14ec05feac4bbb1c63e8912d2c68/pycinga-1.0.0-py2.py3-none-any.whl" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "c23a305f50adf11d33ee332d9a373957", "sha256": "68f31ea79e6c67bf85fd238fd812ba21581a610d47c5dd50f088f82b6002230f" }, "downloads": -1, "filename": "pycinga-1.0.1.tar.gz", "has_sig": false, "md5_digest": "c23a305f50adf11d33ee332d9a373957", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10783, "upload_time": "2019-06-28T13:32:27", "url": "https://files.pythonhosted.org/packages/78/34/853f4180e057d6012a3aeb93210927686fcb59276674ed7e26899138b975/pycinga-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c23a305f50adf11d33ee332d9a373957", "sha256": "68f31ea79e6c67bf85fd238fd812ba21581a610d47c5dd50f088f82b6002230f" }, "downloads": -1, "filename": "pycinga-1.0.1.tar.gz", "has_sig": false, "md5_digest": "c23a305f50adf11d33ee332d9a373957", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10783, "upload_time": "2019-06-28T13:32:27", "url": "https://files.pythonhosted.org/packages/78/34/853f4180e057d6012a3aeb93210927686fcb59276674ed7e26899138b975/pycinga-1.0.1.tar.gz" } ] }