Skip to content

raiskumar/c2m

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Go Report Card GoDoc

c2m :Couchbase Cluster Monitor

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.

Download latest release

$curl -LOk `curl --silent https://api.github.com/repos/raiskumar/c2m/releases/latest | /usr/bin/awk '/browser_download_url/ { print $2 }' | /usr/bin/sed 's/"//g'`

Create Executable / Build Project

Checkout project and run below command from the project directory.
$go install github.com/raiskumar/c2m
or
$go build

Bootstrap CLI application

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.

Supported Commands

$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

Get Help about any Command

To get help of any command
$c2m {command} --help
or
$c2m --help

Libraries/References Used for the Tool

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

About

A CLI utility written in Golang to get key insights about your Couchbase cluster!

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages