zfsexporter

package module
v0.0.0-...-78ce3d7 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2016 License: MIT Imports: 4 Imported by: 0

README

zfs_exporter

A Prometheus exporter for zfs

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatasetCollector

type DatasetCollector struct {
	UsedBytes        *prometheus.Desc
	AvailableBytes   *prometheus.Desc
	WrittenBytes     *prometheus.Desc
	LogicalUsedBytes *prometheus.Desc
	QuotaBytes       *prometheus.Desc
	// contains filtered or unexported fields
}

A DatasetCollector is a Prometheus collector for ZFS dataset metrics.

func NewDatasetCollector

func NewDatasetCollector(pools []string) *DatasetCollector

NewDatasetCollector creates a new DatasetCollector.

func (*DatasetCollector) Collect

func (c *DatasetCollector) Collect(ch chan<- prometheus.Metric)

Collect sends the metric values for each metric pertaining to ZFS datasets over to the provided prometheus Metric channel.

func (*DatasetCollector) Describe

func (c *DatasetCollector) Describe(ch chan<- *prometheus.Desc)

Describe sends the descriptors of each metric over to the provided channel. The corresponding metric values are sent separately.

type Exporter

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

An Exporter is a Prometheus exporter for the ZFS filesystem.

func New

func New(pools []string) *Exporter

New creates and returns a new Exporter which will collect metrics about ZFS zpools and datasets running on this machine.

func (*Exporter) Collect

func (e *Exporter) Collect(ch chan<- prometheus.Metric)

Collect sends the collected metrics from each of the collectors to prometheus. Collect could be called several times concurrently and thus its run is protected by a single mutex.

func (*Exporter) Describe

func (e *Exporter) Describe(ch chan<- *prometheus.Desc)

Describe sends all the descriptors of the collectors included to the provided channel.

type ZpoolCollector

type ZpoolCollector struct {
	AllocatedBytes       *prometheus.Desc
	SizeBytes            *prometheus.Desc
	FreeBytes            *prometheus.Desc
	FragmentationPercent *prometheus.Desc
	ReadOnly             *prometheus.Desc
	FreeingBytes         *prometheus.Desc
	LeakedBytes          *prometheus.Desc
	DeduplicationRatio   *prometheus.Desc
	Snapshots            *prometheus.Desc
	Filesystems          *prometheus.Desc
	Volumes              *prometheus.Desc
	// contains filtered or unexported fields
}

A ZpoolCollector is a Prometheus collector for ZFS zpool metrics.

func NewZpoolCollector

func NewZpoolCollector(pools []string) *ZpoolCollector

NewZpoolCollector creates a new ZpoolCollector.

func (*ZpoolCollector) Collect

func (c *ZpoolCollector) Collect(ch chan<- prometheus.Metric)

Collect sends the metric values for each metric pertaining to ZFS zpools over to the provided prometheus Metric channel.

func (*ZpoolCollector) Describe

func (c *ZpoolCollector) Describe(ch chan<- *prometheus.Desc)

Describe sends the descriptors of each metric over to the provided channel. The corresponding metric values are sent separately.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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