Documentation
¶
Index ¶
- Constants
- func InitPrometheusRegistry(mountPath string) *prometheus.Registry
- func ServeCollector()
- func ServeHTTP(registry *prometheus.Registry, settings *serverSettings)
- func ServeHTTPS(registry *prometheus.Registry, settings *serverSettings)
- func StatDisk(path string) (*unix.Statfs_t, error)
- type CollectHandler
- type DiskCollector
- type DiskInfo
- type PrometheusDiskInfo
- type UnixDiskStat
Constants ¶
View Source
const ( MetricsPort = "METRICS_PORT" Address = "METRICS_ADDRESS" DefaultPort = 8080 )
Variables ¶
This section is empty.
Functions ¶
func InitPrometheusRegistry ¶
func InitPrometheusRegistry(mountPath string) *prometheus.Registry
func ServeCollector ¶
func ServeCollector()
func ServeHTTP ¶
func ServeHTTP(registry *prometheus.Registry, settings *serverSettings)
func ServeHTTPS ¶
func ServeHTTPS(registry *prometheus.Registry, settings *serverSettings)
Types ¶
type CollectHandler ¶
type CollectHandler struct {
// contains filtered or unexported fields
}
func (*CollectHandler) Collect ¶
func (h *CollectHandler) Collect(ch chan<- prometheus.Metric)
func (*CollectHandler) Describe ¶
func (h *CollectHandler) Describe(ch chan<- *prometheus.Desc)
func (*CollectHandler) Register ¶
func (h *CollectHandler) Register(c DiskCollector)
type DiskCollector ¶
type DiskCollector interface {
Collect() PrometheusDiskInfo
}
type PrometheusDiskInfo ¶
type PrometheusDiskInfo struct { DiskInfo DescSize *prometheus.Desc DescUsed *prometheus.Desc DescFree *prometheus.Desc DescAvailable *prometheus.Desc }
type UnixDiskStat ¶
type UnixDiskStat struct {
PrometheusDiskInfo
}
func InitPd ¶
func InitPd(path string) (p *UnixDiskStat)
Init the description for the Prometheus metrics for disks
func (UnixDiskStat) Collect ¶
func (p UnixDiskStat) Collect() PrometheusDiskInfo
func (*UnixDiskStat) InitDp ¶
func (d *UnixDiskStat) InitDp(path string)
Click to show internal directories.
Click to hide internal directories.