objects

package
v0.0.0-...-37acc3e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Sample Keys.
	FtsCurrBatchesBlockedByHerder   = "fts_curr_batches_blocked_by_herder"
	FtsNumBytesUsedRAM              = "fts_num_bytes_used_ram"
	FtsTotalQueriesRejectedByHerder = "fts_total_queries_rejected_by_herder"
)
View Source
const (
	// Bucket Basic Stats Keys.
	QuotaPercentUsed       = "quotaPercentUsed"
	OpsPerSec              = "opsPerSec"
	DiskFetches            = "diskFetches"
	ItemCount              = "itemCount"
	DiskUsed               = "diskUsed"
	DataUsed               = "dataUsed"
	MemUsed                = "memUsed"
	VbActiveNumNonResident = "vbActiveNumNonResident"
)
View Source
const (
	// Samples Keys
	// The size of all data files for this bucket, including the data
	// itself, meta data and temporary files.
	CouchTotalDiskSize = "couch_total_disk_size"
	// How much fragmented data there is to be compacted compared
	// to real data for the data files in this bucket.
	CouchDocsFragmentation = "couch_docs_fragmentation"
	// How much fragmented data there is to be compacted compared
	// to real data for the view index files in this bucket.
	CouchViewsFragmentation = "couch_views_fragmentation"

	HitRatio = "hit_ratio"
	// Percentage of reads per second to this bucket
	// from disk as opposed to RAM (measured from
	// ep_bg_fetches / cmd_total_gets * 100).
	EpCacheMissRate = "ep_cache_miss_rate"
	// Percentage of all items cached in RAM in this bucket.
	EpResidentItemsRate                 = "ep_resident_items_rate"
	VbAvgActiveQueueAge                 = "vb_avg_active_queue_age"
	VbAvgReplicaQueueAge                = "vb_avg_replica_queue_age"
	VbAvgPendingQueueAge                = "vb_avg_pending_queue_age"
	VbAvgTotalQueueAge                  = "vb_avg_total_queue_age"
	VbActiveResidentItemsRatio          = "vb_active_resident_items_ratio"
	VbReplicaResidentItemsRatio         = "vb_replica_resident_items_ratio"
	VbPendingResidentItemsRatio         = "vb_pending_resident_items_ratio"
	AvgDiskUpdateTime                   = "avg_disk_update_time"
	AvgDiskCommitTime                   = "avg_disk_commit_time"
	AvgBgWaitTime                       = "avg_bg_wait_time"
	AvgActiveTimestampDrift             = "avg_active_timestamp_drift"  // couchbase 5.1.1
	AvgReplicaTimestampDrift            = "avg_replica_timestamp_drift" // couchbase 5.1.1
	EpDcpViewsIndexesCount              = "ep_dcp_views+indexes_count"
	EpDcpViewsIndexesItemsRemaining     = "ep_dcp_views+indexes_items_remaining"
	EpDcpViewsIndexesProducerCount      = "ep_dcp_views+indexes_producer_count"
	EpDcpViewsIndexesTotalBacklogSize   = "ep_dcp_views+indexes_total_backlog_size"
	EpDcpViewsIndexesItemsSent          = "ep_dcp_views+indexes_items_sent"
	EpDcpViewsIndexesTotalBytes         = "ep_dcp_views+indexes_total_bytes"
	EpDcpViewsIndexesBackoff            = "ep_dcp_views+indexes_backoff"
	BgWaitCount                         = "bg_wait_count"
	BgWaitTotal                         = "bg_wait_total"
	BytesRead                           = "bytes_read"
	BytesWritten                        = "bytes_written"
	CasBadval                           = "cas_badval"
	CasHits                             = "cas_hits"
	CasMisses                           = "cas_misses"
	BucketStatsCmdGet                   = "cmd_get"
	CmdSet                              = "cmd_set"
	BucketStatsCouchDocsActualDiskSize  = "couch_docs_actual_disk_size"
	BucketStatsCouchDocsDataSize        = "couch_docs_data_size"
	CouchDocsDiskSize                   = "couch_docs_disk_size"
	BucketStatsCouchSpatialDataSize     = "couch_spatial_data_size"
	BucketStatsCouchSpatialDiskSize     = "couch_spatial_disk_size"
	CouchSpatialOps                     = "couch_spatial_ops"
	BucketStatsCouchViewsActualDiskSize = "couch_views_actual_disk_size"
	BucketStatsCouchViewsDataSize       = "couch_views_data_size"
	CouchViewsDiskSize                  = "couch_views_disk_size"
	CouchViewsOps                       = "couch_views_ops"
	CurrConnections                     = "curr_connections"
	BucketStatsCurrItems                = "curr_items"
	BucketStatsCurrItemsTot             = "curr_items_tot"
	DecrHits                            = "decr_hits"
	DecrMisses                          = "decr_misses"
	DeleteHits                          = "delete_hits"
	DeleteMisses                        = "delete_misses"
	DiskCommitCount                     = "disk_commit_count"
	DiskCommitTotal                     = "disk_commit_total"
	DiskUpdateCount                     = "disk_update_count"
	DiskUpdateTotal                     = "disk_update_total"
	DiskWriteQueue                      = "disk_write_queue"
	EpActiveAheadExceptions             = "ep_active_ahead_exceptions"
	EpActiveHlcDrift                    = "ep_active_hlc_drift"
	EpActiveHlcDriftCount               = "ep_active_hlc_drift_count"
	BucketStatsEpBgFetched              = "ep_bg_fetched"
	EpClockCasDriftThresholdExceeded    = "ep_clock_cas_drift_threshold_exceeded"
	EpDcp2IBackoff                      = "ep_dcp_2i_backoff"
	EpDcp2ICount                        = "ep_dcp_2i_count"
	EpDcp2IItemsRemaining               = "ep_dcp_2i_items_remaining"
	EpDcp2IItemsSent                    = "ep_dcp_2i_items_sent"
	EpDcp2IProducerCount                = "ep_dcp_2i_producer_count"
	EpDcp2ITotalBacklogSize             = "ep_dcp_2i_total_backlog_size"
	EpDcp2ITotalBytes                   = "ep_dcp_2i_total_bytes"
	EpDcpFtsBackoff                     = "ep_dcp_fts_backoff"
	EpDcpFtsCount                       = "ep_dcp_fts_count"
	EpDcpFtsItemsRemaining              = "ep_dcp_fts_items_remaining"
	EpDcpFtsItemsSent                   = "ep_dcp_fts_items_sent"
	EpDcpFtsProducerCount               = "ep_dcp_fts_producer_count"
	EpDcpFtsTotalBacklogSize            = "ep_dcp_fts_total_backlog_size"
	EpDcpFtsTotalBytes                  = "ep_dcp_fts_total_bytes"
	EpDcpOtherBackoff                   = "ep_dcp_other_backoff"
	EpDcpOtherCount                     = "ep_dcp_other_count"
	EpDcpOtherItemsRemaining            = "ep_dcp_other_items_remaining"
	EpDcpOtherItemsSent                 = "ep_dcp_other_items_sent"
	EpDcpOtherProducerCount             = "ep_dcp_other_producer_count"
	EpDcpOtherTotalBacklogSize          = "ep_dcp_other_total_backlog_size"
	EpDcpOtherTotalBytes                = "ep_dcp_other_total_bytes"
	EpDcpReplicaBackoff                 = "ep_dcp_replica_backoff"
	EpDcpReplicaCount                   = "ep_dcp_replica_count"
	EpDcpReplicaItemsRemaining          = "ep_dcp_replica_items_remaining"
	EpDcpReplicaItemsSent               = "ep_dcp_replica_items_sent"
	EpDcpReplicaProducerCount           = "ep_dcp_replica_producer_count"
	EpDcpReplicaTotalBacklogSize        = "ep_dcp_replica_total_backlog_size"
	EpDcpReplicaTotalBytes              = "ep_dcp_replica_total_bytes"
	EpDcpViewsBackoff                   = "ep_dcp_views_backoff"
	EpDcpViewsCount                     = "ep_dcp_views_count"
	EpDcpViewsItemsRemaining            = "ep_dcp_views_items_remaining"
	EpDcpViewsItemsSent                 = "ep_dcp_views_items_sent"
	EpDcpViewsProducerCount             = "ep_dcp_views_producer_count"
	EpDcpViewsTotalBacklogSize          = "ep_dcp_views_total_backlog_size"
	EpDcpViewsTotalBytes                = "ep_dcp_views_total_bytes"
	EpDcpXdcrBackoff                    = "ep_dcp_xdcr_backoff"
	EpDcpXdcrCount                      = "ep_dcp_xdcr_count"
	EpDcpXdcrItemsRemaining             = "ep_dcp_xdcr_items_remaining"
	EpDcpXdcrItemsSent                  = "ep_dcp_xdcr_items_sent"
	EpDcpXdcrProducerCount              = "ep_dcp_xdcr_producer_count"
	EpDcpXdcrTotalBacklogSize           = "ep_dcp_xdcr_total_backlog_size"
	EpDcpXdcrTotalBytes                 = "ep_dcp_xdcr_total_bytes"
	EpDiskqueueDrain                    = "ep_diskqueue_drain"
	EpDiskqueueFill                     = "ep_diskqueue_fill"
	EpDiskqueueItems                    = "ep_diskqueue_items"
	EpFlusherTodo                       = "ep_flusher_todo"
	EpItemCommitFailed                  = "ep_item_commit_failed"
	EpKvSize                            = "ep_kv_size"
	EpMaxSize                           = "ep_max_size"
	EpMemHighWat                        = "ep_mem_high_wat"
	EpMemLowWat                         = "ep_mem_low_wat"
	EpMetaDataMemory                    = "ep_meta_data_memory"
	EpNumNonResident                    = "ep_num_non_resident"
	EpNumOpsDelMeta                     = "ep_num_ops_del_meta"
	EpNumOpsDelRetMeta                  = "ep_num_ops_del_ret_meta"
	EpNumOpsGetMeta                     = "ep_num_ops_get_meta"
	EpNumOpsSetMeta                     = "ep_num_ops_set_meta"
	EpNumOpsSetRetMeta                  = "ep_num_ops_set_ret_meta"
	EpNumValueEjects                    = "ep_num_value_ejects"
	EpOomErrors                         = "ep_oom_errors"
	EpOpsCreate                         = "ep_ops_create"
	EpOpsUpdate                         = "ep_ops_update"
	EpOverhead                          = "ep_overhead"
	EpQueueSize                         = "ep_queue_size"
	EpReplicaAheadExceptions            = "ep_replica_ahead_exceptions"
	EpReplicaHlcDrift                   = "ep_replica_hlc_drift"
	EpReplicaHlcDriftCount              = "ep_replica_hlc_drift_count"
	EpTmpOomErrors                      = "ep_tmp_oom_errors"
	EpVbTotal                           = "ep_vb_total"
	Evictions                           = "evictions"
	BucketStatsGetHits                  = "get_hits"
	GetMisses                           = "get_misses"
	IncrHits                            = "incr_hits"
	IncrMisses                          = "incr_misses"
	BucketStatsMemUsed                  = "mem_used"
	Misses                              = "misses"
	BucketStatsOps                      = "ops"
	XdcOps                              = "xdc_ops"
	VbActiveEject                       = "vb_active_eject"
	VbActiveItmMemory                   = "vb_active_itm_memory"
	VbActiveMetaDataMemory              = "vb_active_meta_data_memory"
	VbActiveNum                         = "vb_active_num"
	BucketStatsVbActiveNumNonResident   = "vb_active_num_non_resident"
	VbActiveOpsCreate                   = "vb_active_ops_create"
	VbActiveOpsUpdate                   = "vb_active_ops_update"
	VbActiveQueueAge                    = "vb_active_queue_age"
	VbActiveQueueDrain                  = "vb_active_queue_drain"
	VbActiveQueueFill                   = "vb_active_queue_fill"
	VbActiveQueueSize                   = "vb_active_queue_size"
	VbPendingCurrItems                  = "vb_pending_curr_items"
	VbPendingEject                      = "vb_pending_eject"
	VbPendingItmMemory                  = "vb_pending_itm_memory"
	VbPendingMetaDataMemory             = "vb_pending_meta_data_memory"
	VbPendingNum                        = "vb_pending_num"
	VbPendingNumNonResident             = "vb_pending_num_non_resident"
	VbPendingOpsCreate                  = "vb_pending_ops_create"
	VbPendingOpsUpdate                  = "vb_pending_ops_update"
	VbPendingQueueAge                   = "vb_pending_queue_age"
	VbPendingQueueDrain                 = "vb_pending_queue_drain"
	VbPendingQueueFill                  = "vb_pending_queue_fill"
	VbPendingQueueSize                  = "vb_pending_queue_size"
	BucketStatsVbReplicaCurrItems       = "vb_replica_curr_items"
	VbReplicaEject                      = "vb_replica_eject"
	VbReplicaItmMemory                  = "vb_replica_itm_memory"
	VbReplicaMetaDataMemory             = "vb_replica_meta_data_memory"
	VbReplicaNum                        = "vb_replica_num"
	VbReplicaNumNonResident             = "vb_replica_num_non_resident"
	VbReplicaOpsCreate                  = "vb_replica_ops_create"
	VbReplicaOpsUpdate                  = "vb_replica_ops_update"
	VbReplicaQueueAge                   = "vb_replica_queue_age"
	VbReplicaQueueDrain                 = "vb_replica_queue_drain"
	VbReplicaQueueFill                  = "vb_replica_queue_fill"
	VbReplicaQueueSize                  = "vb_replica_queue_size"
	VbTotalQueueAge                     = "vb_total_queue_age"
	CPUIdleMs                           = "cpu_idle_ms"
	CPULocalMs                          = "cpu_local_ms"
	BucketStatsCPUUtilizationRate       = "cpu_utilization_rate"
	HibernatedRequests                  = "hibernated_requests"
	HibernatedWaked                     = "hibernated_waked"
	MemActualFree                       = "mem_actual_free"
	MemActualUsed                       = "mem_actual_used"
	BucketStatsMemFree                  = "mem_free"
	BucketStatsMemTotal                 = "mem_total"
	MemUsedSys                          = "mem_used_sys"
	RestRequests                        = "rest_requests"
	BucketStatsSwapTotal                = "swap_total"
	BucketStatsSwapUsed                 = "swap_used"

	// these keys are not present in 6.6.2 and I believe they have been deprecated.
	DEPRECATEDEpDcpCbasBackoff          = "ep_dcp_cbas_backoff"
	DEPRECATEDEpDcpCbasItemsRemaining   = "ep_dcp_cbas_items_remaining"
	DEPRECATEDEpDcpTotalBytes           = "ep_dcp_total_bytes"
	DEPRECATEDEpDcpCbasTotalBacklogSize = "ep_dcp_cbas_total_backlog_size"
	DEPRECATEDEpDataWriteFailed         = "ep_data_write_failed"
	DEPRECATEDEpDataReadFailed          = "ep_data_read_failed"
	DEPRECATEDEpDcpCbasProducerCount    = "ep_dcp_cbas_producer_count"
	DEPRECATEDEpDcpCbasCount            = "ep_dcp_cbas_count"
	DEPRECATEDEpDcpCbasItemsSent        = "ep_dcp_cbas_items_sent"
	DEPRECATEDVbActiveQuueItems         = "vb_active_queue_items"
)
View Source
const (
	// Keys for samples structures.
	CbasDiskUsed          = "cbas_disk_used"
	CbasGcCount           = "cbas_gc_count"
	CbasGcTime            = "cbas_gc_time"
	CbasHeapUsed          = "cbas_heap_used"
	CbasIoReads           = "cbas_io_reads"
	CbasIoWrites          = "cbas_io_writes"
	CbasSystemLoadAverage = "cbas_system_load_average"
	CbasThreadCount       = "cbas_thread_count"
)
View Source
const (
	DefaultNamespace                = "cb"
	DefaultUptimeMetric             = "up"
	DefaultScrapeDurationMetric     = "scrape_duration_seconds"
	DefaultUptimeMetricHelp         = "Couchbase cluster API is responding"
	DefaultScrapeDurationMetricHelp = "Scrape duration in seconds"
	ClusterLabel                    = "cluster"
	NodeLabel                       = "node"
	BucketLabel                     = "bucket"
	KeyspaceLabel                   = "keyspace"
	TargetLabel                     = "target"
	SourceLabel                     = "source"
	SearchMetricPrefix              = "fts_"
	QueryMetricPrefix               = "query_"
	IndexMetricPrefix               = "index_"
	EventingMetricPrefix            = "eventing/"
	AnalyticsMetricPrefix           = "cbas_"
)
View Source
const (
	// Samples Keys.
	EventingCheckpointFailureCount     = "eventing/checkpoint_failure_count"
	EventingBucketOpExceptionCount     = "eventing/bucket_op_exception_count"
	EventingDcpBacklog                 = "eventing/dcp_backlog"
	EventingFailedCount                = "eventing/failed_count"
	EventingN1QlOpExceptionCount       = "eventing/n1ql_op_exception_count"
	EventingOnDeleteFailure            = "eventing/on_delete_failure"
	EventingOnDeleteSuccess            = "eventing/on_delete_success"
	EventingOnUpdateFailure            = "eventing/on_update_failure"
	EventingOnUpdateSuccess            = "eventing/on_update_success"
	EventingProcessedCount             = "eventing/processed_count"
	EventingTestBucketOpExceptionCount = "eventing/test/bucket_op_exception_count"
	EventingTestCheckpointFailureCount = "eventing/test/checkpoint_failure_count"
	EventingTestDcpBacklog             = "eventing/test/dcp_backlog"
	EventingTestFailedCount            = "eventing/test/failed_count"
	EventingTestN1QlOpExceptionCount   = "eventing/test/n1ql_op_exception_count"
	EventingTestOnDeleteFailure        = "eventing/test/on_delete_failure"
	EventingTestOnDeleteSuccess        = "eventing/test/on_delete_success"
	EventingTestOnUpdateFailure        = "eventing/test/on_update_failure"
	EventingTestOnUpdateSuccess        = "eventing/test/on_update_success"
	EventingTestProcessedCount         = "eventing/test/processed_count"
	EventingTestTimeoutCount           = "eventing/test/timeout_count"
	EventingTimeoutCount               = "eventing/timeout_count"
)
View Source
const (
	// Samples Keys.
	IndexMemoryQuota  = "index_memory_quota"
	IndexMemoryUsed   = "index_memory_used"
	IndexRAMPercent   = "index_ram_percent"
	IndexRemainingRAM = "index_remaining_ram"

	// these are const keys for the Indexer Stats.
	IndexDocsIndexed          = "num_docs_indexed"
	IndexItemsCount           = "items_count"
	IndexFragPercent          = "frag_percent"
	IndexNumDocsPendingQueued = "num_docs_pending_queued"
	IndexNumRequests          = "num_requests"
	IndexCacheMisses          = "cache_misses"
	IndexCacheHits            = "cache_hits"
	IndexCacheHitPercent      = "cache_hit_percent"
	IndexNumRowsReturned      = "num_rows_returned"
	IndexResidentPercent      = "resident_percent"
	IndexAvgScanLatency       = "avg_scan_latency"
)
View Source
const (
	// System Stats Keys.
	CPUUtilizationRate = "cpu_utilization_rate"
	SwapTotal          = "swap_total"
	SwapUsed           = "swap_used"
	MemTotal           = "mem_total"
	MemFree            = "mem_free"

	// Interesting Stats Keys.
	CmdGet                                 = "cmd_get"
	CouchDocsActualDiskSize                = "couch_docs_actual_disk_size"
	CouchDocsDataSize                      = "couch_docs_data_size"
	CouchSpatialDataSize                   = "couch_spatial_data_size"
	CouchSpatialDiskSize                   = "couch_spatial_disk_size"
	CouchViewsActualDiskSize               = "couch_views_actual_disk_size"
	CouchViewsDataSize                     = "couch_views_data_size"
	CurrItems                              = "curr_items"
	CurrItemsTot                           = "curr_items_tot"
	EpBgFetched                            = "ep_bg_fetched"
	GetHits                                = "get_hits"
	InterestingStatsMemUsed                = "mem_used"
	Ops                                    = "ops"
	InterestingStatsVbActiveNumNonResident = "vb_active_num_non_resident"
	VbReplicaCurrItems                     = "vb_replica_curr_items"

	// Counters Keys.
	RebalanceSuccess        = "rebalance_success"
	RebalanceStart          = "rebalance_start"
	RebalanceFail           = "rebalance_fail"
	RebalanceStop           = "rebalance_stop"
	FailoverNode            = "failover_node"
	Failover                = "failover"
	FailoverComplete        = "failover_complete"
	FailoverIncomplete      = "failover_incomplete"
	GracefulFailoverStart   = "graceful_failover_start"
	GracefulFailoverSuccess = "graceful_failover_success"
	GracefulFailoverFail    = "graceful_failover_fail"
)
View Source
const (
	QueryAvgReqTime      = "query_avg_req_time"
	QueryAvgSvcTime      = "query_avg_svc_time"
	QueryAvgResponseSize = "query_avg_response_size"
	QueryAvgResultCount  = "query_avg_result_count"
	QueryActiveRequests  = "query_active_requests"
	QueryErrors          = "query_errors"
	QueryInvalidRequests = "query_invalid_requests"
	QueryQueuedRequests  = "query_queued_requests"
	QueryRequestTime     = "query_request_time"
	QueryRequests        = "query_requests"
	QueryRequests1000Ms  = "query_requests_1000ms"
	QueryRequests250Ms   = "query_requests_250ms"
	QueryRequests5000Ms  = "query_requests_5000ms"
	QueryRequests500Ms   = "query_requests_500ms"
	QueryResultCount     = "query_result_count"
	QueryResultSize      = "query_result_size"
	QuerySelects         = "query_selects"
	QueryServiceTime     = "query_service_time"
	QueryWarnings        = "query_warnings"
)

