Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
// Namespace is the namespace of the metrics
Namespace = "mongodb"
)
Functions ¶
This section is empty.
Types ¶
type AssertsStats ¶
type AssertsStats struct { Regular float64 `bson:"regular"` Warning float64 `bson:"warning"` Msg float64 `bson:"msg"` User float64 `bson:"user"` Rollovers float64 `bson:"rollovers"` }
AssertsStats has the assets metrics
func (*AssertsStats) Describe ¶
func (asserts *AssertsStats) Describe(ch chan<- *prometheus.Desc)
Describe describes the metrics for prometheus
func (*AssertsStats) Export ¶
func (asserts *AssertsStats) Export(ch chan<- prometheus.Metric)
Export exports the metrics to prometheus.
type ConnectionStats ¶
type ConnectionStats struct { Current float64 `bson:"current"` Available float64 `bson:"available"` TotalCreated float64 `bson:"totalCreated"` }
ConnectionStats are connections metrics
func (*ConnectionStats) Describe ¶
func (connectionStats *ConnectionStats) Describe(ch chan<- *prometheus.Desc)
Describe describes the metrics for prometheus
func (*ConnectionStats) Export ¶
func (connectionStats *ConnectionStats) Export(ch chan<- prometheus.Metric)
Export exports the data to prometheus.
type Cursors ¶
type Cursors struct { TotalOpen float64 `bson:"totalOpen"` TimeOut float64 `bson:"timedOut"` TotalNoTimeout float64 `bson:"totalNoTimeout"` Pinned float64 `bson:"pinned"` }
Cursors are the cursor metrics
func (*Cursors) Describe ¶
func (cursors *Cursors) Describe(ch chan<- *prometheus.Desc)
Describe describes the metrics for prometheus
func (*Cursors) Export ¶
func (cursors *Cursors) Export(ch chan<- prometheus.Metric)
Export exports the data to prometheus.
type ExtraInfo ¶
type ExtraInfo struct { HeapUsageBytes float64 `bson:"heap_usage_bytes"` PageFaults float64 `bson:"page_faults"` }
ExtraInfo has extra info metrics
func (*ExtraInfo) Describe ¶
func (extraInfo *ExtraInfo) Describe(ch chan<- *prometheus.Desc)
Describe describes the metrics for prometheus
func (*ExtraInfo) Export ¶
func (extraInfo *ExtraInfo) Export(ch chan<- prometheus.Metric)
Export exports the metrics to prometheus.
type MemStats ¶
type MemStats struct { Bits float64 `bson:"bits"` Resident float64 `bson:"resident"` Virtual float64 `bson:"virtual"` Mapped float64 `bson:"mapped"` MappedWithJournal float64 `bson:"mappedWithJournal"` }
MemStats tracks the mem stats metrics.
func (*MemStats) Describe ¶
func (memStats *MemStats) Describe(ch chan<- *prometheus.Desc)
Describe describes the metrics for prometheus
func (*MemStats) Export ¶
func (memStats *MemStats) Export(ch chan<- prometheus.Metric)
Export exports the data to prometheus.
type NetworkStats ¶
type NetworkStats struct { BytesIn float64 `bson:"bytesIn"` BytesOut float64 `bson:"bytesOut"` NumRequests float64 `bson:"numRequests"` }
NetworkStats network stats
func (*NetworkStats) Describe ¶
func (networkStats *NetworkStats) Describe(ch chan<- *prometheus.Desc)
Describe describes the metrics for prometheus
func (*NetworkStats) Export ¶
func (networkStats *NetworkStats) Export(ch chan<- prometheus.Metric)
Export exports the data to prometheus
type ServerStatus ¶
type ServerStatus struct { Version string `bson:"version"` Uptime float64 `bson:"uptime"` UptimeEstimate float64 `bson:"uptimeEstimate"` LocalTime time.Time `bson:"localTime"` Asserts *AssertsStats `bson:"asserts"` Connections *ConnectionStats `bson:"connections"` Cursors *Cursors `bson:"cursors"` ExtraInfo *ExtraInfo `bson:"extra_info"` Mem *MemStats `bson:"mem"` Network *NetworkStats `bson:"network"` }
ServerStatus keeps the data returned by the serverStatus() method.
func (*ServerStatus) Describe ¶
func (status *ServerStatus) Describe(ch chan<- *prometheus.Desc)
Describe describes the server status for prometheus.
func (*ServerStatus) Export ¶
func (status *ServerStatus) Export(ch chan<- prometheus.Metric)
Export exports the server status to be consumed by prometheus.