{ "info": { "author": "Bitergia", "author_email": "lcanas@bitergia.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Programming Language :: Python :: 3.4", "Topic :: Software Development" ], "description": "[![pipeline status](https://gitlab.com/Bitergia/devops/indexwarrior/badges/master/pipeline.svg)](https://gitlab.com/Bitergia/devops/indexwarrior/commits/master)\n[![coverage report](https://gitlab.com/Bitergia/devops/indexwarrior/badges/master/coverage.svg)](https://gitlab.com/Bitergia/devops/indexwarrior/commits/master)\n\n# Index Warrior\n\nPython tool to deal with GrimoireLab Elastic Search indexes.\n\nIt will allow you to:\n * make easier cleaning up the ES instances by dropping indexes based on last time it was written.\n * compare the affiliation and repos data for two enriched indexes, so you don't need to add them to kibana to see what they look like\n * list all the indexes with info about the aliases and modification dates\n * switch all the aliases from one index to another\n\n.. and also the basic stuff:\n * list, add and delete aliases\n * list and delete indexes.\n\n## Requirements\n\nSee the requirements.txt file.\n\n## Configuration file\n\nSince recent version it is possible to use a configuration file to avoid dealing with endpoints.\n\n```\n# cat ~/.indexwarrior\n[shortcuts]\nred = https://dpose:tomatopassword@red.biterg.io/data\nblue = https://quan:hardpassword@blue.biterg.io/data\n```\nSo you just need to pass the name of the shortcut\n\n```\n# indexwarrior red index show --less\n```\n\n## Examples\n\nThe example below shows how to delete documents with a specific origin and grimoire_creation_date:\n```\n >> index_warrior.py -e http://localhost:9200 index delete --origin https://github.com/bitergia/mordred --older_than now-100d git_prueba_002\n 25 documens found with the condition:\n - origin == https://github.com/bitergia/mordred\n - grimoire_creation_date > now-100d\n\n Do you really want to remove them? (y/n): y\n 25 documents were removed\n```\n\n```\nindex_warrior.py -e http://localhost:9200 index show\n+-------------+----------------------------------------+---+-------+---------+--------------------------+--------------------------+-----------------------+\n| status | index | A | count | deleted | metadata__timestamp | metadata__updated_on | rep/pri size/pri.size |\n+-------------+----------------------------------------+---+-------+---------+--------------------------+--------------------------+-----------------------+\n| yellow/open | .kibana | | 2 | 0 | None | None | 1/1 11.6kb/11.6kb |\n| yellow/open | conf | | 22 | 0 | None | None | 1/5 114.7kb/114.7kb |\n| yellow/open | discourse_161121 | | 2099 | 0 | 2017-02-23T16:04:42.501Z | 2016-04-09T20:12:13.679Z | 1/5 56.7mb/56.7mb |\n| yellow/open | discourse_161121_enriched_161121a | | 14917 | 5 | 2017-02-23T16:04:42.501Z | 2016-04-09T20:12:13.679Z | 1/5 16mb/16mb |\n| yellow/open | gerrit_grimoire_161212 | | 2816 | 4 | 2017-02-23T15:21:34.338Z | 2017-02-23T16:20:39.000Z | 1/5 26.1mb/26.1mb |\n| yellow/open | gerrit_grimoire_161212_enriched_161212 | | 2816 | 1 | 2017-02-23T15:21:34.338Z | 2017-02-23T16:20:39.000Z | 1/5 3.9mb/3.9mb |\n| yellow/open | git_coreos | | 16435 | 3 | 2017-02-28T23:28:28.358Z | 2017-02-28T18:57:49.000Z | 1/5 35.4mb/35.4mb |\n| yellow/open | git_coreos_enriched | | 0 | 0 | None | None | 1/5 795b/795b |\n| yellow/open | git_grimoire_161213 | * | 2437 | 7 | 2017-02-23T15:21:36.797Z | 2017-02-23T11:16:30.000Z | 1/5 4.7mb/4.7mb |\n| yellow/open | git_grimoire_161223_21 | * | 2437 | 7 | 2017-02-23T15:21:36.797Z | 2017-02-23T11:16:30.000Z | 1/5 5mb/5mb |\n| yellow/open | git_prueba_001 | | 2260 | 177 | 2017-02-23T15:21:36.797Z | 2017-02-23T11:16:30.000Z | 1/5 3.7mb/3.7mb |\n| yellow/open | git_prueba_002 | | 2412 | 25 | 2017-02-23T15:21:36.797Z | 2017-02-23T11:16:30.000Z | 1/5 4.7mb/4.7mb |\n| yellow/open | mbox_170207 | | 0 | 0 | None | None | 1/5 795b/795b |\n| yellow/open | mbox_170207_enriched_170207 | | 0 | 0 | None | None | 1/5 795b/795b |\n| yellow/open | stackexchange_161202a | * | 120 | 1 | 2017-02-23T15:21:18.668Z | 2017-02-23T01:03:57.000Z | 1/5 3.3mb/3.3mb |\n+-------------+----------------------------------------+---+-------+---------+--------------------------+--------------------------+-----------------------+\n```\n\nGet the ES cleaner using drop to remove expired indexes:\n```\nindex_warrior.py -e http://localhost:9200 index drop 2017-02-23T15:22:18.501Z\n+-------------+----------------------------------------+---+---------+-------+--------------------------+--------------------------+\n| status | index | A | expired | count | metadata__timestamp | metadata__updated_on |\n+-------------+----------------------------------------+---+---------+-------+--------------------------+--------------------------+\n| yellow/open | .kibana | | | 2 | None | None |\n| yellow/open | conf | | | 22 | None | None |\n| yellow/open | discourse_161121 | | | 2099 | 2017-02-23T16:04:42.501Z | 2016-04-09T20:12:13.679Z |\n| yellow/open | discourse_161121_enriched_161121a | | | 14917 | 2017-02-23T16:04:42.501Z | 2016-04-09T20:12:13.679Z |\n| yellow/open | gerrit_grimoire_161212 | | YES | 2816 | 2017-02-23T15:21:34.338Z | 2017-02-23T16:20:39.000Z |\n| yellow/open | gerrit_grimoire_161212_enriched_161212 | | YES | 2816 | 2017-02-23T15:21:34.338Z | 2017-02-23T16:20:39.000Z |\n| yellow/open | git_coreos | | | 16435 | 2017-02-28T23:28:28.358Z | 2017-02-28T18:57:49.000Z |\n| yellow/open | git_coreos_enriched | | | 0 | None | None |\n| yellow/open | git_grimoire_161213 | * | YES | 2437 | 2017-02-23T15:21:36.797Z | 2017-02-23T11:16:30.000Z |\n...\nThe indexes marked to be remove are:\n - gerrit_grimoire_161212 -> WARNING! could be a raw index\n - gerrit_grimoire_161212_enriched_161212\n - git_grimoire_161213 -> WARNING! it is linked from an alias\n...\nAre you sure? (y/n):\n\n```\n\nBrowse the help to find out the details!\n```\n>> index_warrior.py index -h\nusage: index_warrior.py index [-h] {show,compare,drop,delete} ...\n\npositional arguments:\n {show,compare,drop,delete}\n show show indexes\n compare compare two indexes\n drop drop index by metadata__timestamp\n delete delete index\n\noptional arguments:\n -h, --help show this help message and exit\n\n>> index_warrior.py alias -h\nusage: index_warrior.py alias [-h] {add,delete,show,switch} ...\n\npositional arguments:\n {add,delete,show,switch}\n add add alias\n delete delete alias\n show show aliases\n switch move aliases from one index to another\n\noptional arguments:\n -h, --help show this help message and exit\n\n```\n\nThe logo is a public domain image created by [SeriousTux](https://openclipart.org/user-detail/SeriousTux) and published at [openclipart.org](https://openclipart.org/detail/293914/woman-knight-warrior-in-armor-holding-a-sword)", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/devops/indexwarrior", "keywords": "development repositories analytics", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "indexwarrior", "package_url": "https://pypi.org/project/indexwarrior/", "platform": "", "project_url": "https://pypi.org/project/indexwarrior/", "project_urls": { "Homepage": "https://gitlab.com/devops/indexwarrior" }, "release_url": "https://pypi.org/project/indexwarrior/0.2.2/", "requires_dist": null, "requires_python": "", "summary": "Tool to operate GrimoireLab ES indexes", "version": "0.2.2" }, "last_serial": 4369385, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "8618a1a75330cc8cf824579916a09803", "sha256": "8932c83f797ede9ed0213634a72773c6fe371d1228b328aa642565bb96b42c69" }, "downloads": -1, "filename": "indexwarrior-0.1.1-py3.6.egg", "has_sig": false, "md5_digest": "8618a1a75330cc8cf824579916a09803", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 27455, "upload_time": "2018-04-04T13:37:58", "url": "https://files.pythonhosted.org/packages/c4/03/307e4edf4290d2450d1651d5faf6213be10a77c5f1e1b68e9a4e54f9efd8/indexwarrior-0.1.1-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "79726d1aa14ce622fbe589f5b2978d94", "sha256": "57ed4f280acdb944bcd3b21aa98e04cc2b749d387204d04dc8aaec6869008ab6" }, "downloads": -1, "filename": "indexwarrior-0.1.1.tar.gz", "has_sig": false, "md5_digest": "79726d1aa14ce622fbe589f5b2978d94", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12140, "upload_time": "2018-03-01T16:27:21", "url": "https://files.pythonhosted.org/packages/02/37/1f699df71682a921d216f7855c30b680fa9a9112f9608d475475a1ce2196/indexwarrior-0.1.1.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "545bbf03e26161fd534c1193396a25e1", "sha256": "d3b787cb755f15fd6f06dd775b74ccb9176ee5fde93788395ffebb3b32ac15a6" }, "downloads": -1, "filename": "indexwarrior-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "545bbf03e26161fd534c1193396a25e1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18222, "upload_time": "2018-04-04T13:37:56", "url": "https://files.pythonhosted.org/packages/de/1e/6cee5162bdaae8f1c37999f136804ded012a388ccf1438893ec709537602/indexwarrior-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "44d47512cf2328889b2eed740de8dc9e", "sha256": "6052e2c437c5f135ddd89370eb3e2b4baa430a11b6a9de53a692a4fc976d2455" }, "downloads": -1, "filename": "indexwarrior-0.2.1.tar.gz", "has_sig": false, "md5_digest": "44d47512cf2328889b2eed740de8dc9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13699, "upload_time": "2018-04-04T13:38:25", "url": "https://files.pythonhosted.org/packages/43/d7/a9e7566bd3680a4177d6c41c33925eba05ea83012401f948a00245dd8161/indexwarrior-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "2c0a6b45fb94a1052bdb16ac489c13d9", "sha256": "017757dfe18a6b19806c9ef975533c304d82b9f4b292fc827f6e828715fb1296" }, "downloads": -1, "filename": "indexwarrior-0.2.2.tar.gz", "has_sig": false, "md5_digest": "2c0a6b45fb94a1052bdb16ac489c13d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13734, "upload_time": "2018-10-12T16:38:51", "url": "https://files.pythonhosted.org/packages/1b/a5/7a842cd78f62f8b4e6cda4dc6d81b83f78912fd957ed007e547a2b218f7e/indexwarrior-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2c0a6b45fb94a1052bdb16ac489c13d9", "sha256": "017757dfe18a6b19806c9ef975533c304d82b9f4b292fc827f6e828715fb1296" }, "downloads": -1, "filename": "indexwarrior-0.2.2.tar.gz", "has_sig": false, "md5_digest": "2c0a6b45fb94a1052bdb16ac489c13d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13734, "upload_time": "2018-10-12T16:38:51", "url": "https://files.pythonhosted.org/packages/1b/a5/7a842cd78f62f8b4e6cda4dc6d81b83f78912fd957ed007e547a2b218f7e/indexwarrior-0.2.2.tar.gz" } ] }