Variables

This section is empty.

Functions

func GetLabelKeys

func GetLabelKeys(labels []string) []string

Types

type AlternateAddresses

type AlternateAddresses struct {
	External *AlternateAddressesExternal `json:"external,omitempty"`
}

type AlternateAddressesExternal

type AlternateAddressesExternal struct {
	// Hostname is the host name to connect to (typically a L3 address)
	Hostname string `url:"hostname" json:"hostname"`
	// Ports is the map of service to external ports
	Ports *AlternateAddressesExternalPorts `url:"" json:"ports,omitempty"`
}

AlternateAddresses defines a K8S node address and port mapping for use by clients outside of the pod network. Hostname must be set, ports are ignored if zero.

type AlternateAddressesExternalPorts

type AlternateAddressesExternalPorts struct {
	// AdminPort is the admin service K8S node port (mapped to 8091)
	AdminServicePort int32 `url:"mgmt,omitempty" json:"mgmt"`
	// AdminPortSSL is the admin service K8S node port (mapped to 18091)
	AdminServicePortTLS int32 `url:"mgmtSSL,omitempty" json:"mgmtSSL"`
	// ViewServicePort is the view service K8S node port (mapped to 8092)
	ViewServicePort int32 `url:"capi,omitempty" json:"capi"`
	// ViewServicePortSSL is the view service K8S node port (mapped to 8092)
	ViewServicePortTLS int32 `url:"capiSSL,omitempty" json:"capiSSL"`
	// QueryServicePort is the query service K8S node port (mapped to 8093)
	QueryServicePort int32 `url:"n1ql,omitempty" json:"n1ql"`
	// QueryServicePortTLS is the query service K8S node port (mapped to 18093)
	QueryServicePortTLS int32 `url:"n1qlSSL,omitempty" json:"n1qlSSL"`
	// FtsServicePort is the full text search service K8S node port (mapped to 8094)
	FtsServicePort int32 `url:"fts,omitempty" json:"fts"`
	// FtsServicePortTLS is the full text search service K8S node port (mapped to 18094)
	FtsServicePortTLS int32 `url:"ftsSSL,omitempty" json:"ftsSSL"`
	// AnalyticsServicePort is the analytics service K8S node port (mapped to 8095)
	AnalyticsServicePort int32 `url:"cbas,omitempty" json:"cbas"`
	// AnalyticsServicePortTLS is the analytics service K8S node port (mapped to 18095)
	AnalyticsServicePortTLS int32 `url:"cbasSSL,omitempty" json:"cbasSSL"`
	// DataServicePort is the data service K8S node port (mapped to 11210)
	DataServicePort int32 `url:"kv,omitempty" json:"kv"`
	// DataServicePortSSL is the data service K8S node port (mapped to 11207)
	DataServicePortTLS int32 `url:"kvSSL,omitempty" json:"kvSSL"`
}

