Documentation ¶
Index ¶
Constants ¶
View Source
const (
// Subsystem is prometheus subsystem name.
Subsystem = "local"
)
Variables ¶
View Source
var ( // Allocatable size of VG. VolumeGroupTotal = DefaultTallyScope.Scope.Tagged(map[string]string{ "nodename": "", "vgname": "", }).SubScope(Subsystem).Gauge("volume_group_total") //Used size of VG. VolumeGroupUsedByLocal = DefaultTallyScope.Scope.Tagged(map[string]string{ "nodename": "", "vgname": "", }).SubScope(Subsystem).Gauge("volume_group_used") //Total size of MountPoint. MountPointTotal = DefaultTallyScope.Scope.Tagged(map[string]string{ "nodename": "", "name": "", "type": "", }).SubScope(Subsystem).Gauge("mount_point_total") //Available size of MountPoint. MountPointAvailable = DefaultTallyScope.Scope.Tagged(map[string]string{ "nodename": "", "name": "", "type": "", }).SubScope(Subsystem).Gauge("mount_point_available") //Is MountPoint Bind. MountPointBind = DefaultTallyScope.Scope.Tagged(map[string]string{ "nodename": "", "name": "", }).SubScope(Subsystem).Gauge("mount_point_bind") //Total size of Device. DeviceTotal = DefaultTallyScope.Scope.Tagged(map[string]string{ "nodename": "", "name": "", "type": "", }).SubScope(Subsystem).Gauge("device_total") //Available size of Device. DeviceAvailable = DefaultTallyScope.Scope.Tagged(map[string]string{ "nodename": "", "name": "", "type": "", }).SubScope(Subsystem).Gauge("device_available") //Is Device Bind. DeviceBind = DefaultTallyScope.Scope.Tagged(map[string]string{ "nodename": "", "name": "", }).SubScope(Subsystem).Gauge("device_bind") //allocated number. AllocatedNum = DefaultTallyScope.Scope.Tagged(map[string]string{ "nodename": "", }).SubScope(Subsystem).Gauge("allocated_num") // storage_name // LVM: VG name // MountPoint: mount path // Device: device path LocalPV = DefaultTallyScope.Scope.Tagged(map[string]string{ "nodename": "", "pv_name": "", "pv_type": "", "pvc_name": "", "pvc_ns": "", "status": "", "storage_name": "", }).SubScope(Subsystem).Gauge("local_pv") //pod inline volume. InlineVolume = DefaultTallyScope.Scope.Tagged(map[string]string{ "nodename": "", "pod_namespace": "", "pod_name": "", "vgname": "", "volume_name": "", }).SubScope(Subsystem).Gauge("inline_volume") )
View Source
var ( ErrMetricsInitRegistryError = errors.New("metrics: can not init metrics registry") ErrMetricsDoNotExist = errors.New("metrics: metrics do not exists") ErrMetricsIsDuplicated = errors.New("metrics: metric is duplicated") )
View Source
var DefaultTallyBuckets = tally.ValueBuckets{.01, .05, .1, .2, .5, .8, .9, 1, 5, 10, 15, 30, 60, 90, 120}
Functions ¶
func DefaultRegistry ¶
func DefaultRegistry() prometheus.Registerer
默认prometheus.DefaultRegisterer, 没有特殊需要,不用使用NewRegisterer
Types ¶
type TallyScope ¶
metrics 发布器
var DefaultTallyScope *TallyScope
TODO 默认metrics Scope
func NewTallyScope ¶
创建
Click to show internal directories.
Click to hide internal directories.