Documentation ¶
Index ¶
- Constants
- type AcquireCount
- type AcquiredLocks
- type ActiveClients
- type Asserts
- type BackgroundFlushing
- type BalancerStats
- type BsonD
- type BuildInfo
- type CacheStats
- type ChunksByCollection
- type ClientStats
- type CloStorage
- type CloSystemLog
- type CollStats
- type CollectionEntry
- type CommandLineOptions
- type CommandStats
- type ConcurrentTransStats
- type ConcurrentTransactions
- type ConnectionStats
- type Connections
- type CurrentOp
- type CurrentOpLockStats
- type CurrentQueue
- type Cursor
- type Cursors
- type DBRecordStats
- type Database
- type Databases
- type Document
- type Dur
- type DurStats
- type DurTiming
- type ExampleQuery
- type Extra
- type ExtraInfo
- type FlushStats
- type GetLastError
- type GetLastErrorDefaults
- type GetLastErrorModes
- type GlobalLock
- type GlobalLockStats
- type HTTP
- type HostInfo
- type Inprog
- type LockInfo
- type LockStats
- type Locks
- type MasterDoc
- type Mem
- type MemStats
- type Members
- type MetricStats
- type Metrics
- type Net
- type Network
- type NetworkStats
- type OpLogs
- type OpcountStats
- type Opcounters
- type Operation
- type OplogColStats
- type OplogEntry
- type OplogInfo
- type OplogRow
- type Optime
- type Os
- type Parsed
- type ProcessManagement
- type ProfilerStatus
- type Progress
- type Query
- type QueryExecutor
- type QueueStats
- type ReadWriteLockTimes
- type RecordAccesses
- type Repl
- type ReplMetrics
- type ReplNetwork
- type ReplStatus
- type ReplicaSetConfig
- type ReplicaSetConfigMember
- type ReplicaSetConfigSettings
- type ReplicaSetConfigTags
- type ReplicaSetStatus
- type Replication
- type SSL
- type Security
- type ServerStatus
- type Shard
- type ShardStas
- type Sharding
- type ShardingChangelogStats
- type ShardingChangelogSummary
- type ShardingChangelogSummaryId
- type ShardsInfo
- type ShardsMap
- type Storage
- type StorageEngine
- type System
- type SystemProfile
- type TimeMs
- type TransactionStats
- type Ttl
- type WiredTiger
Constants ¶
const ( REPLICA_SET_MEMBER_STARTUP = iota REPLICA_SET_MEMBER_PRIMARY REPLICA_SET_MEMBER_SECONDARY REPLICA_SET_MEMBER_RECOVERING REPLICA_SET_MEMBER_STARTUP2 REPLICA_SET_MEMBER_UNKNOWN REPLICA_SET_MEMBER_ARBITER REPLICA_SET_MEMBER_DOWN REPLICA_SET_MEMBER_ROOLBACK REPLICA_SET_MEMBER_REMOVED )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcquireCount ¶
type AcquiredLocks ¶
type AcquiredLocks struct { AcquireCount *AcquireCount `bson:"acquireCount"` AcquireWaitCount float64 `bson:"acquireWaitCount.W"` TimeAcquiringMicros float64 `bson:"timeAcquiringMicros.W"` }
type ActiveClients ¶
type BackgroundFlushing ¶
type BalancerStats ¶
type BsonD ¶
func (BsonD) MarshalJSON ¶
func (*BsonD) UnmarshalJSON ¶
type BuildInfo ¶
type BuildInfo struct { Version string VersionArray []int32 GitVersion string OpenSSLVersion string SysInfo string Bits int32 Debug bool MaxObjectSize int64 }
BuildInfo Struct to store results of calling session.BuildInfo()
type CacheStats ¶
type CacheStats struct { TrackedDirtyBytes int64 `bson:"tracked dirty bytes in the cache"` CurrentCachedBytes int64 `bson:"bytes currently in the cache"` MaxBytesConfigured int64 `bson:"maximum bytes configured"` }
CacheStats stores cache statistics for WiredTiger.
type ChunksByCollection ¶
type ClientStats ¶
type ClientStats struct { Total int64 `bson:"total"` Readers int64 `bson:"readers"` Writers int64 `bson:"writers"` }
ClientStats stores the number of active read/write operations.
type CloStorage ¶
type CloSystemLog ¶
type CollStats ¶
type CollStats struct { Sharded bool `json:"sharded"` PaddingFactorNote string `json:"paddingFactorNote"` UserFlags int64 `json:"userFlags"` Capped bool `json:"capped"` Ns string `json:"ns"` Count int64 `json:"count"` NumExtents int64 `json:"numExtents"` Size int64 `json:"size"` StorageSize int64 `json:"storageSize"` TotalIndexSize int64 `json:"totalIndexSize"` IndexSizes struct { ID int `json:"_id_"` IDHashed int `json:"_id_hashed"` } `json:"indexSizes"` AvgObjSize int64 `json:"avgObjSize"` Nindexes int64 `json:"nindexes"` Nchunks int64 `json:"nchunks"` Shards map[string]ShardStas `json:"shards"` Ok int64 `json:"ok"` }
type CollectionEntry ¶
type CollectionEntry struct { Name string `bson:"name"` Type string `bson:"type"` Options struct { Capped bool `bson:"capped"` Size int64 `bson:"size"` AutoIndexID bool `bson:"autoIndexId"` } `bson:"options"` Info struct { ReadOnly bool `bson:"readOnly"` UUID primitive.Binary `bson:"uuid"` } `bson:"info"` }
CollectionEntry represents an entry for ListCollections
type CommandLineOptions ¶
type CommandStats ¶
type ConcurrentTransStats ¶
type ConcurrentTransStats struct {
Out int64 `bson:"out"`
}
type ConcurrentTransactions ¶
type ConcurrentTransactions struct { Write ConcurrentTransStats `bson:"write"` Read ConcurrentTransStats `bson:"read"` }
type ConnectionStats ¶
type ConnectionStats struct { Current int64 `bson:"current"` Available int64 `bson:"available"` TotalCreated int64 `bson:"totalCreated"` }
ConnectionStats stores information related to incoming database connections.
type Connections ¶
type CurrentOpLockStats ¶
type CurrentOpLockStats struct { Global LockInfo `bson:"Global"` MMAPV1Journal interface{} `bson:"MMAPV1Journal"` Database interface{} `bson:"Database"` }
type CurrentQueue ¶
type DBRecordStats ¶
type DBRecordStats struct { AccessesNotInMemory int64 `bson:"accessesNotInMemory"` PageFaultExceptionsThrown int64 `bson:"pageFaultExceptionsThrown"` DBRecordAccesses map[string]RecordAccesses `bson:",inline"` }
DBRecordStats stores data related to memory operations across databases.
type Database ¶
type Database struct { Name string `bson:"name"` SizeOnDisk int64 `bson:"sizeOnDisk"` Empty bool `bson:"empty"` }
Database item plus struct to hold collections stats
type Databases ¶
type Databases struct {
Databases []Database `bson:"databases"`
}
Database struct for listDatabases command
type Dur ¶
type Dur struct { TimeMs *TimeMs `bson:"timeMs"` WriteToDataFilesMB float64 `bson:"writeToDataFilesMB"` Commits float64 `bson:"commits"` CommitsInWriteLock float64 `bson:"commitsInWriteLock"` Compression float64 `bson:"compression"` EarlyCommits float64 `bson:"earlyCommits"` JournaledMB float64 `bson:"journaledMB"` }
type DurStats ¶
type DurStats struct { Commits int64 `bson:"commits"` JournaledMB int64 `bson:"journaledMB"` WriteToDataFilesMB int64 `bson:"writeToDataFilesMB"` Compression int64 `bson:"compression"` CommitsInWriteLock int64 `bson:"commitsInWriteLock"` EarlyCommits int64 `bson:"earlyCommits"` TimeMs DurTiming }
DurStats stores information related to journaling statistics.
type DurTiming ¶
type DurTiming struct { Dt int64 `bson:"dt"` PrepLogBuffer int64 `bson:"prepLogBuffer"` WriteToJournal int64 `bson:"writeToJournal"` WriteToDataFiles int64 `bson:"writeToDataFiles"` RemapPrivateView int64 `bson:"remapPrivateView"` }
DurTiming stores information related to journaling.
type ExampleQuery ¶
type ExampleQuery struct { Ns string `bson:"ns" json:"ns"` Op string `bson:"op" json:"op"` Query bson.D `bson:"query,omitempty" json:"query,omitempty"` Command bson.D `bson:"command,omitempty" json:"command,omitempty"` OriginatingCommand bson.D `bson:"originatingCommand,omitempty" json:"originatingCommand,omitempty"` UpdateObj bson.D `bson:"updateobj,omitempty" json:"updateobj,omitempty"` }
ExampleQuery is a subset of SystemProfile
func NewExampleQuery ¶
func NewExampleQuery(doc SystemProfile) ExampleQuery
func (ExampleQuery) Db ¶
func (self ExampleQuery) Db() string
func (ExampleQuery) ExplainCmd ¶
func (self ExampleQuery) ExplainCmd() bson.D
ExplainCmd returns bson.D ready to use in https://godoc.org/labix.org/v2/mgo#Database.Run
type Extra ¶
type Extra struct { LibcVersion string `bson:"libcVersion"` PageSize float64 `bson:"pageSize"` VersionSignature string `bson:"versionSignature"` NumPages float64 `bson:"numPages"` VersionString string `bson:"versionString"` CpuFeatures string `bson:"cpuFeatures"` CpuFrequencyMHz string `bson:"cpuFrequencyMHz"` KernelVersion string `bson:"kernelVersion"` MaxOpenFiles float64 `bson:"maxOpenFiles"` }
type FlushStats ¶
type FlushStats struct { Flushes int64 `bson:"flushes"` TotalMs int64 `bson:"total_ms"` AverageMs float64 `bson:"average_ms"` LastMs int64 `bson:"last_ms"` LastFinished time.Time `bson:"last_finished"` }
FlushStats stores information about memory flushes.
type GetLastError ¶
type GetLastErrorDefaults ¶
type GetLastErrorDefaults struct { Journal bool `bson:"j,omitempty"` // If true, wait for the next journal commit before returning, rather than waiting for a full disk flush. WriteConcern int64 `bson:"w,omitempty"` // When running with replication, this is the number of servers to replicate to before returning. WTimeout int64 `bson:"wtimeout,omitempty"` // Optional. Milliseconds. Specify a value in milliseconds to control how long to wait for write propagation to complete. }
https://docs.mongodb.com/v3.2/reference/command/getLastError/#dbcmd.getLastError
type GetLastErrorModes ¶
type GetLastErrorModes map[string]*ReplicaSetConfigTags
type GlobalLock ¶
type GlobalLock struct { ActiveClients *ActiveClients `bson:"activeClients"` CurrentQueue *CurrentQueue `bson:"currentQueue"` TotalTime int64 `bson:"totalTime"` }
type GlobalLockStats ¶
type GlobalLockStats struct { TotalTime int64 `bson:"totalTime"` LockTime int64 `bson:"lockTime"` CurrentQueue *QueueStats `bson:"currentQueue"` ActiveClients *ClientStats `bson:"activeClients"` }
GlobalLockStats stores information related locks in the MMAP storage engine.
type HostInfo ¶
type HostInfo struct { Extra *Extra `bson:"extra"` Os *Os `bson:"os"` System *System `bson:"system"` ID int }
HostInfo has exported field for the 'hostInfo' command plus some other fields like Database/Collections count. We are setting those fields into a separated function
type Inprog ¶
type Inprog struct { Desc string `bson:"desc"` ConnectionId float64 `bson:"connectionId"` Opid float64 `bson:"opid"` Msg string `bson:"msg"` NumYields float64 `bson:"numYields"` Locks Locks `bson:"locks"` WaitingForLock float64 `bson:"waitingForLock"` ThreadId string `bson:"threadId"` Active float64 `bson:"active"` MicrosecsRunning float64 `bson:"microsecs_running"` SecsRunning float64 `bson:"secs_running"` Op string `bson:"op"` Ns string `bson:"ns"` Insert interface{} `bson:"insert"` PlanSummary string `bson:"planSummary"` Client string `bson:"client"` Query Query `bson:"query"` Progress Progress `bson:"progress"` KillPending float64 `bson:"killPending"` LockStats CurrentOpLockStats `bson:"lockStats"` }
type LockInfo ¶
type LockInfo struct { DeadlockCount AcquireCount `bson:"deadlockCount"` AcquireCount AcquireCount `bson:"acquireCount"` AcquireWaitCount AcquireCount `bson:"acquireWaitCount"` TimeAcquiringMicros AcquireCount `bson:"timeAcquiringMicros"` }
type LockStats ¶
type LockStats struct { TimeLockedMicros ReadWriteLockTimes `bson:"timeLockedMicros"` TimeAcquiringMicros ReadWriteLockTimes `bson:"timeAcquiringMicros"` // AcquireCount and AcquireWaitCount are new fields of the lock stats only populated on 3.0 or newer. // Typed as a pointer so that if it is nil, mongostat can assume the field is not populated // with real namespace data. AcquireCount *ReadWriteLockTimes `bson:"acquireCount,omitempty"` AcquireWaitCount *ReadWriteLockTimes `bson:"acquireWaitCount,omitempty"` }
LockStats stores information related to time spent acquiring/holding locks for a given database.
type MasterDoc ¶
type MasterDoc struct { SetName interface{} `bson:"setName"` Hosts interface{} `bson:"hosts"` Msg string `bson:"msg"` }
type MemStats ¶
type MemStats struct { Bits int64 `bson:"bits"` Resident int64 `bson:"resident"` Virtual int64 `bson:"virtual"` Supported interface{} `bson:"supported"` Mapped int64 `bson:"mapped"` MappedWithJournal int64 `bson:"mappedWithJournal"` }
MemStats stores data related to memory statistics.
type Members ¶
type Members struct { Optime map[string]Optime `bson:"optimes"` // See Optime struct OptimeDate primitive.DateTime `bson:"optimeDate"` // The last entry from the oplog that this member applied. InfoMessage string `bson:"infoMessage"` // A message ID int64 `bson:"_id"` // Server ID Name string `bson:"name"` // server name Health float64 `bson:"health"` // This field conveys if the member is up (i.e. 1) or down (i.e. 0). StateStr string `bson:"stateStr"` // A string that describes state. Uptime float64 `bson:"uptime"` // number of seconds that this member has been online. ConfigVersion float64 `bson:"configVersion"` // revision # of the replica set configuration object from previous iterations of the configuration. Self bool `bson:"self"` // true if this is the server we are currently connected State float64 `bson:"state"` // integer between 0 and 10 that represents the replica state of the member. ElectionTime primitive.Timestamp `bson:"electionTime"` // For the current primary, information regarding the election Timestamp from the operation log. ElectionDate primitive.DateTime `bson:"electionDate"` // For the current primary, an ISODate formatted date string that reflects the election date Set string `bson:"-"` StorageEngine StorageEngine }
type MetricStats ¶
type Metrics ¶
type Metrics struct { Commands map[string]CommandStats `bson:"commands"` Cursor *Cursor `bson:"cursor"` Document *Document `bson:"document"` GetLastError *GetLastError `bson:"getLastError"` Moves float64 `bson:"record.moves"` Operation *Operation `bson:"operation"` QueryExecutor *QueryExecutor `bson:"queryExecutor"` Repl *ReplMetrics `bson:"repl"` Storage *Storage `bson:"storage"` Ttl *Ttl `bson:"ttl"` }
type Net ¶
type Net struct { HTTP HTTP `bson:"http"` SSL SSL `bson:"ssl"` Port int64 `bson:"port"` BindIP string `bson:"bindIp"` MaxIncomingConnections int `bson:"maxIncomingConnections"` WireObjectCheck bool `bson:"wireObjectCheck"` IPv6 bool `bson:"ipv6"` UnixDomainSocket struct { Enabled bool `bson:"enabled"` PathPrefix string `bson:"pathPrefix"` FilePermissions int64 `bson:"filePermissions"` } `bson:"unixDomainSocket"` }
NET config options. See https://docs.mongodb.com/manual/reference/configuration-options/#net-options
type NetworkStats ¶
type NetworkStats struct { BytesIn int64 `bson:"bytesIn"` BytesOut int64 `bson:"bytesOut"` NumRequests int64 `bson:"numRequests"` }
NetworkStats stores information related to network traffic.
type OpcountStats ¶
type OpcountStats struct { Command int64 `bson:"command"` Delete int64 `bson:"delete"` GetMore int64 `bson:"getmore"` Insert int64 `bson:"insert"` Query int64 `bson:"query"` Update int64 `bson:"update"` }
OpcountStats stores information related to comamnds and basic CRUD operations.
type Opcounters ¶
type OplogColStats ¶
type OplogColStats struct { NumExtents int IndexDetails bson.M Nindexes int TotalIndexSize int64 Size int64 PaddingFactorNote string Capped bool MaxSize int64 IndexSizes bson.M GleStats struct { LastOpTime time.Time ElectionId string } `bson:"$gleStats"` StorageSize int64 PaddingFactor int64 AvgObjSize int64 LastExtentSize int64 UserFlags int64 Max int64 Ok int Ns string Count int64 }
type OplogEntry ¶
type Parsed ¶
type Parsed struct { Sharding Sharding `bson:"sharding"` Storage CloStorage `bson:"storage"` SystemLog CloSystemLog `bson:"systemLog"` Net Net `bson:"net"` ProcessManagement ProcessManagement `bson:"processManagement"` Replication Replication `bson:"replication"` Security Security `bson:"security"` }
type ProcessManagement ¶
type ProcessManagement struct {
Fork bool `bson:"fork"`
}
type ProfilerStatus ¶
type ProfilerStatus struct { Was int64 `bson:"was"` SlowMs int64 `bson:"slowms"` GleStats struct { ElectionID string `bson:"electionId"` LastOpTime int64 `bson:"lastOpTime"` } `bson:"$gleStats"` }
ProfilerStatus is a struct to hold the results of db.getProfilingLevel()
var ps proto.ProfilerStatus err := db.Run(bson.M{"profile": -1}, &ps)
type QueryExecutor ¶
type QueueStats ¶
type QueueStats struct { Total int64 `bson:"total"` Readers int64 `bson:"readers"` Writers int64 `bson:"writers"` }
QueueStats stores the number of queued read/write operations.
type ReadWriteLockTimes ¶
type ReadWriteLockTimes struct { Read int64 `bson:"R"` Write int64 `bson:"W"` ReadLower int64 `bson:"r"` WriteLower int64 `bson:"w"` }
ReadWriteLockTimes stores time spent holding read/write locks.
type RecordAccesses ¶
type RecordAccesses struct { AccessesNotInMemory int64 `bson:"accessesNotInMemory"` PageFaultExceptionsThrown int64 `bson:"pageFaultExceptionsThrown"` }
RecordAccesses stores data related to memory operations scoped to a database.
type Repl ¶
type Repl struct { Rbid float64 `bson:"rbid"` SetVersion float64 `bson:"setVersion"` ElectionId string `bson:"electionId"` Primary string `bson:"primary"` Me string `bson:"me"` Secondary bool `bson:"secondary"` SetName string `bson:"setName"` Hosts []string `bson:"hosts"` Ismaster bool `bson:"ismaster"` }
type ReplMetrics ¶
type ReplMetrics struct { Batches *MetricStats `bson:"apply.batches"` BufferSizeBytes float64 `bson:"buffer.sizeBytes"` BufferCount float64 `bson:"buffer.count"` BufferMaxSizeBytes float64 `bson:"buffer.maxSizeBytes"` Network *ReplNetwork `bson:"network"` Ops float64 `bson:"apply.ops"` PreloadDocs *MetricStats `bson:"preload.docs"` PreloadIndexes *MetricStats `bson:"preload.indexes"` }
type ReplNetwork ¶
type ReplNetwork struct { Getmores *MetricStats `bson:"getmores"` Ops float64 `bson:"ops"` ReadersCreated float64 `bson:"readersCreated"` Bytes float64 `bson:"bytes"` }
type ReplStatus ¶
type ReplStatus struct { SetName string `bson:"setName"` IsMaster interface{} `bson:"ismaster"` Secondary interface{} `bson:"secondary"` IsReplicaSet interface{} `bson:"isreplicaset"` ArbiterOnly interface{} `bson:"arbiterOnly"` Hosts []string `bson:"hosts"` Passives []string `bson:"passives"` Me string `bson:"me"` }
ReplStatus stores data related to replica sets.
type ReplicaSetConfig ¶
type ReplicaSetConfig struct { Config struct { ID string `bson:"_id,omitempty"` // The name of the replica set. Once set, you cannot change the name of a replica set. ProtocolVersion int64 `bson:"protocolVersion,omitempty"` // By default, new replica sets in MongoDB 3.2 use protocolVersion: 1. Previous versions of MongoDB use version 0. Version int64 `bson:"version,omitempty"` // An incrementing number used to distinguish revisions of the replica set configuration object from previous iterations. Members []*ReplicaSetConfigMember `bson:"members,omitempty"` // An array of member configuration documents, one for each member of the replica set. Settings *ReplicaSetConfigSettings `bson:"settings,omitempty"` // A document that contains configuration options that apply to the whole replica set. } `bson:"config,omitempty"` // https://docs.mongodb.com/v3.2/reference/replica-configuration/#replica-set-configuration-fields Ok int64 `bson:"ok,omitempty"` }
type ReplicaSetConfigMember ¶
type ReplicaSetConfigMember struct { ID int64 `bson:"_id,omitempty"` // An integer identifier of every member in the replica set. Host string `bson:"host,omitempty"` // The hostname and, if specified, the port number, of the set member. ArbiterOnly bool `bson:"arbiterOnly,omitempty"` // A boolean that identifies an arbiter. A value of true indicates that the member is an arbiter. BuildIndexes bool `bson:"buildIndexes,omitempty"` // A boolean that indicates whether the mongod builds indexes on this member. Hidden bool `bson:"hidden,omitempty"` // When this value is true, the replica set hides this instance and does not include the member in the output of db.isMaster() or isMaster. Priority int64 `bson:"priority,omitempty"` // A number that indicates the relative eligibility of a member to become a primary. Tags *ReplicaSetConfigTags `bson:"tags,omitempty"` // A tag set document containing mappings of arbitrary keys and values. SlaveDelay int64 `bson:"slaveDelay,omitempty"` // The number of seconds “behind” the primary that this replica set member should “lag”. Votes int64 `bson:"votes,omitempty"` // The number of votes a server will cast in a replica set election. }
https://docs.mongodb.com/v3.2/reference/replica-configuration/#rsconf.members
type ReplicaSetConfigSettings ¶
type ReplicaSetConfigSettings struct { ChainingAllowed bool `bson:"chainingAllowed,omitempty"` // When chainingAllowed is true, the replica set allows secondary members to replicate from other secondary members. HeartbeatTimeoutSecs int64 `bson:"heartbeatTimeoutSecs,omitempty"` // Number of seconds that the replica set members wait for a successful heartbeat from each other. HeartbeatIntervalMillis int64 `bson:"heartbeatIntervalMillis,omitempty"` // The frequency in milliseconds of the heartbeats. ElectionTimeoutMillis int64 `bson:"electionTimeoutMillis,omitempty"` // The time limit in milliseconds for detecting when a replica set’s primary is unreachable. GetLastErrorDefaults *GetLastErrorDefaults `bson:"getLastErrorDefaults,omitempty"` // A document that specifies the write concern for the replica set. GetLastErrorModes *GetLastErrorModes `bson:"getLastErrorModes,omitempty"` // A document used to define an extended write concern through the use of members[n].tags. ReplicaSetId *primitive.ObjectID `bson:"replicaSetId,omitempty"` // Replset Id (ObjectId) }
https://docs.mongodb.com/v3.2/reference/replica-configuration/#rsconf.settings
type ReplicaSetConfigTags ¶
type ReplicaSetStatus ¶
type ReplicaSetStatus struct { Date primitive.DateTime `bson:"date"` // Current date MyState float64 `bson:"myState"` // Integer between 0 and 10 that represents the replica state of the current member Term float64 `bson:"term"` // The election count for the replica set, as known to this replica set member. Mongo 3.2+ HeartbeatIntervalMillis float64 `bson:"heartbeatIntervalMillis"` // The frequency in milliseconds of the heartbeats. 3.2+ Members []Members `bson:"members"` // Ok float64 `bson:"ok"` // Set string `bson:"set"` // Replica set name }
Struct for replSetGetStatus
type Replication ¶
type Replication struct {
ReplSet string `bson:"replSet"`
}
type SSL ¶
type SSL struct { SSLOnNormalPorts bool `bson:"sslOnNormalPorts"` // deprecated since 2.6 Mode string `bson:"mode"` // disabled, allowSSL, preferSSL, requireSSL PEMKeyFile string `bson:"PEMKeyFile"` PEMKeyPassword string `bson:"PEMKeyPassword"` ClusterFile string `bson:"clusterFile"` ClusterPassword string `bson:"clusterPassword"` CAFile string `bson:"CAFile"` CRLFile string `bson:"CRLFile"` AllowConnectionsWithoutCertificates bool `bson:"allowConnectionsWithoutCertificates"` AllowInvalidCertificates bool `bson:"allowInvalidCertificates"` AllowInvalidHostnames bool `bson:"allowInvalidHostnames"` DisabledProtocols string `bson:"disabledProtocols"` FIPSMode bool `bson:"FIPSMode"` }
SSL config options. See https://docs.mongodb.com/manual/reference/configuration-options/#net-ssl-options
type Security ¶
type Security struct { KeyFile string `bson:"keyFile"` ClusterAuthMode string `bson:"clusterAuthMode"` Authorization string `bson:"authorization"` JavascriptEnabled bool `bson:javascriptEnabled"` Sasl struct { HostName string `bson:"hostName"` ServiceName string `bson:"serverName"` SaslauthdSocketPath string `bson:"saslauthdSocketPath"` } `bson:"sasl"` EnableEncryption bool `bson:"enableEncryption"` EncryptionCipherMode string `bson:"encryptionCipherMode"` EncryptionKeyFile string `bson:"encryptionKeyFile"` Kmip struct { KeyIdentifier string `bson:"keyIdentifier"` RotateMasterKey bool `bson:"rotateMasterKey"` ServerName string `bson:"serverName"` Port string `bson:"port"` ClientCertificateFile string `bson:"clientCertificateFile"` ClientCertificatePassword string `bson:"clientCertificatePassword"` ServerCAFile string `bson:"serverCAFile"` } `bson:"kmip"` }
Security is a struct to hold security related configs
type ServerStatus ¶
type ServerStatus struct { Host string `bson:"host"` Version string `bson:"version"` Process string `bson:"process"` Pid int64 `bson:"pid"` Uptime int64 `bson:"uptime"` UptimeMillis int64 `bson:"uptimeMillis"` UptimeEstimate int64 `bson:"uptimeEstimate"` LocalTime time.Time `bson:"localTime"` Asserts map[string]int64 `bson:"asserts"` BackgroundFlushing *FlushStats `bson:"backgroundFlushing"` ExtraInfo *ExtraInfo `bson:"extra_info"` Connections *ConnectionStats `bson:"connections"` Dur *DurStats `bson:"dur"` GlobalLock *GlobalLockStats `bson:"globalLock"` Locks map[string]LockStats `bson:"locks,omitempty"` Network *NetworkStats `bson:"network"` Opcounters *OpcountStats `bson:"opcounters"` OpcountersRepl *OpcountStats `bson:"opcountersRepl"` RecordStats *DBRecordStats `bson:"recordStats"` Mem *MemStats `bson:"mem"` Repl *ReplStatus `bson:"repl"` ShardCursorType map[string]interface{} `bson:"shardCursorType"` StorageEngine StorageEngine `bson:"storageEngine"` WiredTiger *WiredTiger `bson:"wiredTiger"` }
type ShardStas ¶
type ShardStas struct { Ns string `json:"ns"` Count int64 `json:"count"` Size int64 `json:"size"` AvgObjSize int64 `json:"avgObjSize"` NumExtents int64 `json:"numExtents"` StorageSize int64 `json:"storageSize"` LastExtentSize int64 `json:"lastExtentSize"` PaddingFactor int64 `json:"paddingFactor"` PaddingFactorNote string `json:"paddingFactorNote"` UserFlags int64 `json:"userFlags"` Capped bool `json:"capped"` Nindexes int64 `json:"nindexes"` IndexDetails struct { } `json:"indexDetails"` TotalIndexSize int64 `json:"totalIndexSize"` IndexSizes struct { ID int64 `json:"_id_"` IDHashed int64 `json:"_id_hashed"` } `json:"indexSizes"` Ok int `json:"ok"` }
type ShardingChangelogStats ¶
type ShardingChangelogStats struct {
Items *[]ShardingChangelogSummary
}
type ShardingChangelogSummary ¶
type ShardingChangelogSummary struct { Id *ShardingChangelogSummaryId `bson:"_id"` Count float64 `bson:"count"` }
type ShardsInfo ¶
type StorageEngine ¶
type SystemProfile ¶
type SystemProfile struct { AllUsers []interface{} `bson:"allUsers"` Client string `bson:"client"` CursorExhausted bool `bson:"cursorExhausted"` DocsExamined int `bson:"docsExamined"` NscannedObjects int `bson:"nscannedObjects"` ExecStats struct { Advanced int `bson:"advanced"` ExecutionTimeMillisEstimate int `bson:"executionTimeMillisEstimate"` InputStage struct { Advanced int `bson:"advanced"` Direction string `bson:"direction"` DocsExamined int `bson:"docsExamined"` ExecutionTimeMillisEstimate int `bson:"executionTimeMillisEstimate"` Filter struct { Date struct { Eq string `bson:"$eq"` } `bson:"date"` } `bson:"filter"` Invalidates int `bson:"invalidates"` IsEOF int `bson:"isEOF"` NReturned int `bson:"nReturned"` NeedTime int `bson:"needTime"` NeedYield int `bson:"needYield"` RestoreState int `bson:"restoreState"` SaveState int `bson:"saveState"` Stage string `bson:"stage"` Works int `bson:"works"` } `bson:"inputStage"` Invalidates int `bson:"invalidates"` IsEOF int `bson:"isEOF"` LimitAmount int `bson:"limitAmount"` NReturned int `bson:"nReturned"` NeedTime int `bson:"needTime"` NeedYield int `bson:"needYield"` RestoreState int `bson:"restoreState"` SaveState int `bson:"saveState"` Stage string `bson:"stage"` Works int `bson:"works"` } `bson:"execStats"` KeyUpdates int `bson:"keyUpdates"` KeysExamined int `bson:"keysExamined"` Locks struct { Collection struct { AcquireCount struct { R int `bson:"R"` } `bson:"acquireCount"` } `bson:"Collection"` Database struct { AcquireCount struct { R int `bson:"r"` } `bson:"acquireCount"` } `bson:"Database"` Global struct { AcquireCount struct { R int `bson:"r"` } `bson:"acquireCount"` } `bson:"Global"` MMAPV1Journal struct { AcquireCount struct { R int `bson:"r"` } `bson:"acquireCount"` } `bson:"MMAPV1Journal"` } `bson:"locks"` Millis int `bson:"millis"` Nreturned int `bson:"nreturned"` Ns string `bson:"ns"` NumYield int `bson:"numYield"` Op string `bson:"op"` Protocol string `bson:"protocol"` Query bson.D `bson:"query"` UpdateObj bson.D `bson:"updateobj"` Command bson.D `bson:"command"` OriginatingCommand bson.D `bson:"originatingCommand"` ResponseLength int `bson:"responseLength"` Ts time.Time `bson:"ts"` User string `bson:"user"` WriteConflicts int `bson:"writeConflicts"` }
docsExamined is renamed from nscannedObjects in 3.2.0 https://docs.mongodb.com/manual/reference/database-profiler/#system.profile.docsExamined
type TimeMs ¶
type TimeMs struct { WriteToDataFiles float64 `bson:"writeToDataFiles"` WriteToJournal float64 `bson:"writeToJournal"` Commits float64 `bson:"commits"` CommitsInWriteLock float64 `bson:"commitsInWriteLock"` Dt float64 `bson:"dt"` PrepLogBuffer float64 `bson:"prepLogBuffer"` RemapPrivateView float64 `bson:"remapPrivateView"` }
type TransactionStats ¶
type TransactionStats struct {
TransCheckpoints int64 `bson:"transaction checkpoints"`
}
TransactionStats stores transaction checkpoints in WiredTiger.
type WiredTiger ¶
type WiredTiger struct { Transaction TransactionStats `bson:"transaction"` Concurrent ConcurrentTransactions `bson:"concurrentTransactions"` Cache CacheStats `bson:"cache"` }
WiredTiger stores information related to the WiredTiger storage engine.
Source Files ¶
- asserts.go
- backgroundflushing.go
- balancer_stats.go
- bson.go
- buildinfo.go
- chunks_count.go
- cmdlineopts.go
- collstats.go
- connections.go
- currentOp.go
- cursors.go
- databases.go
- durability.go
- extrainfo.go
- get_shard_map.go
- globallock.go
- hostinfo.go
- listdatabases.go
- locks.go
- master_doc.go
- memory.go
- metrics.go
- network.go
- opcounters.go
- oplog.go
- profiler_status.go
- replconfig.go
- replicas.go
- replstatus.go
- server_status.go
- sharding_changelog_stats.go
- shards.go
- system.profile.go