type Analytics

type Analytics struct {
	Op struct {
		Samples      map[string][]float64 `json:"samples"`
		SamplesCount int                  `json:"samplesCount"`
		IsPersistent bool                 `json:"isPersistent"`
		LastTStamp   int64                `json:"lastTStamp"`
		Interval     int                  `json:"interval"`
	} `json:"op"`
}

type BucketInfo

type BucketInfo struct {
	Name              string `json:"name"`
	BucketType        string `json:"bucketType"`
	AuthType          string `json:"authType"`
	ProxyPort         int    `json:"proxyPort"`
	URI               string `json:"uri"`
	StreamingURI      string `json:"streamingUri"`
	LocalRandomKeyURI string `json:"localRandomKeyUri"`
	Controllers       struct {
		Flush         string `json:"flush"`
		CompactAll    string `json:"compactAll"`
		CompactDB     string `json:"compactDB"`
		PurgeDeletes  string `json:"purgeDeletes"`
		StartRecovery string `json:"startRecovery"`
	} `json:"controllers"`
	Nodes []Node `json:"nodes"`
	Stats struct {
		URI              string `json:"uri"`
		DirectoryURI     string `json:"directoryURI"`
		NodeStatsListURI string `json:"nodeStatsListURI"`
	} `json:"stats"`
	NodeLocator  string `json:"nodeLocator"`
	SaslPassword string `json:"saslPassword"`
	Ddocs        struct {
		URI string `json:"uri"`
	} `json:"ddocs"`
	ReplicaIndex           bool        `json:"replicaIndex"`
	AutoCompactionSettings interface{} `json:"autoCompactionSettings"`
	UUID                   string      `json:"uuid"`
	VBucketServerMap       struct {
		HashAlgorithm string   `json:"hashAlgorithm"`
		NumReplicas   int      `json:"numReplicas"`
		ServerList    []string `json:"serverList"`
		VBucketMap    [][]int  `json:"vBucketMap"`
	} `json:"vBucketServerMap"`
	MaxTTL          int    `json:"maxTTL"`
	CompressionMode string `json:"compressionMode"`
	ReplicaNumber   int    `json:"replicaNumber"`
	ThreadsNumber   int    `json:"threadsNumber"`
	Quota           struct {
		RAM    int `json:"ram"`
		RawRAM int `json:"rawRAM"`
	} `json:"quota"`
	BucketBasicStats       map[string]float64 `json:"basicStats"`
	EvictionPolicy         string             `json:"evictionPolicy"`
	ConflictResolutionType string             `json:"conflictResolutionType"`
	BucketCapabilitiesVer  string             `json:"bucketCapabilitiesVer"`
	BucketCapabilities     []string           `json:"bucketCapabilities"`
}

