{ "info": { "author": "Fr\u00e9d\u00e9ric MOHIER", "author_email": "frederic.mohier@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Natural Language :: English", "Programming Language :: Python", "Topic :: System :: Monitoring", "Topic :: System :: Systems Administration" ], "description": "Alignak checks package example\r\n==================================\r\n\r\nThis project is an example and a how-to build a checks pack for Alignak monitoring framework.\r\n\r\n\r\nPackaging\r\n----------------------------------------\r\n\r\nRepositories\r\n~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nAll Alignak packs are stored in their own repository in the `Alignak monitoring contrib`_ Github organization.\r\n\r\n\r\nDesign and principles\r\n~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nEach pack aims to provide all necessary elements in the Alignak configuration to monitor hosts and/or services.\r\nEach pack include the checks commands definitions, services templates, hosts templates, ...\r\nIt is even possible to include the monitoring plugins that will be run by Alignak to check an host/service.\r\n\r\nUsually, the packs are only made of configuration files using the most common monitoring plugins available from the Nagios community.\r\n\r\nThe pack files are to be made available in the monitoring objects configuration directory and provide configuration utilities for the end-user:\r\n\r\n* hosts templates: the host \"use\" the pack features\r\n* services templates: the service \"use\" the pack features\r\n* ...\r\n\r\nThe proposed structure to build a pack:\r\n\r\n* all the checks packs are named as ``alignak_checks_EXAMPLE``\r\n* the ``EXAMPLE`` repository is named as ``alignak-checks-EXAMPLE``\r\n* the ``EXAMPLE`` repository includes the following files:\r\n * README.rst\r\n * LICENCE (optional)\r\n * AUTHORS (optional)\r\n * MANIFEST.in\r\n * setup.py\r\n\r\n* the ``EXAMPLE`` repository includes an ``alignak_checks_EXAMPLE`` directory containing the pack configuration files\r\n* the files in ``alignak_checks_EXAMPLE`` directory will be copied to the Alignak configuration\r\n* the files in ``alignak_checks_EXAMPLE/plugins`` directory will be copied to the Alignak plugins directory\r\n* the files in ``alignak_checks_EXAMPLE/etc`` directory will be copied to the Alignak etc directory\r\n\r\nYou are allowed to declare variables in the packs files. Thos variables will be valued after pack installation.\r\n All the files which name end with ``.parse`` will be parsed after installation to update their content to the Alignak installation paths.\r\nThe searched patterns are:\r\n\r\n* $ETC: will be replaced with the Alignak configuration files path (*/etc/alignak*)\r\n* $VAR: will be replaced with the Alignak lib files path (*/var/lib/alignak*)\r\n* $RUN: will be replaced with the Alignak run files path (*/var/run/alignak*)\r\n* $BIN: will be replaced with the Alignak log files path (*/usr/bin*)\r\n* $LOG: will be replaced with the Alignak log files path (*/var/log/alignak*)\r\n* $ALIGNAKUSER: will be replaced with the Alignak user account name (*alignak*)\r\n* $ALIGNAKGROUP: will be replaced with the Alignak group name (*alignak*)\r\n\r\n**Note**: the replacement is based on Python Template strings. As of it, $ETC is the simplest form and may be replaced with ${ETC} if necessary.\r\n\r\n\r\n\r\n\r\nRepository example\r\n~~~~~~~~~~~~~~~~~~~~~~~\r\nRepository directories and files example:\r\n::\r\n README.rst\r\n LICENCE\r\n AUTHORS\r\n MANIFEST.in\r\n setup.py\r\n\r\n alignak_checks_EXAMPLE/\r\n etc/\r\n test.cfg\r\n plugins/\r\n sub/\r\n plugin.conf\r\n plugin.py\r\n templates.cfg\r\n services.cfg\r\n commands.cfg\r\n\r\nThe content of the directory ``alignak_checks_EXAMPLE`` (including sub directories and except *etc* and *plugins*) will be copied to */var/lib/alignak/libexec*.\r\n\r\nThe content of the directory ``alignak_checks_EXAMPLE/plugins`` (including sub directories) will be copied to */var/lib/alignak/libexec*.\r\n\r\nThe content of the directory ``alignak_checks_EXAMPLE/etc`` (including sub directories) will be copied to */etc/alignak*.\r\n\r\n\r\nBuilding\r\n~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nTo build a new package EXAMPLE2:\r\n\r\n* create a new ``alignak-checks-EXAMPLE2`` repository which is a copy of this repository\r\n\r\n * rename the ``alignak_checks_EXAMPLE`` directory to ``alignak_checks_EXAMPLE2``\r\n\r\n* update the ``MANIFEST.in`` file\r\n\r\n * search and replace ``EXAMPLE`` with ``EXAMPLE2`` in the ``MANIFEST.in`` file\r\n\r\n* update the ``README.rst`` file\r\n\r\n * remove this section **Packaging**\r\n * search and replace ``EXAMPLE`` with ``EXAMPLE2``\r\n * complete the **Documentation** chapter\r\n\r\n* update the ``alignak_checks_EXAMPLE2/__init.py__`` file with all the package information\r\n\r\n * ``__checks_type__`` will be used to complete the keywords in PyPI and as the sub-directory to store the pack's files\r\n * the file docstring will be used as the package description in PyPI\r\n\r\n* update the ``setup.py`` file\r\n\r\n * search and replace ``EXAMPLE`` with ``EXAMPLE2``\r\n * ``setup.py`` should not be modified for most of the packs ... if necessary, do it with much care!\r\n\r\nAnd that's it!\r\n\r\nThen, to build and make your package available to the community, you must use the standard Python setuptools:\r\n\r\n* run ``setup.py register`` to register the new package near PyPI\r\n* run ``setup.py sdist`` to build the package\r\n* run ``setup.py develop`` to make the package installed locally (development mode)\r\n* run ``setup.py develop --uninstall`` to remove the development mode\r\n* run ``setup.py install --dry-run`` to test the package installation (checks which and where the files are installed)\r\n\r\nWhen your package is ready and functional:\r\n\r\n* run ``setup.py sdist upload`` to upload the package to `PyPI repository`_.\r\n\r\n**Note**: every time you upload a package to PyPI you will need to change the package version in the ``alignak_checks_EXAMPLE2/__init.py__`` file.\r\n\r\nInstallation\r\n----------------------------------------\r\n\r\nThe pack configuration files are to be copied to the monitoring objects configuration directory. The most suitable location is the *arbiter_cfg/objects/packs/* directory in the main alignak configuration directory.\r\n\r\n**Note**: The main Alignak configuration directory is usually */usr/local/etc/alignak* or */etc/alignak* but it may depend upon your system and/or your installation.\r\n\r\nThe pack plugins (if any ...) are to be copied to the executable libraries directories.\r\n\r\n**Note**: The Alignak librairies directory is usually */usr/local/libexec/alignak* or */var/lib/alignak* but it may depend upon your system and/or your installation.\r\n\r\nFrom PyPI\r\n~~~~~~~~~~~~~~~~~~~~~~~\r\nTo install the package from PyPI:\r\n::\r\n pip install alignak-checks-EXAMPLE\r\n\r\n\r\nFrom source files\r\n~~~~~~~~~~~~~~~~~~~~~~~\r\nTo install the package from the source files:\r\n::\r\n git clone https://github.com/Alignak-monitoring/alignak-checks-EXAMPLE\r\n cd alignak-checks-EXAMPLE\r\n mkdir /usr/local/etc/alignak/arbiter_cfg/objects/packs/EXAMPLE\r\n # Copy configuration files\r\n cp -R alignak_checks_EXAMPLE/*.cfg /usr/local/etc/alignak/arbiter_cfg/objects/packs/EXAMPLE\r\n # Copy plugin files\r\n cp -R alignak_checks_EXAMPLE/plugins/*.py /usr/local/libexec/alignak\r\n\r\n\r\nDocumentation\r\n----------------------------------------\r\n\r\nTo be completed\r\n\r\n\r\nBugs, issues and contributing\r\n----------------------------------------\r\n\r\nContributions to this project are welcome and encouraged ... issues in the project repository are the common way to raise an information.\r\n\r\nLicense\r\n----------------------------------------\r\n\r\nAlignak Pack EXAMPLE is available under the `GPL version 3 license`_.\r\n\r\n.. _GPL version 3 license: http://opensource.org/licenses/GPL-3.0\r\n.. _Alignak monitoring contrib: https://github.com/Alignak-monitoring-contrib\r\n.. _PyPI repository: ", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Alignak-monitoring-contrib/alignak-checks-example", "keywords": "alignak monitoring pack checks EXAMPLE", "license": "GNU Affero General Public License, version 3", "maintainer": null, "maintainer_email": null, "name": "alignak_checks_EXAMPLE", "package_url": "https://pypi.org/project/alignak_checks_EXAMPLE/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/alignak_checks_EXAMPLE/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Alignak-monitoring-contrib/alignak-checks-example" }, "release_url": "https://pypi.org/project/alignak_checks_EXAMPLE/0.2.2/", "requires_dist": null, "requires_python": null, "summary": "Alignak - Example and how-to build a checks pack for Alignak monitoring framework.", "version": "0.2.2" }, "last_serial": 4195031, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "e164c4ec00d32e465a6b8a1a2f95914a", "sha256": "b7216e0d2e35b7a6d88ea8843d08c51863f8b8d83cb0dfa9fe000a3996016761" }, "downloads": -1, "filename": "alignak_checks_EXAMPLE-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e164c4ec00d32e465a6b8a1a2f95914a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19757, "upload_time": "2015-11-21T16:56:53", "url": "https://files.pythonhosted.org/packages/c5/b5/6f01aa1df7cc88c5cd923e5a72a161cdd66ace709a1554df291d1d74085c/alignak_checks_EXAMPLE-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "0c8ac4f7d689357d84e654c7e8ab75cc", "sha256": "889b9f3f2e66849f38c4536777ad8414d9e29160f4fd1bb459bd145de6757efd" }, "downloads": -1, "filename": "alignak_checks_EXAMPLE-0.2.1.tar.gz", "has_sig": false, "md5_digest": "0c8ac4f7d689357d84e654c7e8ab75cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19759, "upload_time": "2015-11-22T09:37:51", "url": "https://files.pythonhosted.org/packages/ac/d3/86acd9ef3d962eed5bae62fc314ec4fb228ad5e291048e8880ed9dc0a25e/alignak_checks_EXAMPLE-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "38243e33f8cd3ac8b4fe3de2d2360ac7", "sha256": "e7dddfcf02fa7e858dbba1970dc63f6cab46cb2a019869f2b9463d965e9c00e3" }, "downloads": -1, "filename": "alignak_checks_EXAMPLE-0.2.2.tar.gz", "has_sig": false, "md5_digest": "38243e33f8cd3ac8b4fe3de2d2360ac7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19782, "upload_time": "2015-11-22T11:14:39", "url": "https://files.pythonhosted.org/packages/4f/c3/01a36d6f3288fa2bb924b5db02c1333c159c7bb9c3f21ea4da749a21f970/alignak_checks_EXAMPLE-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "38243e33f8cd3ac8b4fe3de2d2360ac7", "sha256": "e7dddfcf02fa7e858dbba1970dc63f6cab46cb2a019869f2b9463d965e9c00e3" }, "downloads": -1, "filename": "alignak_checks_EXAMPLE-0.2.2.tar.gz", "has_sig": false, "md5_digest": "38243e33f8cd3ac8b4fe3de2d2360ac7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19782, "upload_time": "2015-11-22T11:14:39", "url": "https://files.pythonhosted.org/packages/4f/c3/01a36d6f3288fa2bb924b5db02c1333c159c7bb9c3f21ea4da749a21f970/alignak_checks_EXAMPLE-0.2.2.tar.gz" } ] }