mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-22 20:09:08 +00:00
moving mongodb code into toolkit repo
This commit is contained in:
9
src/go/pt-mongodb-summary/templates/balancer.go
Normal file
9
src/go/pt-mongodb-summary/templates/balancer.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package templates
|
||||
|
||||
const BalancerStats = `
|
||||
# Balancer (per day)
|
||||
Success: {{.Success}}
|
||||
Failed: {{.Failed}}
|
||||
Splits: {{.Splits}}
|
||||
Drops: {{.Drops}}
|
||||
`
|
10
src/go/pt-mongodb-summary/templates/clusterwide.go
Normal file
10
src/go/pt-mongodb-summary/templates/clusterwide.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package templates
|
||||
|
||||
const Clusterwide = `
|
||||
# Cluster wide #################################################################################
|
||||
Databases: {{.TotalDBsCount}}
|
||||
Collections: {{.TotalCollectionsCount}}
|
||||
Sharded Collections: {{.ShardedColsCount}}
|
||||
Unsharded Collections: {{.UnshardedColsCount}}
|
||||
Sharded Data Size: {{.ShardedDataSizeScaled}} {{.ShardedDataSizeScale}}
|
||||
Unsharded Data Size: {{.UnshardedDataSizeScaled}} {{.UnshardedDataSizeScale}}`
|
26
src/go/pt-mongodb-summary/templates/hostinfo.go
Normal file
26
src/go/pt-mongodb-summary/templates/hostinfo.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package templates
|
||||
|
||||
const HostInfo = `# This host
|
||||
# Mongo Executable #############################################################################
|
||||
Path to executable | {{.ProcPath}}
|
||||
Has symbols | No
|
||||
# Report On {{.ThisHostID}} ########################################
|
||||
User | {{.ProcUserName}}
|
||||
PID Owner | {{.ProcessName}}
|
||||
Time | {{.ProcCreateTime}}
|
||||
Hostname | {{.Hostname}}
|
||||
Version | {{.Version}}
|
||||
Built On | {{.HostOsType}} {{.HostSystemCPUArch}}
|
||||
Started | {{.ProcCreateTime}}
|
||||
Databases | {{.HostDatabases}}
|
||||
Collections | {{.HostCollections}}
|
||||
{{- if .DBPath }}
|
||||
Datadir | {{.DBPath}}
|
||||
{{- end }}
|
||||
Processes | {{.ProcProcessCount}}
|
||||
Process Type | {{.NodeType}}
|
||||
{{ if .ReplicaSetName -}}
|
||||
ReplSet | {{.ReplicasetName}}
|
||||
Repl Status |
|
||||
{{- end -}}
|
||||
`
|
10
src/go/pt-mongodb-summary/templates/oplog.go
Normal file
10
src/go/pt-mongodb-summary/templates/oplog.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package templates
|
||||
|
||||
const Oplog = `
|
||||
# Oplog ########################################################################################
|
||||
Oplog Size {{.Size}} Mb
|
||||
Oplog Used {{.UsedMB}} Mb
|
||||
Oplog Length {{.Running}}
|
||||
Last Election {{.ElectionTime}}
|
||||
|
||||
`
|
13
src/go/pt-mongodb-summary/templates/replicaset.go
Normal file
13
src/go/pt-mongodb-summary/templates/replicaset.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package templates
|
||||
|
||||
const Replicas = `
|
||||
# Instances ####################################################################################
|
||||
ID Host Type ReplSet Engine Status
|
||||
{{- if . -}}
|
||||
{{- range . }}
|
||||
{{printf "% 3d" .Id}} {{printf "%-30s" .Name}} {{printf "%-30s" .StateStr}} {{printf "%10s" .Set -}}
|
||||
{{end}}
|
||||
{{else}}
|
||||
No replica sets found
|
||||
{{end}}
|
||||
`
|
13
src/go/pt-mongodb-summary/templates/runningops.go
Normal file
13
src/go/pt-mongodb-summary/templates/runningops.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package templates
|
||||
|
||||
const RunningOps = `
|
||||
# Running Ops ##################################################################################
|
||||
|
||||
Type Min Max Avg
|
||||
Insert {{printf "% 8d" .Insert.Min}} {{printf "% 8d" .Insert.Max}} {{printf "% 8d" .Insert.Avg}}/{{.SampleRate}}
|
||||
Query {{printf "% 8d" .Query.Min}} {{printf "% 8d" .Query.Max}} {{printf "% 8d" .Query.Avg}}/{{.SampleRate}}
|
||||
Update {{printf "% 8d" .Update.Min}} {{printf "% 8d" .Update.Max}} {{printf "% 8d" .Update.Avg}}/{{.SampleRate}}
|
||||
Delete {{printf "% 8d" .Delete.Min}} {{printf "% 8d" .Delete.Max}} {{printf "% 8d" .Delete.Avg}}/{{.SampleRate}}
|
||||
GetMore {{printf "% 8d" .GetMore.Min}} {{printf "% 8d" .GetMore.Max}} {{printf "% 8d" .GetMore.Avg}}/{{.SampleRate}}
|
||||
Command {{printf "% 8d" .Command.Min}} {{printf "% 8d" .Command.Max}} {{printf "% 8d" .Command.Avg}}/{{.SampleRate}}
|
||||
`
|
10
src/go/pt-mongodb-summary/templates/security.go
Normal file
10
src/go/pt-mongodb-summary/templates/security.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package templates
|
||||
|
||||
const Security = `
|
||||
# Security #####################################################################################
|
||||
Users {{.Users}}
|
||||
Roles {{.Roles}}
|
||||
Auth {{.Auth}}
|
||||
SSL {{.SSL}}
|
||||
|
||||
`
|
Reference in New Issue
Block a user