type BucketStats

type BucketStats struct {
	Op struct {
		Samples      map[string][]float64 `json:"samples"`
		SamplesCount float64              `json:"samplesCount"`
		IsPersistent bool                 `json:"isPersistent"`
		LastTStamp   float64              `json:"lastTStamp"`
		Interval     float64              `json:"interval"`
	} `json:"op"`
	HotKeys []struct {
		Name string  `json:"name"`
		Ops  float64 `json:"ops"`
	} `json:"hot_keys,omitempty"`
}

type CollectorConfig

type CollectorConfig struct {
	Name      string                `json:"name"`
	Namespace string                `json:"namespace"`
	Subsystem string                `json:"subsystem"`
	Metrics   map[string]MetricInfo `json:"metrics"`
}

func GetAnalyticsCollectorDefaultConfig

func GetAnalyticsCollectorDefaultConfig() *CollectorConfig

func GetBucketInfoCollectorDefaultConfig

func GetBucketInfoCollectorDefaultConfig() *CollectorConfig

func GetBucketStatsCollectorDefaultConfig

func GetBucketStatsCollectorDefaultConfig() *CollectorConfig

func GetEventingCollectorDefaultConfig

func GetEventingCollectorDefaultConfig() *CollectorConfig

func GetIndexCollectorDefaultConfig

