Tool for Kafka Monitoring, Reporting, and Tuning
  • Python 95.6%
  • Makefile 2.8%
  • Dockerfile 0.7%
  • Shell 0.5%
  • Jinja 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
dependabot[bot] e4b3a79c2e
Bump the pip group across 1 directory with 2 updates (#34)
Bumps the pip group with 2 updates in the / directory: [cryptography](https://github.com/pyca/cryptography) and [aiohttp](https://github.com/aio-libs/aiohttp).


Updates `cryptography` from 42.0.8 to 43.0.1
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/42.0.8...43.0.1)

Updates `aiohttp` from 3.9.5 to 3.10.2
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](https://github.com/aio-libs/aiohttp/compare/v3.9.5...v3.10.2)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: aiohttp
  dependency-type: indirect
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 16:29:32 +00:00
.codebuild CICD - Codebuild (#16) 2024-02-13 09:49:20 +00:00
.github aws secrets-manager/ssm config import for cluster_config (#1) 2024-01-03 00:43:45 +00:00
compose_x Rework for signals handling (#31) 2024-05-23 20:30:22 +01:00
docs Working deployment with compose-x (#29) 2024-05-20 12:41:11 +01:00
kafka_overwatch Bump to 0.5.0-post0 2024-05-23 20:41:34 +01:00
tests Initial commit 2024-01-02 17:11:49 +00:00
.dockerignore Initial commit 2024-01-02 17:11:49 +00:00
.editorconfig Initial commit 2024-01-02 17:11:49 +00:00
.gitignore Governance - topic names convention report (#15) 2024-02-13 08:21:03 +00:00
.pre-commit-config.yaml Updated deps (#28) 2024-05-20 12:38:17 +01:00
AUTHORS.rst Governance - topic names convention report (#15) 2024-02-13 08:21:03 +00:00
config.local.yaml Better topics usage analysis (#7) 2024-01-06 21:00:03 +00:00
docker-compose.override.yaml Working deployment with compose-x (#29) 2024-05-20 12:41:11 +01:00
docker-compose.yaml Working deployment with compose-x (#29) 2024-05-20 12:41:11 +01:00
Dockerfile Rework for signals handling (#31) 2024-05-23 20:30:22 +01:00
LICENSE Initial commit 2024-01-02 17:11:49 +00:00
Makefile CICD - Codebuild (#16) 2024-02-13 09:49:20 +00:00
poetry.lock Bump the pip group across 1 directory with 2 updates (#34) 2025-02-12 16:29:32 +00:00
prometheus.local.yaml Initial commit 2024-01-02 17:11:49 +00:00
pyproject.toml Bump the pip group across 1 directory with 2 updates (#34) 2025-02-12 16:29:32 +00:00
README.rst Updating README 2024-05-23 20:38:31 +01:00
update_specs.sh Better topics usage analysis (#7) 2024-01-06 21:00:03 +00:00

========================================
kafka-overwatch
========================================

What started as a simple CLI/Service to evaluate Kafka cluster topics which have no activity,
ended up being a somewhat comprehensive way to monitor Kafka cluster activities.

Takes a configuration file as input, where you can list one or multiple cluster(s) you wish to monitor.

After a set period of time, it can produce a report (to local disk or AWS S3) with the list of topics that haven't seen any activity.
It also exposes metrics via a prometheus endpoint.

Usage
========

.. code-block::

    kafka-overwatch -c config.local.yaml

Features
==========

* Supports evaluating multiple Kafka clusters at once
* Generates a report on topic usage based on topic watermarks offsets (store local or to S3)
* Generates commands script to re-create all the topics in case of DR (store local or to S3)

* Exposes metrics via prometheus

    * Topics count
    * Partitions count
    * Number of new messages (measured with topic offsets)

* AWS Secret integration for client config values
* Schema Registry integration

    * Scan schema registries, map 1 to  many kafka clusters
    * Backup of the schemas, and CLI to restore schemas to existing/new registry.

Upcoming
----------

* Multi-nodes awareness (split the load with multiple nodes)
* `cfn-kafka-admin`_ output format
* topic messages meta-data analysis (i.e are messages compressed?)
* scripts to perform cleanup
* Recommendations generated from/based on models
* Conduktor Gateway vClusters auto-discovery


Configuration
===============

Whilst a much more comprehensive documentation is yet to be written, please look at ``kafka_overwatch/specs/config.json``
which is used with `jsonschema`_ to perform validation of the input.

Return codes
=============

0 - all successful.
1 - error during execution
2 - error importing configuration.

Misc
=====

Thanks
-------

Thanks to the Apache Kafka OpenSource community for their continuous efforts in making the eco-system great.
Thanks to the `NASA`_ for having a public cluster to run tests with

Note
-----

Inspired by `kafka-idle-topics`_, yet completely re-written to be a continuous monitoring of the topics,
similar to `cruise-control`_.

.. _EMF: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format_Specification.html
.. _kafka-idle-topics: https://github.com/abraham-leal/kafka-idle-topics
.. _cfn-kafka-admin: https://github.com/compose-x/cfn-kafka-admin
.. _cruise-control: https://github.com/linkedin/cruise-control
.. _jsonschema: https://pypi.org/project/jsonschema/
.. _NASA: https://www.nasa.gov/


Status
=======

Images build status

|BUILD|

Docs build status

|DOCS_BUILD|


.. |BUILD| image:: https://codebuild.eu-west-1.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiU3RHQnZ2eFpnQTlOSmU2MUM3NDB5NW9uMDY2TS9DZXBWZ2hmejdoK2xJRStHK2Fhd3FkS1FoQjJOSTcvYjVBNkFTTW5kVDNZK0NqZEthU3gveFpOVEljPSIsIml2UGFyYW1ldGVyU3BlYyI6IjlUbE0vNmpPQU92U1o0SmkiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=main

.. |DOCS_BUILD| image:: https://codebuild.eu-west-1.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiSVNBZkVSUkx1NHhtamlqSEJqempIdHd2aVNqV2RkTTFVYlphUzJ2ekprOVU4ODZ4cUNWcTNVSkRVM2ovcGFyak5NTTNJZ1Vra2ErSzVOdi84TkVLOUp3PSIsIml2UGFyYW1ldGVyU3BlYyI6IjAvK25MSmNPcjNScVpwdTQiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=main