system

package
v6.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package system is a Metricbeat module that contains MetricSets that collect system level information like CPU and memory stats.

Index

Constants

This section is empty.

Variables

View Source
var (
	HostFS = flag.String("system.hostfs", "", "mountpoint of the host's filesystem for use in monitoring a host from within a container")
)
View Source
var (
	// NumCPU is the number of CPU cores in the system. Changes to operating
	// system CPU allocation after process startup are not reflected.
	NumCPU = runtime.NumCPU()
)

Functions

func NewModule

func NewModule(base mb.BaseModule) (mb.Module, error)

func Round

func Round(val float64) (newVal float64)

Round rounds the given float64 value and ensures that it has a maximum of four decimal places.

Types

type CPUCoreMetrics

type CPUCoreMetrics CPUMetrics

CPUCoreMonitor is used to monitor the usage of individual CPU cores.

func (*CPUCoreMetrics) Percentages

func (m *CPUCoreMetrics) Percentages() CPUPercentages

Percentages returns CPU percentage usage information for the core. The values range from [0, 100%].

func (*CPUCoreMetrics) Ticks

func (m *CPUCoreMetrics) Ticks() CPUTicks

Ticks returns the raw number of "ticks". The value is a counter (though it may roll over).

type CPUCoresMonitor

type CPUCoresMonitor struct {
	// contains filtered or unexported fields
}

CPUCoresMonitor is used to monitor the usage information of all the CPU cores in the system.

func (*CPUCoresMonitor) Sample

func (m *CPUCoresMonitor) Sample() ([]CPUCoreMetrics, error)

Sample collects a new sample of the metrics from all CPU cores.

type CPUMetrics

type CPUMetrics struct {
	// contains filtered or unexported fields
}

func (*CPUMetrics) NormalizedPercentages

func (m *CPUMetrics) NormalizedPercentages() CPUPercentages

NormalizedPercentages returns CPU percentage usage information that is normalized by the number of CPU cores (NumCPU). The values will range from 0 to 100%.

func (*CPUMetrics) Percentages

func (m *CPUMetrics) Percentages() CPUPercentages

Percentages returns CPU percentage usage information. The values range from 0 to 100% * NumCPU.

func (*CPUMetrics) Ticks

func (m *CPUMetrics) Ticks() CPUTicks

type CPUMonitor

type CPUMonitor struct {
	// contains filtered or unexported fields
}

CPUMonitor is used to monitor the overal CPU usage of the system.

func (*CPUMonitor) Sample

func (m *CPUMonitor) Sample() (*CPUMetrics, error)

Sample collects a new sample of the CPU usage metrics.

type CPUPercentages

type CPUPercentages struct {
	User    float64
	System  float64
	Idle    float64
	IOWait  float64
	IRQ     float64
	Nice    float64
	SoftIRQ float64
	Steal   float64
	Total   float64
}

type CPUTicks

type CPUTicks struct {
	User    uint64
	System  uint64
	Idle    uint64
	IOWait  uint64
	IRQ     uint64
	Nice    uint64
	SoftIRQ uint64
	Steal   uint64
}

type LoadAverages

type LoadAverages struct {
	OneMinute     float64
	FiveMinute    float64
	FifteenMinute float64
}

type LoadMetrics

type LoadMetrics struct {
	// contains filtered or unexported fields
}

func Load

func Load() (*LoadMetrics, error)

Load returns CPU load information for the previous 1, 5, and 15 minute periods.

func (*LoadMetrics) Averages

func (m *LoadMetrics) Averages() LoadAverages

Averages return the CPU load averages. These values should range from 0 to NumCPU.

func (*LoadMetrics) NormalizedAverages

func (m *LoadMetrics) NormalizedAverages() LoadAverages

NormalizedAverages return the CPU load averages normalized by the NumCPU. These values should range from 0 to 1.

type Module

type Module struct {
	mb.BaseModule
	HostFS string // Mountpoint of the host's filesystem for use in monitoring inside a container.
}

Directories

Path Synopsis
_meta
Package core collects cpu core metrics from the host OS.
Package core collects cpu core metrics from the host OS.
Package cpu collects CPU metrics from the host OS.
Package cpu collects CPU metrics from the host OS.
Package diskio fetches disk IO metrics from the OS.
Package diskio fetches disk IO metrics from the OS.
Package filesystem provides a MetricSet implementation that fetches metrics for each of the mounted file systems.
Package filesystem provides a MetricSet implementation that fetches metrics for each of the mounted file systems.
Package fsstat provides a MetricSet for fetching aggregated filesystem stats.
Package fsstat provides a MetricSet for fetching aggregated filesystem stats.
Package load collects system CPU load metrics from the host OS.
Package load collects system CPU load metrics from the host OS.
Package memory collects memory metrics from the host OS.
Package memory collects memory metrics from the host OS.
Package network provides network IO metrics from the OS.
Package network provides network IO metrics from the OS.
Package process collects metrics about the running processes using information from the operating system.
Package process collects metrics about the running processes using information from the operating system.
Package process_summary collects high level summary metrics about the running processes.
Package process_summary collects high level summary metrics about the running processes.
Package socket captures active sockets and the processes that own them.
Package socket captures active sockets and the processes that own them.
Package uptime reports the system's uptime.
Package uptime reports the system's uptime.

Jump to

Keyboard shortcuts

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