Added security checks & server storage engine

This commit is contained in:
Carlos Salguero
2017-01-19 17:19:13 -03:00
parent 6e3b2ce3ad
commit 98fa733c0c
11 changed files with 283 additions and 47 deletions

View File

@@ -1,7 +1,7 @@
package templates
const Clusterwide = `
# Cluster wide #################################################################################
# Cluster wide ###########################################################################################
Databases: {{.TotalDBsCount}}
Collections: {{.TotalCollectionsCount}}
Sharded Collections: {{.ShardedColsCount}}

View File

@@ -1,7 +1,7 @@
package templates
const HostInfo = `# This host
# Mongo Executable #############################################################################
# Mongo Executable #######################################################################################
Path to executable | {{.ProcPath}}
# Report On {{.ThisHostID}} ########################################
User | {{.ProcUserName}}

View File

@@ -1,7 +1,7 @@
package templates
const Oplog = `
# Oplog ########################################################################################
# Oplog ##################################################################################################
Oplog Size {{.Size}} Mb
Oplog Used {{.UsedMB}} Mb
Oplog Length {{.Running}}

View File

@@ -1,13 +1,13 @@
package templates
const Replicas = `
# Instances ####################################################################################
ID Host Type ReplSet
# Instances ##############################################################################################
ID Host Type ReplSet Engine
{{- if . -}}
{{- range . }}
{{printf "% 3d" .Id}} {{printf "%-30s" .Name}} {{printf "%-30s" .StateStr}} {{printf "%10s" .Set -}}
{{printf "% 3d" .Id}} {{printf "%-30s" .Name}} {{printf "%-30s" .StateStr}} {{printf "%10s" .Set }} {{printf "%20s" .StorageEngine.Name -}}
{{end}}
{{else}}
No replica sets found
no replica sets found
{{end}}
`

View File

@@ -1,7 +1,7 @@
package templates
const RunningOps = `
# Running Ops ##################################################################################
# Running Ops ############################################################################################
Type Min Max Avg
Insert {{printf "% 8d" .Insert.Min}} {{printf "% 8d" .Insert.Max}} {{printf "% 8d" .Insert.Avg}}/{{.SampleRate}}

View File

@@ -1,9 +1,16 @@
package templates
const Security = `
# Security #####################################################################################
Users {{.Users}}
Roles {{.Roles}}
Auth {{.Auth}}
SSL {{.SSL}}
`
# Security ###############################################################################################
Users : {{.Users}}
Roles : {{.Roles}}
Auth : {{.Auth}}
SSL : {{.SSL}}
Port : {{.Port}}
Bind IP: {{.BindIP}}
{{- if .WarningMsgs -}}
{{- range .WarningMsgs }}
{{ . }}
{{end}}
{{end }}
`