ElasticSearch metrics
Project description
Collect performance metrics from ElasticSearch.
elasticmetrics is a Python library, designed to be used in different contexts and easy to integrate with other tools. Each step of data collection, transformation and reporting is defined in a separate reusable module.
Installation
$ pip install elasticmetrics
The only dependencies are Python 2.7+ and setuptools.
However on development (and test) environment pytest, mock and pycodestyle are required.
# on dev/test env
$ pip install -r requirements/dev.txt
CLI Tool
elasticmetrics.tool is a CLI program that exposes some of the functionlaty of the library. It’ll execute when imported:
$ python -m elasticmetrics.tool --help
Elastic credentials can be passed as arguments, or set as environment variables. The example below will connect to ElasticSearch listening on the default port on localhost over HTTPS, and only collect node stats, and reads access credentials from environment variables.
$ export ELASTICSEARCH_USER="someuser"
$ export ELASTICSEARCH_PASSWORD="somepassword"
$ python -m elasticmetrics.tool --ssl --quiet --collect node_stats
Development
Code is on GitHub
Tests
Tox is most convenient to run tests with, since it handles creation of virtualenvs
$ tox
When development dependencies are installed (preferably with a virtual environment), tests can be run by calling pytest.
$ pytest
License
elasticmetrics is released under the terms of the MIT license.
The MIT License (MIT)
Copyright (c) 2019 Byte B.V.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for elasticmetrics-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89fcc5c8661bdc137082b5089af8fb661e98ebba06cb6bd949475ef10fee5ff0 |
|
MD5 | 2095cf8945b0a92bb5bf79cd75c014a6 |
|
BLAKE2b-256 | 1c4198813b25ad64df66764ad072816df890b485ba4f0c8c0143604cdcda2170 |