func GetIndexCollectorDefaultConfig() *CollectorConfig

func GetNodeCollectorDefaultConfig

func GetNodeCollectorDefaultConfig() *CollectorConfig

func GetPerNodeBucketStatsCollectorDefaultConfig

func GetPerNodeBucketStatsCollectorDefaultConfig() *CollectorConfig

func GetQueryCollectorDefaultConfig

func GetQueryCollectorDefaultConfig() *CollectorConfig

func GetSearchCollectorDefaultConfig

func GetSearchCollectorDefaultConfig() *CollectorConfig

func GetTaskCollectorDefaultConfig

func GetTaskCollectorDefaultConfig() *CollectorConfig

type Eventing

type Eventing struct {
	Op struct {
		Samples map[string][]float64 `json:"samples"`
	} `json:"op"`
}

type ExporterCollectors

type ExporterCollectors struct {
	BucketInfo         *CollectorConfig `json:"bucketInfo"`
	BucketStats        *CollectorConfig `json:"bucketStats"`
	Analytics          *CollectorConfig `json:"analytics"`
	Eventing           *CollectorConfig `json:"eventing"`
	Index              *CollectorConfig `json:"index"`
	Node               *CollectorConfig `json:"node"`
	Query              *CollectorConfig `json:"query"`
	Search             *CollectorConfig `json:"search"`
	Task               *CollectorConfig `json:"task"`
	PerNodeBucketStats *CollectorConfig `json:"perNodeBucketStats"`
}

