Documentation ¶
Index ¶
- Variables
- func CollectMetrics() (chan struct{}, error)
- func InitGluterMetrics(clusterLabel string, configPath string, metrics []string) error
- type DiskStatus
- type ExportedGaugeVec
- type LVMStat
- type Metric
- type MetricLabel
- type MetricWithTTL
- type PeerMetrics
- type ProcMounts
- type ThinPoolStat
- type VGDetails
- type VGReport
- type VGs
Constants ¶
This section is empty.
Variables ¶
var ClusterIDLabel = MetricLabel{
Name: "cluster_id",
Help: "Cluster ID",
}
Functions ¶
func CollectMetrics ¶ added in v0.2.6
func CollectMetrics() (chan struct{}, error)
CollectMetrics collects all the registered metrics
Types ¶
type DiskStatus ¶
type DiskStatus struct { All float64 `json:"all"` Used float64 `json:"used"` Free float64 `json:"free"` InodesAll float64 `json:"inodesall"` InodesFree float64 `json:"inodesfree"` InodesUsed float64 `json:"inodesused"` }
DiskStatus represents Disk usage
type ExportedGaugeVec ¶
type ExportedGaugeVec struct { Namespace string Name string Help string LongHelp string Labels []string GaugeVec *prometheus.GaugeVec Metrics map[uint64]MetricWithTTL TTL time.Duration }
ExportedGaugeVec represents each GaugeVec with additional information
func (*ExportedGaugeVec) RemoveStaleMetrics ¶
func (gv *ExportedGaugeVec) RemoveStaleMetrics()
RemoveStaleMetrics removes all the stale metrics which are not exported for TTL period.
func (*ExportedGaugeVec) Set ¶
func (gv *ExportedGaugeVec) Set(labels prometheus.Labels, value float64)
Set updates the Gauge Value and last update time
type LVMStat ¶
type LVMStat struct { Device string UUID string Name string DataPercent float64 PoolLV string Attr string Size float64 Path string MetadataSize float64 MetadataPercent float64 VGName string VGExtentTotal float64 VGExtentAlloc float64 }
LVMStat represents LVM details
type Metric ¶
type Metric struct { Name string Help string LongHelp string Namespace string Disabled bool Labels []MetricLabel TTL time.Duration }
Metric represents Prometheus metric
func (*Metric) LabelNames ¶
LabelNames returns list of Prometheus labels
type MetricLabel ¶
MetricLabel represents Prometheus Label
type MetricWithTTL ¶
type MetricWithTTL struct { LastUpdated time.Time Labels prometheus.Labels }
MetricWithTTL represents the metric with label combinations and Last updated time details
type PeerMetrics ¶
type PeerMetrics struct { PVCount int // total Physical Volume counts LVCountMap map[string]int // collects lv count for each Volume Group ThinPoolCountMap map[string]int // collects thinpool count for each Volume Group VGCount int // no: of Volume Groups }
PeerMetrics : exposes PV, LV, VG counts
func NewPeerMetrics ¶
func NewPeerMetrics() (*PeerMetrics, error)
NewPeerMetrics : provides a way to get the consolidated metrics (such PV, LV, VG counts)
type ProcMounts ¶
ProcMounts represents list of items from /proc/mounts
type ThinPoolStat ¶
type ThinPoolStat struct { ThinPoolName string ThinPoolVGName string ThinPoolDataTotal float64 ThinPoolDataUsed float64 ThinPoolMetadataTotal float64 ThinPoolMetadataUsed float64 }
ThinPoolStat represents thin pool LV details
type VGDetails ¶
type VGDetails struct { LVUUID string `json:"lv_uuid"` LVName string `json:"lv_name"` DataPercent string `json:"data_percent"` PoolLV string `json:"pool_lv"` LVAttr string `json:"lv_attr"` LVSize string `json:"lv_size"` LVPath string `json:"lv_path"` LVMetadataSize string `json:"lv_metadata_size"` MetadataPercent string `json:"metadata_percent"` VGName string `json:"vg_name"` VGExtentTotal string `json:"vg_extent_count"` VGExtentFree string `json:"vg_free_count"` }
VGDetails represents a single VG detail