Help us shape the future of Go! Take the 2026 Go Developer Survey

lmsensorsexporter

package module
v0.0.0-...-fcf496f Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2016 License: MIT Imports: 3 Imported by: 0

README

lmsensors_exporter Build Status GoDoc

Command lmsensors_exporter provides a Prometheus exporter for lm_sensors sensor metrics. MIT Licensed.

Usage

Available flags for lmsensors_exporter include:

$ ./lmsensors_exporter -h
Usage of ./lmsensors_exporter:
  -telemetry.addr string
        address for lmsensors exporter (default ":9165")
  -telemetry.path string
        URL path for surfacing collected metrics (default "/metrics")

Documentation

Overview

Package lmsensorsexporter provides the Exporter type used in the lmsensors_exporter Prometheus exporter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CurrentCollector

type CurrentCollector struct {
	Amperes *prometheus.Desc
	Alarm   *prometheus.Desc
	// contains filtered or unexported fields
}

A CurrentCollector is a Prometheus collector for lmsensors current sensor metrics.

func NewCurrentCollector

func NewCurrentCollector(devices []*lmsensors.Device) *CurrentCollector

NewCurrentCollector creates a new CurrentCollector.

func (*CurrentCollector) Collect

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

Collect sends the metric values for each metric created by the CurrentCollector to the provided prometheus Metric channel.

func (*CurrentCollector) Describe

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

Describe sends the descriptors of each metric over to the provided channel.

type Exporter

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

An Exporter is a Prometheus exporter for lmsensors metrics. It wraps all lmsensors metrics collectors and provides a single global exporter which can serve metrics.

It implements the prometheus.Collector interface in order to register with Prometheus.

func New

func New(s *lmsensors.Scanner) *Exporter

New creates a new Exporter which collects metrics using the input Scanner.

func (*Exporter) Collect

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

Collect sends the collected metrics from each of the collectors to prometheus.

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 FanCollector

type FanCollector struct {
	RPM   *prometheus.Desc
	Alarm *prometheus.Desc
	// contains filtered or unexported fields
}

A FanCollector is a Prometheus collector for lmsensors fan sensor metrics.

func NewFanCollector

func NewFanCollector(devices []*lmsensors.Device) *FanCollector

NewFanCollector creates a new FanCollector.

func (*FanCollector) Collect

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

Collect sends the metric values for each metric created by the FanCollector to the provided prometheus Metric channel.

func (*FanCollector) Describe

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

Describe sends the descriptors of each metric over to the provided channel.

type IntrusionCollector

type IntrusionCollector struct {
	Alarm *prometheus.Desc
	// contains filtered or unexported fields
}

A IntrusionCollector is a Prometheus collector for lmsensors intrusion sensor metrics.

func NewIntrusionCollector

func NewIntrusionCollector(devices []*lmsensors.Device) *IntrusionCollector

NewIntrusionCollector creates a new IntrusionCollector.

func (*IntrusionCollector) Collect

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

Collect sends the metric values for each metric created by the IntrusionCollector to the provided prometheus Metric channel.

func (*IntrusionCollector) Describe

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

Describe sends the descriptors of each metric over to the provided channel.

type TemperatureCollector

type TemperatureCollector struct {
	DegreesCelsius *prometheus.Desc
	Alarm          *prometheus.Desc
	// contains filtered or unexported fields
}

A TemperatureCollector is a Prometheus collector for lmsensors temperature sensor metrics.

func NewTemperatureCollector

func NewTemperatureCollector(devices []*lmsensors.Device) *TemperatureCollector

NewTemperatureCollector creates a new TemperatureCollector.

func (*TemperatureCollector) Collect

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

Collect sends the metric values for each metric created by the TemperatureCollector to the provided prometheus Metric channel.

func (*TemperatureCollector) Describe

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

Describe sends the descriptors of each metric over to the provided channel.

type VoltageCollector

type VoltageCollector struct {
	Volts *prometheus.Desc
	Alarm *prometheus.Desc
	// contains filtered or unexported fields
}

A VoltageCollector is a Prometheus collector for lmsensors voltage sensor metrics.

func NewVoltageCollector

func NewVoltageCollector(devices []*lmsensors.Device) *VoltageCollector

NewVoltageCollector creates a new VoltageCollector.

func (*VoltageCollector) Collect

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

Collect sends the metric values for each metric created by the VoltageCollector to the provided prometheus Metric channel.

func (*VoltageCollector) Describe

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

Describe sends the descriptors of each metric over to the provided channel.

Directories

Path Synopsis
cmd
lmsensors_exporter command
Command lmsensors_exporter provides a Prometheus exporter for lmsensors sensor metrics.
Command lmsensors_exporter provides a Prometheus exporter for lmsensors sensor metrics.

Jump to

Keyboard shortcuts

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