type ExporterConfig

type ExporterConfig struct {
	CouchbaseAddress  string             `json:"couchbaseAddress"`
	CouchbasePort     int                `json:"couchbasePort"`
	CouchbaseUser     string             `json:"couchbaseUser"`
	CouchbasePassword string             `json:"couchbasePassword"`
	ServerAddress     string             `json:"serverAddress"`
	ServerPort        int                `json:"serverPort"`
	RefreshRate       int                `json:"refreshRate"`
	BackoffLimit      int                `json:"backoffLimit"`
	LogLevel          string             `json:"logLevel"`
	LogJSON           bool               `json:"logJson"`
	Token             string             `json:"token"`
	Certificate       string             `json:"certificate"`
	Key               string             `json:"key"`
	Ca                string             `json:"ca"`
	ClientCertificate string             `json:"clientCertificate"`
	ClientKey         string             `json:"clientKey"`
	Collectors        ExporterCollectors `json:"collectors"`
}

func (*ExporterConfig) ParseConfigFile

func (e *ExporterConfig) ParseConfigFile(configFilePath string) error

func (*ExporterConfig) SetDefaults

func (e *ExporterConfig) SetDefaults()

func (*ExporterConfig) SetOrDefaultBackoffLimit

func (e *ExporterConfig) SetOrDefaultBackoffLimit(backoffLimit string)

func (*ExporterConfig) SetOrDefaultCa

func (e *ExporterConfig) SetOrDefaultCa(ca string)

func (*ExporterConfig) SetOrDefaultCertificate

func (e *ExporterConfig) SetOrDefaultCertificate(certificate string)

func (*ExporterConfig) SetOrDefaultClientCertificate

func (e *ExporterConfig) SetOrDefaultClientCertificate(clientCertificate string)

func (*ExporterConfig) SetOrDefaultClientKey

func (e *ExporterConfig) SetOrDefaultClientKey(clientKey string)

func (*ExporterConfig) SetOrDefaultCouchAddress

func (e *ExporterConfig) SetOrDefaultCouchAddress(couchAddr string)

func (*ExporterConfig) SetOrDefaultCouchPassword

func (e *ExporterConfig) SetOrDefaultCouchPassword(couchPass string)

func (*ExporterConfig) SetOrDefaultCouchPort

func (e *ExporterConfig) SetOrDefaultCouchPort(couchPort string)

func (*ExporterConfig) SetOrDefaultCouchUser

func (e *ExporterConfig) SetOrDefaultCouchUser(couchUser string)

func (*ExporterConfig) SetOrDefaultKey

func (e *ExporterConfig) SetOrDefaultKey(key string)

func (*ExporterConfig) SetOrDefaultLogJSON

func (e *ExporterConfig) SetOrDefaultLogJSON(logJSON bool)

func (*ExporterConfig) SetOrDefaultLogLevel

