moving mongodb code into toolkit repo

This commit is contained in:
Carlos Salguero
2016-12-11 23:18:56 -03:00
parent 12d65fc180
commit 47c0db3650
67 changed files with 4546 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
package templates
const BalancerStats = `
# Balancer (per day)
Success: {{.Success}}
Failed: {{.Failed}}
Splits: {{.Splits}}
Drops: {{.Drops}}
`

View 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}}`

View 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 -}}
`

View File

@@ -0,0 +1,10 @@
package templates
const Oplog = `
# Oplog ########################################################################################
Oplog Size {{.Size}} Mb
Oplog Used {{.UsedMB}} Mb
Oplog Length {{.Running}}
Last Election {{.ElectionTime}}
`

View 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}}
`

View 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}}
`

View File

@@ -0,0 +1,10 @@
package templates
const Security = `
# Security #####################################################################################
Users {{.Users}}
Roles {{.Roles}}
Auth {{.Auth}}
SSL {{.SSL}}
`