Documentation
¶
Index ¶
- Constants
- type ActiveTask
- type ActiveTaskTypes
- type ActiveTaskTypesByNodeName
- type ActiveTasksResponse
- type BasicAuth
- type CollectorConfig
- type CouchReplicator
- type CouchdbClient
- type CouchdbStats
- type Counter
- type DatabaseProps
- type DatabaseSizes
- type DatabaseStats
- type DatabaseStatsByDbName
- type Doc
- type DocsResponse
- type Exporter
- type Fabric
- type Histogram
- type HistogramValue
- type HttpError
- type Httpd
- type HttpdRequestMethods
- type HttpdStatusCodes
- type LogLevel
- type MangoStats
- type MembershipResponse
- type MemoryMetrics
- type MemoryStats
- type MemoryTypesByNodeName
- type NodeFeatures
- type NodeInfo
- type Percent
- type Row
- type Rows
- type SchedulerJobsResponse
- type Semaphore
- type Stats
- type StatsResponse
- type SystemResponse
- type UpdateSequence
- type Vendor
- type View
- type ViewResponse
- type ViewStats
- type ViewStatsByDesignDocName
Constants ¶
View Source
const AllDbs = "_all_dbs"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveTask ¶
type ActiveTask struct { Type string `json:"type"` Node string `json:"node,omitempty"` ChangesPending int `json:"changes_pending,omitempty"` Continuous bool `json:"continuous,omitempty"` UpdatedOn float64 `json:"updated_on,omitempty"` Source string `json:"source,omitempty"` Target string `json:"target,omitempty"` DocId string `json:"doc_id,omitempty"` }
type ActiveTaskTypes ¶
type ActiveTaskTypesByNodeName ¶
type ActiveTaskTypesByNodeName map[string]ActiveTaskTypes
type ActiveTasksResponse ¶
type ActiveTasksResponse []ActiveTask
type CollectorConfig ¶
type CouchReplicator ¶
type CouchReplicator struct { ChangesReadFailures Counter `json:"changes_read_failures"` ChangesReaderDeaths Counter `json:"changes_reader_deaths"` ChangesManagerDeaths Counter `json:"changes_manager_deaths"` ChangesQueueDeaths Counter `json:"changes_queue_deaths"` Checkpoints map[string]Counter `json:"checkpoints"` FailedStarts Counter `json:"failed_starts"` Requests Counter `json:"requests"` Responses map[string]Counter `json:"responses"` StreamResponses map[string]Counter `json:"stream_responses"` WorkerDeaths Counter `json:"worker_deaths"` WorkersStarted Counter `json:"workers_started"` ClusterIsStable Counter `json:"cluster_is_stable"` DbScans Counter `json:"db_scans"` Docs map[string]Counter `json:"docs"` Jobs map[string]Counter `json:"jobs"` Connection map[string]Counter `json:"connection"` }
type CouchdbClient ¶
type CouchdbClient struct { LocalOnly bool BaseUri string ResetRequestCount func() GetRequestCount func() int // contains filtered or unexported fields }
func NewCouchdbClient ¶
func NewCouchdbClient(uri string, localOnly bool, basicAuth BasicAuth, insecure bool) *CouchdbClient
func (*CouchdbClient) GetNodeNames ¶
func (c *CouchdbClient) GetNodeNames(localOnly bool) ([]string, error)
type CouchdbStats ¶
type CouchdbStats struct { // v1.x, and v2.x api AuthCacheHits Counter `json:"auth_cache_hits"` AuthCacheMisses Counter `json:"auth_cache_misses"` DatabaseReads Counter `json:"database_reads"` DatabaseWrites Counter `json:"database_writes"` OpenDatabases Counter `json:"open_databases"` OpenOsFiles Counter `json:"open_os_files"` RequestTime Histogram `json:"request_time"` // v2.x api Httpd Httpd `json:"httpd"` HttpdRequestMethods HttpdRequestMethods `json:"httpd_request_methods"` HttpdStatusCodes HttpdStatusCodes `json:"httpd_status_codes"` }
type DatabaseSizes ¶
type DatabaseSizes struct { Active float64 `json:"active"` // data_size File float64 `json:"file"` // disk_size External float64 `json:"external"` // uncompressed database content size }
v2.x api
type DatabaseStats ¶
type DatabaseStats struct { DataSize float64 `json:"data_size"` DiskSize float64 `json:"disk_size"` Sizes DatabaseSizes `json:"sizes,omitempty"` DiskSizeOverhead float64 DocCount float64 `json:"doc_count"` DocDelCount float64 `json:"doc_del_count"` CompactRunningBool bool `json:"compact_running"` CompactRunning float64 DiskFormatVersion float64 `json:"disk_format_version"` UpdateSeq json.RawMessage `json:"update_seq"` Views ViewStatsByDesignDocName Props DatabaseProps `json:"props,omitempty"` }
type DatabaseStatsByDbName ¶
type DatabaseStatsByDbName map[string]DatabaseStats
type DocsResponse ¶
type DocsResponse struct {
Rows Rows `json:"rows"`
}
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
func NewExporter ¶
func (*Exporter) Collect ¶
func (e *Exporter) Collect(ch chan<- prometheus.Metric)
Collect fetches the stats from configured couchdb location and delivers them as Prometheus metrics. It implements prometheus.Collector.
func (*Exporter) Describe ¶
func (e *Exporter) Describe(ch chan<- *prometheus.Desc)
Describe describes all the metrics ever exported by the couchdb exporter. It implements prometheus.Collector.
type HistogramValue ¶
type HistogramValue struct { Min float64 `json:"min"` Max float64 `json:"max"` ArithmeticMean float64 `json:"arithmetic_mean"` GeometricMean float64 `json:"geometric_mean"` HarmonicMean float64 `json:"harmonic_mean"` Median float64 `json:"median"` Variance float64 `json:"variance"` StandardDeviation float64 `json:"standard_deviation"` Skewness float64 `json:"skewness"` Kurtosis float64 `json:"kurtosis"` Percentile [][]float64 `json:"percentile"` N float64 `json:"n"` }
v2.x api
type HttpdRequestMethods ¶
type HttpdStatusCodes ¶
type MangoStats ¶
type MangoStats struct { UnindexedQueries Counter `json:"unindexed_queries"` QueryInvalidIndex Counter `json:"query_invalid_index"` TooManyDocs Counter `json:"too_many_docs_scanned"` DocsExamined Counter `json:"docs_examined"` QuorumDocsExamined Counter `json:"quorum_docs_examined"` ResultsReturned Counter `json:"results_returned"` QueryTime Histogram `json:"query_time"` EvaluateSelector Counter `json:"evaluate_selector"` }
type MembershipResponse ¶
type MemoryMetrics ¶
type MemoryStats ¶
type MemoryTypesByNodeName ¶
type MemoryTypesByNodeName map[string]MemoryMetrics
type NodeFeatures ¶
type NodeFeatures []string
type NodeInfo ¶
type NodeInfo struct { Couchdb string `json:"couchdb"` Features NodeFeatures `json:"features"` Vendor Vendor `json:"vendor"` Version string `json:"version"` }
type SchedulerJobsResponse ¶
type SchedulerJobsResponse struct { TotalRows int `json:"total_rows"` Offset int `json:"offset"` Jobs []struct { Database string `json:"database"` ID string `json:"id"` Pid string `json:"pid"` Source string `json:"source"` Target string `json:"target"` User string `json:"user"` DocID string `json:"doc_id"` History []struct { Timestamp time.Time `json:"timestamp"` Type string `json:"type"` } `json:"history"` Node string `json:"node"` StartTime time.Time `json:"start_time"` } `json:"jobs"` }
type Semaphore ¶
type Semaphore struct {
// contains filtered or unexported fields
}
func NewSemaphore ¶
NewSemaphore for concurrency, concurrency == 0 means unlimited
func (Semaphore) Abort ¶
func (s Semaphore) Abort()
Signal abort for anyone waiting on the Semaphore
type Stats ¶
type Stats struct { StatsByNodeName map[string]StatsResponse DatabasesTotal int DatabaseStatsByDbName DatabaseStatsByDbName ActiveTasksResponse ActiveTasksResponse // SchedulerJobsResponse: CouchDB 2.x+ only SchedulerJobsResponse SchedulerJobsResponse SystemByNodeName map[string]SystemResponse ApiVersion string }
type StatsResponse ¶
type StatsResponse struct { Couchdb CouchdbStats `json:"couchdb"` Mango MangoStats `json:"mango"` Up float64 `json:"-"` NodeInfo NodeInfo `json:"-"` // v1.x api Httpd Httpd `json:"httpd"` HttpdRequestMethods HttpdRequestMethods `json:"httpd_request_methods"` HttpdStatusCodes HttpdStatusCodes `json:"httpd_status_codes"` // v2.x api CouchLog LogLevel `json:"couch_log"` Fabric Fabric `json:"fabric"` CouchReplicator CouchReplicator `json:"couch_replicator"` }
type SystemResponse ¶
type SystemResponse struct {
MemoryStatsResponse MemoryStats `json:"memory"`
}
type UpdateSequence ¶
func DecodeUpdateSeq ¶
func DecodeUpdateSeq(updateSeq string) ([]UpdateSequence, error)
type ViewResponse ¶
type ViewResponse struct { UpdateSeq json.RawMessage `json:"update_seq"` Error string `json:"error,omitempty"` Reason string `json:"reason,omitempty"` }
Click to show internal directories.
Click to hide internal directories.