hostmetricsreceiver

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

README

Host Metrics Receiver

The Host Metrics receiver generates metrics about the host system scraped from various sources. This is intended to be used when the collector is deployed as an agent.

Supported pipeline types: metrics

Getting Started

The collection interval and the categories of metrics to be scraped can be configured:

hostmetrics:
  collection_interval: <duration> # default = 1m
  scrapers:
    <scraper1>:
    <scraper2>:
    ...

The available scrapers are:

Scraper Supported OSs Description
cpu All except Mac[1] CPU utilization metrics
disk All except Mac[1] Disk I/O metrics
load All CPU load metrics
filesystem All File System utilization metrics
memory All Memory utilization metrics
network All Network interface I/O metrics & TCP connection metrics
paging All Paging/Swap space utilization and I/O metrics
processes Linux Process count metrics
process Linux & Windows Per process CPU, Memory, and Disk I/O metrics
Notes

[1] Not supported on Mac when compiled without cgo which is the default.

Several scrapers support additional configuration:

Disk
disk:
  <include|exclude>:
    devices: [ <device name>, ... ]
    match_type: <strict|regexp>
File System
filesystem:
  <include_devices|exclude_devices>:
    devices: [ <device name>, ... ]
    match_type: <strict|regexp>
  <include_fs_types|exclude_fs_types>:
    fs_types: [ <filesystem type>, ... ]
    match_type: <strict|regexp>
  <include_mount_points|exclude_mount_points>:
    mount_points: [ <mount point>, ... ]
    match_type: <strict|regexp>
Network
network:
  <include|exclude>:
    interfaces: [ <interface name>, ... ]
    match_type: <strict|regexp>
Process
process:
  disk:
    <include|exclude>:
      names: [ <process name>, ... ]
      match_type: <strict|regexp>

Advanced Configuration

Filtering

If you are only interested in a subset of metrics from a particular source, it is recommended you use this receiver with the Filter Processor.

Different Frequencies

If you would like to scrape some metrics at a different frequency than others, you can configure multiple hostmetrics receivers with different collection_interval values. For example:

receivers:
  hostmetrics:
    collection_interval: 30s
    scrapers:
      cpu:
      memory:

  hostmetrics/disk:
    collection_interval: 1m
    scrapers:
      disk:
      filesystem:

service:
  pipelines:
    metrics:
      receivers: [hostmetrics, hostmetrics/disk]

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() component.ReceiverFactory

NewFactory creates a new factory for host metrics receiver.

Types

type Config

type Config struct {
	scraperhelper.ScraperControllerSettings `mapstructure:",squash"`
	Scrapers                                map[string]internal.Config `mapstructure:"-"`
}

Config defines configuration for HostMetrics receiver.

func (*Config) Unmarshal added in v0.25.0

func (cfg *Config) Unmarshal(componentParser *config.Parser) error

Unmarshal a config.Parser into the config struct.

func (*Config) Validate added in v0.24.0

func (cfg *Config) Validate() error

Validate checks the receiver configuration is valid

Directories

Path Synopsis
perfcounters
Package perfcounters is a thin wrapper around https://godoc.org/github.com/leoluk/perflib_exporter/perflib that provides functions to scrape raw performance counter data, without calculating rates or formatting them, from the registry.
Package perfcounters is a thin wrapper around https://godoc.org/github.com/leoluk/perflib_exporter/perflib that provides functions to scrape raw performance counter data, without calculating rates or formatting them, from the registry.

Jump to

Keyboard shortcuts

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