Documentation ¶
Index ¶
Constants ¶
const ( // EngineTelemetryPort specifies the default port for engine telemetry. EngineTelemetryPort = 9191 // ClientTelemetryPort specifies the default port for client telemetry. ClientTelemetryPort = 9192 )
Variables ¶
This section is empty.
Functions ¶
func StartExporter ¶
StartExporter starts the Prometheus exporter.
Types ¶
type ClientCollector ¶
type ClientCollector struct {
// contains filtered or unexported fields
}
ClientCollector is a metrics collector for DAOS client metrics.
func NewClientCollector ¶
func NewClientCollector(ctx context.Context, log logging.Logger, source *ClientSource, opts *CollectorOpts) (*ClientCollector, error)
NewClientCollector creates a new ClientCollector instance.
func (*ClientCollector) Collect ¶
func (c *ClientCollector) Collect(ch chan<- prometheus.Metric)
func (*ClientCollector) Describe ¶
func (c *ClientCollector) Describe(ch chan<- *prometheus.Desc)
type ClientSource ¶
type ClientSource struct { MetricSource // contains filtered or unexported fields }
ClientSource is a metrics source for DAOS client metrics.
func NewClientSource ¶
NewClientSource creates a new ClientSource for client metrics.
type CollectorOpts ¶
CollectorOpts contains options for the metrics collector.
type EngineCollector ¶
type EngineCollector struct {
// contains filtered or unexported fields
}
EngineCollector collects metrics from DAOS Engine sources.
func NewEngineCollector ¶
func NewEngineCollector(log logging.Logger, opts *CollectorOpts, sources ...*EngineSource) (*EngineCollector, error)
NewEngineCollector initializes a new collector for DAOS Engine sources.
func (*EngineCollector) AddSource ¶
func (c *EngineCollector) AddSource(es *EngineSource, cleanup func())
AddSource adds an EngineSource to the Collector.
func (*EngineCollector) Collect ¶
func (c *EngineCollector) Collect(ch chan<- prometheus.Metric)
func (*EngineCollector) Describe ¶
func (c *EngineCollector) Describe(ch chan<- *prometheus.Desc)
func (*EngineCollector) RemoveSource ¶
func (c *EngineCollector) RemoveSource(engineIdx uint32)
RemoveSource removes an EngineSource with a given index from the Collector.
type EngineSource ¶
type EngineSource struct { MetricSource Index uint32 Rank uint32 }
EngineSource provides metrics for a single DAOS Engine.
func NewEngineSource ¶
func NewEngineSource(parent context.Context, idx uint32, rank uint32) (*EngineSource, func(), error)
NewEngineSource initializes a new metrics source for a DAOS Engine.
type ExporterConfig ¶
ExporterConfig defines the configuration for the Prometheus exporter.
type MetricSource ¶
type MetricSource struct {
// contains filtered or unexported fields
}
MetricSource encapsulates the logic and data for collecting telemetry from a DAOS metrics source.
func (*MetricSource) Collect ¶
func (s *MetricSource) Collect(log logging.Logger, ch chan<- *sourceMetric)
Collect invokes telemetry.CollectMetrics() for the metrics context managed by this source. The collected metrics are sent to the provided channel.
func (*MetricSource) IsEnabled ¶
func (s *MetricSource) IsEnabled() bool
IsEnabled checks if the source is enabled.
func (*MetricSource) PruneSegments ¶
func (s *MetricSource) PruneSegments(log logging.Logger, maxSegAge time.Duration)
PruneSegments prunes unused telemetry segments.