Documentation ¶
Index ¶
Constants ¶
View Source
const ( MissingCGroup = iota MalformedCGroup UnknownCGroup DockerCGroup )
Classifiers for CGroup found
View Source
const ( DefaultTimeout = 10 * time.Second DefaultProcDir = "/proc" )
View Source
const FreshnessThreshold = 1 * time.Second
Variables ¶
This section is empty.
Functions ¶
func DumpMetrics ¶ added in v0.13.0
DumpMetrics dump the current metrics in the text format in the given writer.
func FindContainerIDByCGroup ¶
FindContainerIDByCGroup fetches cgroup information for the given PID Returns the cgroup name and the CGroup classifier Should the pid belong to more than one cgroup: returns the first one, in kernel order.
Types ¶
type CRIPodFinder ¶
type CRIPodFinder struct { ProcDir string // contains filtered or unexported fields }
func NewCRIPodFinder ¶
func NewCRIPodFinder(runtimeEndPoint string, timeout time.Duration, scanner procscanner.ProcScanner) (*CRIPodFinder, error)
func (*CRIPodFinder) FindPodByPID ¶
func (cpf *CRIPodFinder) FindPodByPID(pid int32) (string, error)
type Collector ¶ added in v0.13.0
type Collector struct {
// contains filtered or unexported fields
}
func NewCollectorFromConf ¶ added in v0.13.0
func NewSelfCollector ¶ added in v0.13.0
func (Collector) Collect ¶ added in v0.13.0
func (co Collector) Collect(ch chan<- prometheus.Metric)
Note that Collect could be called concurrently
func (Collector) Describe ¶ added in v0.13.0
func (co Collector) Describe(ch chan<- *prometheus.Desc)
type Config ¶
type Config struct { Targets []procscanner.ProcTarget `json:"targets"` ListenAddress string `json:"listenaddress"` CRIEndPoint string `json:"criendpoint"` Hostname string `json:"hostname"` DebugMode bool `json:"debugmode"` }
Config encodes the configuration of the monitoring package
func NewConfig ¶
func NewConfig() *Config
NewConfig creates a new Config object with the current defaults
func NewConfigFromFile ¶
NewConfigFromFile creates a new Config object with the settings taken from the given file. Should the file not specify a setting, the value is the default one (see NewCOnfig)
type DomainMonitor ¶
type DomainMonitor struct {
// contains filtered or unexported fields
}
func (*DomainMonitor) Update ¶
func (dm *DomainMonitor) Update() (PodInfoMap, error)
type Monitor ¶
type Monitor interface {
Update() (PodInfoMap, error)
}
func NewDomainMonitor ¶
func NewSelfMonitor ¶ added in v0.13.0
type PodInfoMap ¶ added in v0.13.0
type SelfMonitor ¶ added in v0.13.0
type SelfMonitor struct {
// contains filtered or unexported fields
}
func (*SelfMonitor) Update ¶ added in v0.13.0
func (sm *SelfMonitor) Update() (PodInfoMap, error)
Click to show internal directories.
Click to hide internal directories.