filesystem

package
v5.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2017 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package filesystem provides a MetricSet implementation that fetches metrics for each of the mounted file systems.

An example event looks as following:

{
  "@timestamp": "2016-05-25T20:51:36.813Z",
  "beat": {
    "hostname": "host.example.com",
    "name": "host.example.com"
  },
  "metricset": {
    "module": "system",
    "name": "filesystem",
    "rtt": 55
  },
  "system": {
    "filesystem": {
      "avail": 13838553088,
      "device_name": "/dev/disk1",
      "files": 60981246,
      "free": 14100697088,
      "free_files": 3378553,
      "mount_point": "/",
      "total": 249779191808,
      "used": 235678494720,
      "used_p": 0.9435
    }
  },
  "type": "metricsets"
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFileSystemUsedPercentage

func AddFileSystemUsedPercentage(f *FileSystemStat)

func CollectFileSystemStats

func CollectFileSystemStats(fss []sigar.FileSystem) []common.MapStr

func GetFileSystemList

func GetFileSystemList() ([]sigar.FileSystem, error)

func GetFileSystemStats

func GetFileSystemStats() ([]common.MapStr, error)

func GetFilesystemEvent

func GetFilesystemEvent(fsStat *FileSystemStat) common.MapStr

func New

func New(base mb.BaseMetricSet) (mb.MetricSet, error)

New creates and returns a new instance of MetricSet.

Types

type FileSystemStat

type FileSystemStat struct {
	sigar.FileSystemUsage
	DevName     string  `json:"device_name"`
	Mount       string  `json:"mount_point"`
	UsedPercent float64 `json:"used_p"`
	// contains filtered or unexported fields
}

func GetFileSystemStat

func GetFileSystemStat(fs sigar.FileSystem) (*FileSystemStat, error)

type MetricSet

type MetricSet struct {
	mb.BaseMetricSet
}

MetricSet for fetching filesystem metrics.

func (*MetricSet) Fetch

func (m *MetricSet) Fetch() ([]common.MapStr, error)

Fetch fetches filesystem metrics for all mounted filesystems and returns an event for each mount point.

Jump to

Keyboard shortcuts

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