Skip to content

io.systemd.Metrics

Metrics APIs

Property Value
Go package github.com/rossedman/sdvarlink/systemd/latest/metrics
Available since systemd v260
Methods · types · errors 2 · 1 · 1

Methods

List

streaming (requires more)

Method to get a list of metrics among which the collection of related metrics forms a metric family

func (c *Client) List(ctx context.Context) iter.Seq2[*ListOut, error]

Reply

Field Type Description
name string Metric family name, e.g. io.systemd.Manager.unitsByTypeTotal or io.systemd.Manager.unitActiveState
object ?string Metric object name can be unit name, process name, etc, e.g. dev-hvc0.device
fields ?object Metric fields are values to differentiate between different metrics in the same metric family
value any Metric value

Describe

streaming (requires more)

Method to get the metric families

func (c *Client) Describe(ctx context.Context) iter.Seq2[*DescribeOut, error]

Reply

Field Type Description
name string Metric family name
description string Metric family description
type MetricFamilyType Metric family type

Types

MetricFamilyType

An enum representing various metric family types

Value Description
counter A counter metric family type which is a monotonically increasing value
gauge A gauge metric family type which is a value that can go up and down
string A string metric family type

Errors

Error Go type Description
NoSuchMetric NoSuchMetricError No such metric found