- 06/29/2019: add --explain feature and use go.mongodb.org/mongo-driver v1.0.3
- 03/13/2019: version 1.0.0 released
- 02/24/2019: Replaced with go.mongodb.org/mongo-driver (v1.0.0-rc1)
- 12/24/2018: Replaced globalsign/mgo with github.com/mongodb/mongo-go-driver (beta)
Keyhole is a performance analytics tool, written in GO (Golang), to collect stats from MongoDB instances and to measure performance of a MongoDB cluster. Moreover, keyhole can read MongoDB full-time diagnostic data (FTDC) data and is integrated with Grafana's Simple JSON plugin seamlessly. Golang was chosen to eliminate the needs to install an interpreter or 3pp modules.
With Keyhole, experienced users should be able to spot performance issues and to determine whether upgrades are needed quickly from a few minutes of testing and analyzing the results. Keyhole supports TLS/SSL connections.
Several features are available, and they are
- Write Throughputs Test measures the MongoDB performance by writing documents at a high rate to a MongoDB cluster.
- Load test extends the Write throughputs test by issuing different ops against a MongoDB cluster. Stats analytic is also provided
- Memory: resident, virtual, and page faults
- Executor and ops
- Latency: read, write, and command
- Metrics: index keys examined, collection scan, in-memory sort, and ops
- WiredTiger analytic
- Customized load test with a sample document. Uses can load test using their own document format (see LOADTEST.md for details).
- Cluster Info to display information of a cluster including stats to help determine physical memory size.
- Display all indexes and their usages
- Seed data for demo and educational purposes as a trainer.
- Display average ops time and query patterns by parsing logs.
- Display indexes scores of a query shape
Refer to wiki for user's guide.
You need go
installed and use dep
to pull down dependencies.
cd $GOPATH/src
git clone --depth 1 https://github.com/simagix/keyhole.git
cd keyhole
./build.sh
$ keyhole --help
$ ./test.sh load
An example connecting to Atlas
keyhole --info "mongodb+srv://user:secret@cluster0-v7due.gcp.mongodb.net/test"
keyhole --info --sslCAFile /etc/ssl/certs/ca.pem --sslPEMKeyFile /etc/ssl/certs/client.pem "mongodb://user:password@localhost/keyhole?authSource=admin&ssl=true"