keyhole

package module
v1.0.7-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2021 License: Apache-2.0 Imports: 30 Imported by: 1

README

Keyhole - Survey Your Mongo Land

keyhole Keyhole is a performance analytics tool, written in GO (Golang), to collect stats and to analyze performance for MongoDB clusters. Golang was chosen to eliminate the needs to install an interpreter or software modules. Use Maobi to create HTML reports from data collected by Keyhole.

Blogs

Peek at your MongoDB Clusters like a Pro with Keyhole:

Updated post is available at Survey Your Mongo Land.

Use Cases

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

Refer to wiki for user's guide.

Build and Download

Build and download instructions are available at Build and Download Keyhole.

Usage

keyhole --help

Unit Tests

./test.sh load

License

Apache-2.0 License

Disclaimer

This software is not supported by MongoDB, Inc. under any of their commercial support subscriptions or otherwise. Any usage of keyhole is at your own risk. Bug reports, feature requests and questions can be posted in the Issues section on GitHub.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalyzeMongoLogs added in v1.0.4

func AnalyzeMongoLogs(loginfo *mdb.LogInfo, filenames []string) error

AnalyzeMongoLogs a helper function to analyze logs

func CollectCluserDetails added in v1.0.4

func CollectCluserDetails(stats *mdb.ClusterStats, client *mongo.Client, connString connstring.ConnString) error

CollectCluserDetails collects cluster details

func CollectIndexStats added in v1.0.4

func CollectIndexStats(index *mdb.IndexStats, client *mongo.Client) error

CollectIndexStats collects all indexes stats

func DuplicateIndexesFromFile added in v1.0.4

func DuplicateIndexesFromFile(index *mdb.IndexStats, client *mongo.Client, filename string) error

DuplicateIndexesFromFile duplicate indexes from definitions defined in a file

func GetClusterSummary added in v1.0.4

func GetClusterSummary(version string, client *mongo.Client) string

GetClusterSummary returns MongoDB cluster summary

func MonitorWiredTigerCache added in v1.0.4

func MonitorWiredTigerCache(version string, client *mongo.Client)

MonitorWiredTigerCache monitor wiredTiger cache

func Run

func Run(fullVersion string)

Run executes main()

func StartSimulation added in v1.0.4

func StartSimulation(runner *sim.Runner) error

StartSimulation kicks off simulation

Types

type Comparison

type Comparison struct {
	Logger      *gox.Logger       `bson:"keyhole"`
	SourceStats *mdb.ClusterStats `bson:"source"`
	TargetStats *mdb.ClusterStats `bson:"target"`
	// contains filtered or unexported fields
}

Comparison contains parameters of comparison parameters

func NewComparison

func NewComparison(keyholeVersion string) *Comparison

NewComparison returns *Comparison

func (*Comparison) Compare added in v1.0.6

func (p *Comparison) Compare(source string, target string) error

Compare executes compare commands

func (*Comparison) OutputBSON

func (p *Comparison) OutputBSON() error

OutputBSON writes bson data to a file

func (*Comparison) Run

func (p *Comparison) Run() error

Run executes compare commands

func (*Comparison) SetNoColor

func (p *Comparison) SetNoColor(nocolor bool)

SetNoColor set nocolor flag

func (*Comparison) SetVerbose

func (p *Comparison) SetVerbose(verbose bool)

SetVerbose sets verbose

type Model added in v1.0.4

type Model struct {
	ID          string `json:"_id" bson:"_id"`
	Name        string
	Description string
	Year        int
}

Model - robot model

type Robot added in v1.0.4

type Robot struct {
	ID         string  `json:"_id" bson:"_id"`
	ModelID    string  `json:"modelId,omitempty" bson:"modelId,omitempty"`
	Notes      string  `json:"notes" bson:"notes"`
	BatteryPct float32 `json:"batteryPct,omitempty" bson:"batteryPct,omitempty"`
	Tasks      []Task  `json:"tasks" bson:"tasks"`
}

Robot -

type Seed added in v1.0.4

type Seed struct {
	// contains filtered or unexported fields
}

Seed seeds feeder

func NewSeed added in v1.0.4

func NewSeed() *Seed

NewSeed establish seeding parameters

func (*Seed) SeedAllDemoData added in v1.0.4

func (f *Seed) SeedAllDemoData(client *mongo.Client) error

SeedAllDemoData - seed data for demo

 models: {
   "_id": string
  "name": string,
  "description": string
  "year": integer
}
robots: {
  "_id": string
  "modelId": string
  "notes": string,
  "batteryPct": float,
  "tasks": [{"for": string, "minutesUsed": integer}]
}

func (*Seed) SeedData added in v1.0.4

func (f *Seed) SeedData(client *mongo.Client) error

SeedData seeds all demo data

func (*Seed) SeedFavorites added in v1.0.4

func (f *Seed) SeedFavorites(client *mongo.Client) error

SeedFavorites seeds demo data of collection favorites

func (*Seed) SeedVehicles added in v1.0.4

func (f *Seed) SeedVehicles(client *mongo.Client) error

SeedVehicles seeds vehicles collection

func (*Seed) SetCollection added in v1.0.4

func (f *Seed) SetCollection(collection string)

SetCollection set collection

func (*Seed) SetDatabase added in v1.0.4

func (f *Seed) SetDatabase(database string)

SetDatabase set database

func (*Seed) SetFile added in v1.0.4

func (f *Seed) SetFile(file string)

SetFile set file

func (*Seed) SetIsDrop added in v1.0.4

func (f *Seed) SetIsDrop(isDrop bool)

SetIsDrop set isDrop

func (*Seed) SetNumberConnections added in v1.0.4

func (f *Seed) SetNumberConnections(conns int)

SetNumberConnections set conns

func (*Seed) SetShowProgress added in v1.0.4

func (f *Seed) SetShowProgress(showProgress bool)

SetShowProgress set showProgress

func (*Seed) SetTotal added in v1.0.4

func (f *Seed) SetTotal(total int)

SetTotal set total

type Task added in v1.0.4

type Task struct {
	For         string `json:"for" bson:"for"`
	MinutesUsed int    `json:"minutesUsed" bson:"minutesUsed"`
}

Task - robot task

Directories

Path Synopsis
sim

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL