{ "info": { "author": "Shawn Seymour", "author_email": "shawn@devshawn.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: MacOS", "Operating System :: Unix", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# zookeeper-healthcheck\n\n[![Build Status](https://travis-ci.org/devshawn/zookeeper-healthcheck.svg?branch=master)](https://travis-ci.org/devshawn/zookeeper-healthcheck) ![PyPI](https://img.shields.io/pypi/v/zookeeper-healthcheck.svg?color=blue) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/zookeeper-healthcheck.svg) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n\nA simple healthcheck wrapper to monitor ZooKeeper.\n\nZooKeeper Healthcheck is a simple server that provides a singular API endpoint to determine the health of a ZooKeeper instance. This can be used to alert or take action on unhealthy ZooKeeper instances.\n\nThe service checks the health by sending `netcat` commands as well as checking that ZooKeeper is in a desired mode. It utilizes the commands `echo ruok | nc zookeeper-host zookeeper-port` and `echo stat | nc zookeeper-host zookeeper-port | grep Mode` to do so.\n\nBy default, the root endpoint `/` will return `200 OK` healthy if ZooKeeper responds `imok` and is in mode `leader` or `follower`. It will return `503 Service Unavailable` if ZooKeeper does not respond with `imok` or if its in an undesired mode (by default `standalone`).\n\n## Usage\nZooKeeper Healthcheck can be installed via `pip`. Both `python` and `pip` are required, as well as `echo`, `nc` and `grep`. \n\n### Command-Line\nInstall `zookeeper-healthcheck` via `pip`:\n\n```bash\npip install zookeeper-healthcheck\n```\n\nTo start the healthcheck server, run:\n\n```bash\nzookeeper-healthcheck\n```\n\nThe server will now be running on [localhost:12181][localhost].\n\n## Configuration\nZooKeeper Healthcheck can be configured via command-line arguments or by environment variables. \n\n#### Port\nThe port for the `zookeeper-healthcheck` API.\n\n| Usage | Value |\n|-----------------------|--------------------|\n| Environment Variable | `HEALTHCHECK_PORT` |\n| Command-Line Argument | `--port` |\n| Default Value | `12181` |\n\n#### ZooKeeper Host\nThe host of the ZooKeeper instance to run the health check against. This is used with `nc`.\n\n| Usage | Value |\n|-----------------------|------------------------------|\n| Environment Variable | `HEALTHCHECK_ZOOKEEPER_HOST` |\n| Command-Line Argument | `--zookeeper-host` |\n| Default Value | `localhost` |\n\n#### ZooKeeper Port\nThe port of the ZooKeeper instance to run the health check against. This is used with `nc`.\n\n| Usage | Value |\n|-----------------------|------------------------------|\n| Environment Variable | `HEALTHCHECK_ZOOKEEPER_PORT` |\n| Command-Line Argument | `--zookeeper-port` |\n| Default Value | `2181` |\n\n#### Healthy Modes\nA comma-separated list of ZooKeeper modes to be marked as healthy. Any modes not in this list will mark ZooKeeper as unhealthy. \n\n| Usage | Value |\n|-----------------------|---------------------------------------------|\n| Environment Variable | `HEALTHCHECK_HEALTHY_MODES` |\n| Command-Line Argument | `--healthy-modes` |\n| Default Value | `leader,follower` |\n| Valid Values | `leader`, `follower`, `standalone` |\n\n#### Log Level\nThe level of logs to be shown by the application.\n\n| Usage | Value |\n|-----------------------|---------------------------------------------|\n| Environment Variable | `HEALTHCHECK_LOG_LEVEL` |\n| Command-Line Argument | `--log-level` |\n| Default Value | `INFO` |\n| Valid Values | `DEBUG`, `INFO`, `WARNING`, `ERROR` |\n\nAll healthy responses are logged at `INFO`. Unhealthy responses are logged at `WARNING`. Any unexpected errors are logged at `ERROR`.\n\n## License\nCopyright (c) 2019 Shawn Seymour.\n\nLicensed under the [Apache 2.0 license][license].\n\n[localhost]: http://localhost:12181\n[license]: LICENSE\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/devshawn/zookeeper-healthcheck", "keywords": "zookeeper,health,healthcheck,wrapper,monitor", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "zookeeper-healthcheck", "package_url": "https://pypi.org/project/zookeeper-healthcheck/", "platform": "", "project_url": "https://pypi.org/project/zookeeper-healthcheck/", "project_urls": { "Homepage": "https://github.com/devshawn/zookeeper-healthcheck" }, "release_url": "https://pypi.org/project/zookeeper-healthcheck/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "A simple healthcheck wrapper to monitor zookeeper.", "version": "0.0.1" }, "last_serial": 5178626, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "92336876d97ca8a3eac344a8b441768d", "sha256": "e6320f0a1df567107cd8b008b6751062fb7ec78d7c90f489d6d689340509e000" }, "downloads": -1, "filename": "zookeeper_healthcheck-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "92336876d97ca8a3eac344a8b441768d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12815, "upload_time": "2019-04-23T18:06:29", "url": "https://files.pythonhosted.org/packages/83/8e/cf2bc57d4fc9e1d0d6c8ae238ba8ea70c82ad7a7ede2f8b7338c58ab55ba/zookeeper_healthcheck-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6f52e5d1427b05ac076916bbacf4384a", "sha256": "361b96b45ed5b8e82fd2ec30af1aa5f24767a90e07facd35742ba10e1fba8dc5" }, "downloads": -1, "filename": "zookeeper-healthcheck-0.0.1.tar.gz", "has_sig": false, "md5_digest": "6f52e5d1427b05ac076916bbacf4384a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5833, "upload_time": "2019-04-23T18:06:32", "url": "https://files.pythonhosted.org/packages/e3/57/64f274eeaa4960fa08e39f0972bda3e4149cd5e60d97106c37b5ed760b41/zookeeper-healthcheck-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "92336876d97ca8a3eac344a8b441768d", "sha256": "e6320f0a1df567107cd8b008b6751062fb7ec78d7c90f489d6d689340509e000" }, "downloads": -1, "filename": "zookeeper_healthcheck-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "92336876d97ca8a3eac344a8b441768d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12815, "upload_time": "2019-04-23T18:06:29", "url": "https://files.pythonhosted.org/packages/83/8e/cf2bc57d4fc9e1d0d6c8ae238ba8ea70c82ad7a7ede2f8b7338c58ab55ba/zookeeper_healthcheck-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6f52e5d1427b05ac076916bbacf4384a", "sha256": "361b96b45ed5b8e82fd2ec30af1aa5f24767a90e07facd35742ba10e1fba8dc5" }, "downloads": -1, "filename": "zookeeper-healthcheck-0.0.1.tar.gz", "has_sig": false, "md5_digest": "6f52e5d1427b05ac076916bbacf4384a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5833, "upload_time": "2019-04-23T18:06:32", "url": "https://files.pythonhosted.org/packages/e3/57/64f274eeaa4960fa08e39f0972bda3e4149cd5e60d97106c37b5ed760b41/zookeeper-healthcheck-0.0.1.tar.gz" } ] }