Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support for Apache Cassandra in DB Health #77

Open
millerjp opened this issue Dec 14, 2021 · 2 comments
Open

Support for Apache Cassandra in DB Health #77

millerjp opened this issue Dec 14, 2021 · 2 comments

Comments

@millerjp
Copy link

Hi - it would be helpful to a project I am on to support Apache Cassandra. If someone could give me an overview or some documentation on how this might be best implemented I would be happy to develop it.

Thanks.

@michaelyaakoby
Copy link
Member

Hi, sorry for the late response.
Will send you example later this week.

@michaelyaakoby
Copy link
Member

@millerjp it would be great if you can send a PR with a "cassandra health indicator".

Before you begin, you need to decide:

  1. What's the criteria for the health-check to report that the DB is up
  2. What additional info do you want to include in the DB status

For example, Spring's CassandraHealthIndicator:

  1. Reports UP if the state of at least one node in the cql-session is UP
  2. Includes the version of the Cassandra in one of the nodes

In Pyctuator, health indicators extend HealthProvider and are registered with Pyctuator as demonstrated in advanced_example_app.py.

Two important notes:

  1. Pyctuator's dependencies are always optional, so anyone using it isn't forced to include modules they don't need.
  2. We require that every component in Pyctuator will be tested.
    1. Components that require external dependencies can be tested using gitlab's "services" as can be seen in python_package_build.yml
    2. Such tests should be skipped if the external resource isn't available which is done based on if the resource's module is installed or not, see test_redis_health_provider.py

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants