A CLI utility to monitor Couchbase cluster. Tool helps you get key insights about your Couchbase Cluster. These details can help you to proactively monitor your cluster and take appropriate step.
Checkout project and run below command from the project directory.
$go install github.com/raiskumar/c2m
or
$go build
CLI application needs to know certain basic details before it starts spitting cluster insights. Your cluster might have 100s of nodes, does it mean you need to provide details of all nodes ? Certenly NOT!
You just need to provide base URL of any one node and credentials to access it (if configured)!
$./c2m config http://172.27.0.1:8091 Administrator Password123
Note: The application doesn't store the credentials in clear text!
You should run this CLI from a host/VM which has access to Couchbase nodes/servers.
$c2m node
Gets the node related details of the couchbaase cluster
$c2m bucket {optional_bucket_name}
Prints bucket related details of the cluster
$c2m cluster
Prints cluster metadata
$c2m index
Prints Index details of the Cluster
Above commands can also respond appropriately on usage of --verbose flag.
$c2m bucket {bucket_name} --verbose
To get help of any command
$c2m {command} --help
or
$c2m --help
CLI support: https://github.com/spf13/cobra
Print the output on console in tabular format: https://github.com/olekukonko/tablewriter
Convert JSON to Go Struct: https://mholt.github.io/json-to-go/
Important Couchbase REST End points: https://developer.couchbase.com/documentation/server/current/rest-api/rest-endpoints-all.html
Monitoring Couchbase: https://blog.couchbase.com/monitoring-couchbase-cluster/
& https://blog.couchbase.com/top-10-things-ops-sys-admin-must-know-about-couchbase/
Troubleshooting Issues: https://www.youtube.com/watch?v=88NHDWz52aY