func (e *ExporterConfig) SetOrDefaultLogLevel(logLevel string)

func (*ExporterConfig) SetOrDefaultRefreshRate

func (e *ExporterConfig) SetOrDefaultRefreshRate(refreshRate string)

func (*ExporterConfig) SetOrDefaultServerAddress

func (e *ExporterConfig) SetOrDefaultServerAddress(svrAddr string)

func (*ExporterConfig) SetOrDefaultServerPort

func (e *ExporterConfig) SetOrDefaultServerPort(svrPort string)

func (*ExporterConfig) SetOrDefaultToken

func (e *ExporterConfig) SetOrDefaultToken(token string)

func (*ExporterConfig) ValidateConfig

func (e *ExporterConfig) ValidateConfig()

type FTS

type FTS struct {
	Op struct {
		Samples map[string][]float64 `json:"samples"`
	} `json:"op"`
}

type Index

type Index struct {
	Op struct {
		Samples map[string][]float64 `json:"samples"`
	} `json:"op"`
}
type Links struct {
	Tasks struct {
		URI string `json:"uri"`
	} `json:"tasks"`
	Buckets struct {
		URI                       string `json:"uri"`
		TerseBucketsBase          string `json:"terseBucketsBase"`
		TerseStreamingBucketsBase string `json:"terseStreamingBucketsBase"`
	} `json:"buckets"`
	RemoteClusters struct {
		URI         string `json:"uri"`
		ValidateURI string `json:"validateURI"`
	} `json:"remoteClusters"`
}

type MetricInfo

type MetricInfo struct {
	Name         string   `json:"name"`
	Enabled      bool     `json:"enabled"`
	NameOverride string   `json:"nameOverride"`
	HelpText     string   `json:"helpText"`
	Labels       []string `json:"labels"`
}

func (*MetricInfo) GetPrometheusDescription

func (m *MetricInfo) GetPrometheusDescription(namespace string, subsystem string) *prometheus.Desc

func (*MetricInfo) GetPrometheusGaugeVec

func (m *MetricInfo) GetPrometheusGaugeVec(registry prometheus.Registerer, namespace string, subsystem string) *prometheus.GaugeVec

type Node

type Node struct {
	SystemStats          map[string]float64          `json:"systemStats,omitempty"`
	InterestingStats     map[string]float64          `json:"interestingStats"`
	Uptime               string                      `json:"uptime"`
	MemoryTotal          float64                     `json:"memoryTotal"`
	MemoryFree           float64                     `json:"memoryFree"`
	CouchAPIBaseHTTPS    string                      `json:"couchApiBaseHTTPS,omitempty"`
	CouchAPIBase         string                      `json:"couchApiBase"`
	McdMemoryReserved    float64                     `json:"mcdMemoryReserved"`
	McdMemoryAllocated   float64                     `json:"mcdMemoryAllocated"`
	Replication          float64                     `json:"replication,omitempty"`
	ClusterMembership    string                      `json:"clusterMembership"`
	RecoveryType         string                      `json:"recoveryType"`
	Status               string                      `json:"status"`
	OtpNode              string                      `json:"otpNode"`
	ThisNode             bool                        `json:"thisNode,omitempty"`
	OtpCookie            string                      `json:"otpCookie,omitempty"`
	Hostname             string                      `json:"hostname"`
	ClusterCompatibility int                         `json:"clusterCompatibility"`
	Version              string                      `json:"version"`
	Os                   string                      `json:"os"`
	CPUCount             interface{}                 `json:"cpuCount,omitempty"`
	Ports                *Ports                      `json:"ports,omitempty"`
	Services             []string                    `json:"services,omitempty"`
	AlternateAddresses   *AlternateAddressesExternal `json:"alternateAddresses,omitempty"`
}

type NodeProgress

type NodeProgress struct {
	DocsTotal           int64 `json:"docsTotal,omitempty"`
	DocsTransferred     int64 `json:"docsTransferred,omitempty"`
	ActiveVBucketsLeft  int64 `json:"activeVBucketsLeft,omitempty"`
	ReplicaVBucketsLeft int64 `json:"replicaVBucketsLeft,omitempty"`
}

NodeProgress is the ingoing/outgoing detailed progress of a task in a node.

type NodeService

type NodeService struct {
	Services           []string            `json:"services"`
	ThisNode           bool                `json:"thisNode,omitempty"`
	Hostname           string              `json:"hostname"`
	AlternateAddresses *AlternateAddresses `json:"alternateAddresses,omitempty"`
}

type Nodes

type Nodes struct {
	Name                   string            `json:"name"`
	Nodes                  []Node            `json:"nodes"`
	Buckets                map[string]string `json:"buckets"`        //
	RemoteClusters         map[string]string `json:"remoteClusters"` //
	Alerts                 []interface{}     `json:"alerts"`
	AlertsSilenceURL       string
	RebalanceStatus        string                 `json:"rebalanceStatus"`
	RebalanceProgressURI   string                 `json:"rebalanceProgressUri"` //
	StopRebalanceURI       string                 `json:"stopRebalanceUri"`     //
	NodeStatusesURI        string                 `json:"nodeStatusesUri"`      //
	MaxBucketCount         int                    `json:"maxBucketCount"`
	AutoCompactionSettings map[string]interface{} `json:"autoCompactionSettings"` //
	Tasks                  map[string]string      `json:"tasks"`                  //
	Counters               map[string]float64     `json:"counters"`
	IndexStatusURI         string                 `json:"indexStatusURI"`      //
	CheckPermissionsURI    string                 `json:"checkPermissionsURI"` //
	ServerGroupsURI        string                 `json:"serverGroupsUri"`     //
	ClusterName            string                 `json:"clusterName"`
	Balanced               bool                   `json:"balanced"`
	MemoryQuota            int                    `json:"memoryQuota"`
	IndexMemoryQuota       int                    `json:"indexMemoryQuota"`
	FtsMemoryQuota         int                    `json:"ftsMemoryQuota"`
	CbasMemoryQuota        int                    `json:"cbasMemoryQuota"`
	EventingMemoryQuota    int                    `json:"eventingMemoryQuota"`
	StorageTotals          StorageTotals          `json:"storageTotals"`
}

