{ "info": { "author": "Andrew Carter", "author_email": "andrew.k.carter@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Topic :: System", "Topic :: System :: Distributed Computing", "Topic :: System :: Logging", "Topic :: System :: Monitoring", "Topic :: System :: Systems Administration", "Topic :: Utilities" ], "description": ".. image:: https://img.shields.io/github/license/andrewkcarter/klag.svg?maxAge=2592000\n :target: https://github.com/andrewkcarter/klag/blob/master/LICENSE\n.. image:: https://img.shields.io/pypi/dw/klag.svg?maxAge=2592000\n :target: https://pypi.python.org/pypi/klag\n\nklag\n====\n\nA command line interface for inspecting Kafka consumer group offsets\nwhich are stored on the brokers (Kafka 0.8.2+).\n\nFeatures\n--------\n\n- Discover and display all active or specific consumer groups and\n topics.\n- View offsets for partition start and end, consumer offsets, and the\n remaining messages.\n- Output in several formats (human, json, discrete json records for\n indexing/monitoring).\n- Built in polling at a specified interval.\n\nInstallation\n------------\n\n::\n\n pip install klag\n\nor\n\n::\n\n python setup.py install\n\nExamples\n--------\n\n::\n\n usage: klag [-h] [-b LIST] [-g JSON] [--groups-file FILE] [-d] [-c] [-p]\n [-s N] [-o FILE] [-f FORMAT] [--log-level LEVEL] [--version]\n\n Kafka 0.8.2+ consumer monitoring.\n\n optional arguments:\n -h, --help show this help message and exit\n -b LIST, --brokers LIST\n Comma separated list of Kafka brokers\n -g JSON, --groups JSON\n Consumer groups and list of topics for each group to\n check (even if dead). JSON structured as\n '{\"\":[\"\"]}'\n --groups-file FILE JSON file containing consumer groups and list of\n topics for each group to check (even if dead). JSON\n structured as '{\"\":[\"\"]}'\n -d, --discover Include all active consumer groups and topics in\n output\n -c, --cache Consumer groups that go dead (all consumers\n disconnect) will continue to be checked. Used with\n '-s'\n -p, --partitions Include partition metrics in output\n -s N, --seconds N Repeat check every N seconds\n -o FILE, --output-file FILE\n Write output to a file\n -f FORMAT, --format FORMAT\n Write output using the specified format structure\n {default,json,json-pretty,json-discrete}\n --log-level LEVEL Set the application logging level\n --version show program's version number and exit\n\nTo see all consumer groups that are connected and their topics, just run\nthe ``klag`` command. It will attempt to connect to a Kafka broker at\n``localhost:9092`` as a default.\n\n::\n\n $ klag\n\nIf your broker is not local, specify the ``--brokers`` flag.\n\n::\n\n $ klag -b \n Group Topic Remaining\n ================================================================================\n my-group [STABLE]\n topic-1 21\n topic-2 15\n\nTo see data about the consumption of individual topic partitions, add\nthe ``--partitions`` flag.\n\n::\n\n $ klag -p\n Group Topic Partition Earliest Consumed Latest Remaining\n ================================================================================\n my-group [STABLE]\n topic-1 21\n 0 52152 460290 460298 8\n 1 52538 460963 460968 5\n 2 52291 460805 460813 8\n topic-2 15\n 0 0 187180 187182 2\n 1 0 187979 187984 5\n 2 0 187026 187034 8\n\nTo focus on specific consumer groups and topics, use the ``--groups``\nparameter.\n\n::\n\n $ klag -g '{\"my-group\":[\"topic-2\"]}'\n Group Topic Remaining\n ================================================================================\n my-group [STABLE]\n topic-2 15\n\nTo output the information in a more machine readable format, use the\n``--format`` parameter. This is ideal for producing records for a\nmonitoring system.\n\n::\n\n $ klag -g '{\"my-group\":[\"topic-2\"]}' -f json-discrete\n {\"consumer_lag\": 15, \"group\": \"my-group\", \"topic\": \"topic-2\", \"state\": \"Stable\"}\n\nTo run ``klag`` continuously you may specify the ``--seconds``\nparameter, which will print the consumer data at the specified interval.\nRunning continuously in conjunction with the ``--discover`` flag will\nadd consumer groups when they connect, and remove them when they\ndisconnect. If you wish to keep monitoring the topics for consumer\ngroups that have disconnected, enable caching with the ``--cache`` flag.", "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/andrewkcarter/klag", "keywords": "kafka", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "klag", "package_url": "https://pypi.org/project/klag/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/klag/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/andrewkcarter/klag" }, "release_url": "https://pypi.org/project/klag/1.0.2/", "requires_dist": null, "requires_python": null, "summary": "A Kafka consumer group monitoring CLI.", "version": "1.0.2" }, "last_serial": 2109707, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "207d0556f6e9af1080d9589dbddbd3a8", "sha256": "82db7e35f1be9a6f9f7afbd9609e570511c8d3a218f37823a0b43d7df68ef22d" }, "downloads": -1, "filename": "klag-1.0.0.tar.gz", "has_sig": false, "md5_digest": "207d0556f6e9af1080d9589dbddbd3a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6878, "upload_time": "2016-04-16T05:44:41", "url": "https://files.pythonhosted.org/packages/a9/5d/6960202077917c5e0be39a607663569ecdc6f81eb7162e5122b0ea793273/klag-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "bc384f0551acf78c95487f81b5f6123f", "sha256": "261b2c75e2c97687b9d9aa557b07563d39e3f7ee374f1e2d788480287ffe0235" }, "downloads": -1, "filename": "klag-1.0.1.tar.gz", "has_sig": false, "md5_digest": "bc384f0551acf78c95487f81b5f6123f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7235, "upload_time": "2016-05-11T02:31:53", "url": "https://files.pythonhosted.org/packages/c2/54/735c2456e50a66207504babc6112bb018e3021c3579d2e3a29516413f610/klag-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "40cb0b206d7f644abbbbea025ee5548b", "sha256": "0dcb28e7f20d2c73676787add2c430e8199554b75dd430c628f806df62c2abc3" }, "downloads": -1, "filename": "klag-1.0.2.tar.gz", "has_sig": false, "md5_digest": "40cb0b206d7f644abbbbea025ee5548b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7236, "upload_time": "2016-05-11T02:43:39", "url": "https://files.pythonhosted.org/packages/fa/9b/e2f8dba9db3a18718c21fef7ff9c62ffd5098d04d8e75fe5914e65ca2018/klag-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "40cb0b206d7f644abbbbea025ee5548b", "sha256": "0dcb28e7f20d2c73676787add2c430e8199554b75dd430c628f806df62c2abc3" }, "downloads": -1, "filename": "klag-1.0.2.tar.gz", "has_sig": false, "md5_digest": "40cb0b206d7f644abbbbea025ee5548b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7236, "upload_time": "2016-05-11T02:43:39", "url": "https://files.pythonhosted.org/packages/fa/9b/e2f8dba9db3a18718c21fef7ff9c62ffd5098d04d8e75fe5914e65ca2018/klag-1.0.2.tar.gz" } ] }