{
"info": {
"author": "Farzad Ghanei",
"author_email": "farzad.ghanei@byte.nl",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Networking :: Monitoring"
],
"description": "***************\nElastic Metrics\n***************\n\n\n.. image:: https://travis-ci.org/ByteInternet/elasticmetrics.svg?branch=master\n :target: https://travis-ci.org/ByteInternet/elasticmetrics\n\n\nCollect performance metrics from ElasticSearch.\n\n`elasticmetrics` is a Python library, designed to be used in different contexts and easy\nto integrate with other tools. Each step of data collection, transformation and\nreporting is defined in a separate reusable module:\n\n* `collectors`: abstract logic of collecting data.\n* `metrics`: abstract selecting and/or aggregating measurments (metrics)\n* `formatters`: transform metrics into other formats.\n* `tool`: combine the functionality of other modules to form a CLI application\n\nCollectors\n----------\n\n`collectors.ElasticSearchCollector` collects cluster and node stats by calling ElasticSearch APIs.\n\n\n.. code-block:: python\n\n from elasticmetrics.collectors import ElasticSearchCollector\n\n collector = ElasticSearchCollector('es.example.org')\n collector.cluster_health() # call _cluster/health, get ES cluster high level stats\n collector.cluster_stats() # call _cluster/stats, get ES cluster detailed stats\n collector.node_stats() # call _node/_local/stats, get ES node detailed stats\n\n\n # collector supports detailed configurations like\n # SSL, basic HTTP auth with UTF-8 credentials, and control over SSL context\n insecure_ssl_collector = ElasticSearchCollector(\n 'localhost',\n port=9200,\n scheme='https',\n user=u't\u20acstuser',\n password=u't\u20acstp\u00e1ssword',\n ssl_context={'no_cert_verify': True}\n )\n\n\nThe returned values are exactly what's returned from the Elasitc APIs.\n\n\nComposing Features\n------------------\n\nFeatures from different modules can be composed together to achieve expected behavior.\n\n\n.. code-block:: python\n\n from elasticmetrics.collectors import ElasticSearchCollector\n from elasticmetrics.metrics import node_performance_metrics\n from elasticmetrics.formatters import flatten_metrics\n\n collector = ElasticSearchCollector(\n 'es.example.org',\n scheme='https',\n user='testuser',\n password='testpassword'\n )\n metrics_as_dotted_paths = flatten_metrics(\n node_performance_metrics(collector.node_stats()),\n prefix='example_es_server'\n )\n # metrics_as_dotted_paths can be pushed to a time series backend, like Graphite\n\n\n\nInstallation\n============\n\n.. code-block:: bash\n\n $ pip install elasticmetrics\n\n\nThe only dependencies are Python 2.7+/3.4+ and setuptools.\n\nHowever on development (and test) environment\n`pytest `_, `mock `_\nand `pycodestyle `_ are required.\n\n\n.. code-block:: bash\n\n # on dev/test env\n $ pip install -r requirements/dev.txt\n\n\nCLI Tool\n========\n\n`elasticmetrics.tool` is a CLI program that exposes some of the functionlaty of the library. It'll execute when imported:\n\n\n.. code-block:: bash\n\n $ python -m elasticmetrics.tool --help\n\n\nElastic credentials can be passed as arguments, or set as environment variables.\nThe example below will connect to ElasticSearch listening on the default port on localhost\nover HTTPS, and only collect node stats, and reads access credentials from environment variables.\n\n\n.. code-block:: bash\n\n $ export ELASTICSEARCH_USER=\"someuser\"\n $ export ELASTICSEARCH_PASSWORD=\"somepassword\"\n $ python -m elasticmetrics.tool --ssl --quiet --collect node_stats\n\n\n\nDevelopment\n===========\n\n* Code is on `GitHub `_\n\n\nTests\n-----\n\n`Tox `_ is most convenient to run tests with, since it handles creation of virtualenvs\n\n.. code-block:: bash\n\n $ tox\n\nOr when development dependencies are installed (preferably with a virtual environment),\ntests can be run by directly calling `pytest`.\n\n.. code-block:: bash\n\n $ pytest\n\n\nLicense\n=======\n\nelasticmetrics is released under the terms of the MIT license.\n\nThe MIT License (MIT)\n\nCopyright (c) 2019 Byte B.V.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\n",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/ByteInternet/elasticmetrics",
"keywords": "elasticsearch metrics",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "elasticmetrics",
"package_url": "https://pypi.org/project/elasticmetrics/",
"platform": "",
"project_url": "https://pypi.org/project/elasticmetrics/",
"project_urls": {
"Homepage": "https://github.com/ByteInternet/elasticmetrics"
},
"release_url": "https://pypi.org/project/elasticmetrics/0.1.1/",
"requires_dist": [
"pytest ; extra == 'dev'",
"mock ; extra == 'dev'",
"pycodestyle ; extra == 'dev'"
],
"requires_python": "",
"summary": "ElasticSearch metrics",
"version": "0.1.1"
},
"last_serial": 4959345,
"releases": {
"0.0.1": [
{
"comment_text": "",
"digests": {
"md5": "2095cf8945b0a92bb5bf79cd75c014a6",
"sha256": "89fcc5c8661bdc137082b5089af8fb661e98ebba06cb6bd949475ef10fee5ff0"
},
"downloads": -1,
"filename": "elasticmetrics-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2095cf8945b0a92bb5bf79cd75c014a6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 11601,
"upload_time": "2019-03-18T14:05:20",
"url": "https://files.pythonhosted.org/packages/1c/41/98813b25ad64df66764ad072816df890b485ba4f0c8c0143604cdcda2170/elasticmetrics-0.0.1-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "0af8126435c0471420ded94f7e404dee",
"sha256": "cba556438440404d63cc10a975a6f2468357072e9f793908ffd61cd444c7fa38"
},
"downloads": -1,
"filename": "elasticmetrics-0.0.1.tar.gz",
"has_sig": true,
"md5_digest": "0af8126435c0471420ded94f7e404dee",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8954,
"upload_time": "2019-03-18T14:07:20",
"url": "https://files.pythonhosted.org/packages/67/0c/0680cd3c4d6414002e6f94e16da670fbff315a33aa8b864b8676f532c852/elasticmetrics-0.0.1.tar.gz"
}
],
"0.1.0": [
{
"comment_text": "",
"digests": {
"md5": "c622584d4e33f241ec6518239e63d21b",
"sha256": "3972182ac74e0d7d9bbaa4286c17e440b7ebddccac19c47a520a439ca77af89a"
},
"downloads": -1,
"filename": "elasticmetrics-0.1.0-py3-none-any.whl",
"has_sig": true,
"md5_digest": "c622584d4e33f241ec6518239e63d21b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 13468,
"upload_time": "2019-03-19T12:42:57",
"url": "https://files.pythonhosted.org/packages/4f/4f/0b33bc30b653f5e1d485a39ac7c6b6f89184e74df803dc1530ecc10a63c0/elasticmetrics-0.1.0-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "4cb3c3834f71271f61385997e087ffe5",
"sha256": "947cd3e0e213db143241a8086240b717b83df1e792a855cc4fd03363ce7c4f9f"
},
"downloads": -1,
"filename": "elasticmetrics-0.1.0.tar.gz",
"has_sig": true,
"md5_digest": "4cb3c3834f71271f61385997e087ffe5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10664,
"upload_time": "2019-03-19T12:43:02",
"url": "https://files.pythonhosted.org/packages/ba/96/6e89920fe2d63586c6d7201fb15238c2116c0542a9c247bfab430d9f4c93/elasticmetrics-0.1.0.tar.gz"
}
],
"0.1.1": [
{
"comment_text": "",
"digests": {
"md5": "ddade481d8abdb0adc613428c5487528",
"sha256": "12d559e83d716b4142cb7ed898df0c9508bba74db93cae11f4087ffac51be8dd"
},
"downloads": -1,
"filename": "elasticmetrics-0.1.1-py3-none-any.whl",
"has_sig": true,
"md5_digest": "ddade481d8abdb0adc613428c5487528",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 13485,
"upload_time": "2019-03-19T15:39:50",
"url": "https://files.pythonhosted.org/packages/90/58/76feeca0ad29282a0745900c41e88d1939c85b926e582aa3849d5c83b4bc/elasticmetrics-0.1.1-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "a5c05e1ae0b058ab0dd008a464d7dd77",
"sha256": "4ce6a228f94c11d73a3444f905ccca2682c09f6f3bad8f46b8b15b6c5bc2f78f"
},
"downloads": -1,
"filename": "elasticmetrics-0.1.1.tar.gz",
"has_sig": true,
"md5_digest": "a5c05e1ae0b058ab0dd008a464d7dd77",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10678,
"upload_time": "2019-03-19T15:40:07",
"url": "https://files.pythonhosted.org/packages/17/1d/232d1ee49a7c446b4807cea489f894a3f7262192b3e501f55c22b75087c1/elasticmetrics-0.1.1.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "ddade481d8abdb0adc613428c5487528",
"sha256": "12d559e83d716b4142cb7ed898df0c9508bba74db93cae11f4087ffac51be8dd"
},
"downloads": -1,
"filename": "elasticmetrics-0.1.1-py3-none-any.whl",
"has_sig": true,
"md5_digest": "ddade481d8abdb0adc613428c5487528",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 13485,
"upload_time": "2019-03-19T15:39:50",
"url": "https://files.pythonhosted.org/packages/90/58/76feeca0ad29282a0745900c41e88d1939c85b926e582aa3849d5c83b4bc/elasticmetrics-0.1.1-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "a5c05e1ae0b058ab0dd008a464d7dd77",
"sha256": "4ce6a228f94c11d73a3444f905ccca2682c09f6f3bad8f46b8b15b6c5bc2f78f"
},
"downloads": -1,
"filename": "elasticmetrics-0.1.1.tar.gz",
"has_sig": true,
"md5_digest": "a5c05e1ae0b058ab0dd008a464d7dd77",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10678,
"upload_time": "2019-03-19T15:40:07",
"url": "https://files.pythonhosted.org/packages/17/1d/232d1ee49a7c446b4807cea489f894a3f7262192b3e501f55c22b75087c1/elasticmetrics-0.1.1.tar.gz"
}
]
}