type PerNodeBucketStats

type PerNodeBucketStats struct {
	HostName string `json:"hostname,omitempty"` // per node stats only
	Op       struct {
		Samples      map[string]interface{} `json:"samples"`
		SamplesCount int                    `json:"samplesCount"`
		IsPersistent bool                   `json:"isPersistent"`
		LastTStamp   int64                  `json:"lastTStamp"`
		Interval     int                    `json:"interval"`
	} `json:"op"`
	HotKeys []struct {
		Name string  `json:"name"`
		Ops  float64 `json:"ops"`
	} `json:"hot_keys,omitempty"`
}

/pools/default/buckets/<bucket-name>/nodes/<node-name>/stats separate struct as the Samples needs to be a map[string]interface{}.

type Ports

type Ports struct {
	HTTPSMgmt int `json:"httpsMgmt"`
	HTTPSCAPI int `json:"httpsCAPI"`
	Proxy     int `json:"proxy"`
	Direct    int `json:"direct"`
}

type Query

type Query struct {
	Op struct {
		Samples map[string][]float64 `json:"samples"`
	} `json:"op"`
}

type Server

type Server struct {
	Hostname string            `json:"hostname"`
	URI      string            `json:"uri"`
	Stats    map[string]string `json:"stats"`
}

type Servers

type Servers struct {
	Servers []Server `json:"servers"`
}

type StageInfo

type StageInfo struct {
	TotalProgress   int64         `json:"totalProgress,omitempty"`
	PerNodeProgress []interface{} `json:"perNodeProgress,omitempty"`
	StartTime       string        `json:"startTime,omitempty"`
	CompletedTime   string        `json:"completedTime,omitempty"`
	TimeTaken       int64         `json:"timeTaken,omitempty"`
}

type StorageTotals

type StorageTotals struct {
	RAM struct {
		Total             float64 `json:"total"`
		QuotaTotal        float64 `json:"quotaTotal"`
		QuotaUsed         float64 `json:"quotaUsed"`
		Used              float64 `json:"used"`
		UsedByData        float64 `json:"usedByData"`
		QuotaUsedPerNode  float64 `json:"quotaUsedPerNode"`
		QuotaTotalPerNode float64 `json:"quotaTotalPerNode"`
	} `json:"ram"`
	Hdd struct {
		Total      float64 `json:"total"`
		QuotaTotal float64 `json:"quotaTotal"`
		Used       float64 `json:"used"`
		UsedByData float64 `json:"usedByData"`
		Free       float64 `json:"free"`
	} `json:"hdd"`
}

type Task

type Task struct {
	StatusID      string  `json:"statusId"`
	Type          string  `json:"type"`
	Status        string  `json:"status"`
	RefreshPeriod float64 `json:"recommendedRefreshPeriod,omitempty"`
	Progress      float64 `json:"progress,omitempty"`

	// rebalance running
	SubType string `json:"subtype,omitempty"`
	PerNode map[string]struct {
		Progress float64 `json:"progress,omitempty"`
	} `json:"perNode,omitempty"`
	DetailedProgress struct {
		Bucket       string `json:"bucket,omitempty"`
		BucketNumber int    `json:"bucketNumber,omitempty"`
		BucketCount  int    `json:"bucketCount,omitempty"`
		PerNode      map[string]struct {
			Ingoing  NodeProgress `json:"ingoing,omitempty"`
			Outgoing NodeProgress `json:"outgoing,omitempty"`
		} `json:"perNode,omitempty"`
	} `json:"detailedProgress,omitempty"`
	StageInfo struct {
		Analytics StageInfo `json:"analytics,omitempty"`
		Eventing  StageInfo `json:"eventing,omitempty"`
		Search    StageInfo `json:"search,omitempty"`
		Index     StageInfo `json:"index,omitempty"`
		Data      StageInfo `json:"data,omitempty"`
		Query     StageInfo `json:"query,omitempty"`
	} `json:"stageInfo,omitempty"`

	// rebalance not running
	StatusIsStale         bool `json:"statusIsStale"`
	MasterRequestTimedOut bool `json:"masterRequestTimedOut"`

	// compacting stuff
	Bucket       string `json:"bucket,omitempty"`
	ChangesDone  int64  `json:"changesDone,omitempty"`
	TotalChanges int64  `json:"totalChanges,omitempty"`

	// XDCR stuff
	ChangesLeft    int64         `json:"changesLeft,omitempty"`
	DocsChecked    int64         `json:"docsChecked,omitempty"`
	DocsWritten    int64         `json:"docsWritten,omitempty"`
	PauseRequested bool          `json:"pauseRequested,omitempty"`
	Continuous     bool          `json:"continuous,omitempty"`
	Source         string        `json:"source,omitempty"`
	Target         string        `json:"target,omitempty"`
	Errors         []interface{} `json:"errors,omitempty"`
	MaxVBReps      string

	// loadingSampleBucket
	Pid string `json:"pid,omitempty"`
}

/pools/default/tasks.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL