filesystemscraper

package
v0.103.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TypeStr the value of "type" key in configuration.
	TypeStr = "filesystem"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// MetricsBuilderConfig allows to customize scraped metrics/attributes representation.
	metadata.MetricsBuilderConfig `mapstructure:",squash"`
	internal.ScraperConfig

	// IncludeVirtualFS will also capture filesystems such as tmpfs, ramfs
	// and other filesystem types that do no have an associated physical device.
	IncludeVirtualFS bool `mapstructure:"include_virtual_filesystems"`

	// IncludeDevices specifies a filter on the devices that should be included in the generated metrics.
	IncludeDevices DeviceMatchConfig `mapstructure:"include_devices"`
	// ExcludeDevices specifies a filter on the devices that should be excluded from the generated metrics.
	ExcludeDevices DeviceMatchConfig `mapstructure:"exclude_devices"`

	// IncludeFSTypes specifies a filter on the filesystem types that should be included in the generated metrics.
	IncludeFSTypes FSTypeMatchConfig `mapstructure:"include_fs_types"`
	// ExcludeFSTypes specifies a filter on the filesystem types points that should be excluded from the generated metrics.
	ExcludeFSTypes FSTypeMatchConfig `mapstructure:"exclude_fs_types"`

	// IncludeMountPoints specifies a filter on the mount points that should be included in the generated metrics.
	// When `root_path` is set, the mount points must be from the host's perspective.
	IncludeMountPoints MountPointMatchConfig `mapstructure:"include_mount_points"`
	// ExcludeMountPoints specifies a filter on the mount points that should be excluded from the generated metrics.
	// When `root_path` is set, the mount points must be from the host's perspective.
	ExcludeMountPoints MountPointMatchConfig `mapstructure:"exclude_mount_points"`
}

Config relating to FileSystem Metric Scraper.

type DeviceMatchConfig

type DeviceMatchConfig struct {
	filterset.Config `mapstructure:",squash"`

	Devices []string `mapstructure:"devices"`
}

type FSTypeMatchConfig

type FSTypeMatchConfig struct {
	filterset.Config `mapstructure:",squash"`

	FSTypes []string `mapstructure:"fs_types"`
}

type Factory

type Factory struct {
}

Factory is the Factory for scraper.

func (*Factory) CreateDefaultConfig

func (f *Factory) CreateDefaultConfig() internal.Config

CreateDefaultConfig creates the default configuration for the Scraper.

func (*Factory) CreateMetricsScraper

func (f *Factory) CreateMetricsScraper(
	ctx context.Context,
	settings receiver.Settings,
	config internal.Config,
) (scraperhelper.Scraper, error)

CreateMetricsScraper creates a scraper based on provided config.

func (*Factory) Type

func (f *Factory) Type() string

Type gets the type of the scraper config created by this Factory.

type MountPointMatchConfig

type MountPointMatchConfig struct {
	filterset.Config `mapstructure:",squash"`

	MountPoints []string `mapstructure:"mount_points"`
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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