Skip to main content

Check and analyze a couchbase cluster in terms of cluster health,bucket,and replication

Project description

Couchbase Complete Snapshot

InsideCouchbase is a Python library that allows you to analyze and monitor the health of a Couchbase cluster. With InsideCouchbase, you can perform health checks on your Couchbase cluster, check for missing or corrupted data, analyze bucket usage, and monitor cluster settings.

Features

InsideCouchbase provides the following features:

  • Analyze bucket usage: You can analyze the usage of a bucket to see how much data it contains, how many items it has, and how much memory it is using.

  • Check cluster health: You can perform a health check on your Couchbase cluster to see if it is functioning properly.

  • Check replication status: You can check the replication status of a bucket to see if it is properly replicating data to other nodes.

  • Monitor cluster settings: You can monitor the settings of your Couchbase cluster to ensure that they are properly configured.

Getting Started

  1. Install the module
pip3 install insidecouchbase
  1. Create a simple python script/module to utilize library.
import couchbase

couchbaseInstance=couchbase.couchbaseNode('127.0.0.1','Administrator','test123')

Example results

╒════╤════════════════════════════════════════════════════╤══════════╕
│    │                     Statement                      │  Result  │
╞════╪════════════════════════════════════════════════════╪══════════╡
│ 0  │      All nodes are healthy and joined cluster      │    🟢    │
├────┼────────────────────────────────────────────────────┼──────────┤
│ 1  │     All nodes using same version of Cocuhbase      │    🟢    │
├────┼────────────────────────────────────────────────────┼──────────┤
│ 2  │                 MDS model applied                  │    ❌    │
├────┼────────────────────────────────────────────────────┼──────────┤
│ 3  │  All buckets have resident ratio greater than %50  │    🟢    │
├────┼────────────────────────────────────────────────────┼──────────┤
│ 4  │ All bucket have at least 1 replica to protect data │    🟢    │
├────┼────────────────────────────────────────────────────┼──────────┤
│ 5  │        There is no missing primary vbucket         │    🟢    │
├────┼────────────────────────────────────────────────────┼──────────┤
│ 6  │          Auto-failover setting is enabled          │    ❌    │
├────┼────────────────────────────────────────────────────┼──────────┤
│ 7  │                  Cluster Score 80                  │    🟢    │
╘════╧════════════════════════════════════════════════════╧══════════╛
╒════╤═══════════════════════════════════════════════════════════════════════════════════════╤═════════════════╤═══════════════════╕
│    │                                   problemStatement                                    │   problemArea   │  problemSeverity  │
╞════╪═══════════════════════════════════════════════════════════════════════════════════════╪═════════════════╪═══════════════════╡
│ 0  │                          Autofailover setting is not enabled                          │  Configuration  │     Critical      │
├────┼───────────────────────────────────────────────────────────────────────────────────────┼─────────────────┼───────────────────┤
│ 1  │ The node has multiple couchbase services.For production MDS model should be followed. │ 172.17.0.6:8091 │      Medium       │
╘════╧═══════════════════════════════════════════════════════════════════════════════════════╧═════════════════╧═══════════════════╛
-- Details -- 
+----+-----------------+-----------------+---------------+-------------------+-----------------------+
|    | nodeIP          | clusterMember   | healtStatus   | services          | couchbaseVersion      |
|----+-----------------+-----------------+---------------+-------------------+-----------------------|
|  0 | 172.17.0.2:8091 | active          | healthy       | ['kv']            | 7.1.3-3479-enterprise |
|  1 | 172.17.0.3:8091 | active          | healthy       | ['kv']            | 7.1.3-3479-enterprise |
|  2 | 172.17.0.4:8091 | active          | healthy       | ['index']         | 7.1.3-3479-enterprise |
|  3 | 172.17.0.5:8091 | active          | healthy       | ['n1ql']          | 7.1.3-3479-enterprise |
|  4 | 172.17.0.6:8091 | active          | healthy       | ['index', 'n1ql'] | 7.1.3-3479-enterprise |
+----+-----------------+-----------------+---------------+-------------------+-----------------------+
+----+--------------+-----------------------+--------------+------------------+-------------------------+-------------------+-----------------------+---------------------+
|    | bucketName   |   primaryVbucketCount | bucketType   |   bucketReplicas |   bucketQuotaPercentage |   bucketItemCount |   bucketResidentRatio |   bucketDisUsedInMb |
|----+--------------+-----------------------+--------------+------------------+-------------------------+-------------------+-----------------------+---------------------|
|  0 | beer-sample  |                  1024 | membase      |                1 |                    16.5 |              3711 |                   100 |                46.7 |
+----+--------------+-----------------------+--------------+------------------+-------------------------+-------------------+-----------------------+---------------------+
+----+------------+--------------------+--------------+
|    | xdcrName   | xdcrConnectivity   | targetNode   |
|----+------------+--------------------+--------------|
|  0 | test       | RC_OK              | 172.17.0.7   |
+----+------------+--------------------+--------------+

+----+-----------------+----------+
|    | configName      |   status |
|----+-----------------+----------|
|  0 | autofailover    |    False |
|  1 | email-alerting  |    False |
|  2 | auto-compaction |       30 |
+----+-----------------+----------+

Supported Couchbase Version

  • Couchbase 7.0.X
  • Couchbase 7.1.X

Contributing

If you would like to contribute to InsideCouchbase, please submit a pull request with your changes. Before submitting a pull request, please make sure that your changes are properly tested and documented.

License

InsideCouchbase is licensed under the MIT license. See the LICENSE file for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

insidecouchbase-0.1.0.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

insidecouchbase-0.1.0-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file insidecouchbase-0.1.0.tar.gz.

File metadata

  • Download URL: insidecouchbase-0.1.0.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for insidecouchbase-0.1.0.tar.gz
Algorithm Hash digest
SHA256 efe417dee400989d3414d6485175085345906e10771363a3a1cc798f7f37b493
MD5 407863e5ab7f7c6da284ed1cdac96c3d
BLAKE2b-256 3ff4aa40e34cafffd85f1df3136d8d9c84f9513f0f71dd5374db1a6c70415da9

See more details on using hashes here.

File details

Details for the file insidecouchbase-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for insidecouchbase-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc4bf21427cc6821e83d8c2f28e2c3b209b44261276015d4a49eb5748c9c9d77
MD5 5bb922d0a7f024002599c96226e89864
BLAKE2b-256 e8cd95c2fe00e5ccc7caa542944386cdb18ff6bf6c703a191d027e2cd290e1ae

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page