Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SupportedSyncers = map[string]syncerFunc{ "vrops_host_metric": newSyncerOfType[prometheus.VROpsHostMetric], "vrops_vm_metric": newSyncerOfType[prometheus.VROpsVMMetric], "node_exporter_metric": newSyncerOfType[prometheus.NodeExporterMetric], "netapp_aggregate_labels_metric": newSyncerOfType[prometheus.NetAppAggregateLabelsMetric], "netapp_node_metric": newSyncerOfType[prometheus.NetAppNodeMetric], "netapp_volume_aggregate_labels_metric": newSyncerOfType[prometheus.NetAppVolumeAggrLabelsMetric], "kvm_libvirt_domain_metric": newSyncerOfType[prometheus.KVMDomainMetric], }
List of supported metric types that can be specified in the yaml config.
Functions ¶
func NewCombinedSyncer ¶
func NewCombinedSyncer( supportedSyncers map[string]syncerFunc, config conf.SyncPrometheusConfig, db db.DB, monitor sync.Monitor, mqttClient mqtt.Client, ) sync.Datasource
Create multiple syncers configured by the external service configuration.
func TriggerMetricAliasSynced ¶
Trigger executed when the prometheus metric with this alias has finished syncing.
func TriggerMetricTypeSynced ¶
Trigger executed when the prometheus metric with this type has finished syncing.
Types ¶
type CombinedSyncer ¶
type CombinedSyncer struct {
// contains filtered or unexported fields
}
Syncer that syncs all configured metrics.
func (CombinedSyncer) Init ¶
func (s CombinedSyncer) Init(ctx context.Context)
Initialize all nested syncers.
func (CombinedSyncer) Sync ¶
func (s CombinedSyncer) Sync(context context.Context)
Sync all metrics in parallel and publish triggers.
type PrometheusAPI ¶
type PrometheusAPI[M prometheus.PrometheusMetric] interface { FetchMetrics( query string, start time.Time, end time.Time, resolutionSeconds int, ) (*prometheusTimelineData[M], error) }
Prometheus API to fetch metrics from Prometheus.
func NewPrometheusAPI ¶
func NewPrometheusAPI[M prometheus.PrometheusMetric]( hostConf conf.SyncPrometheusHostConfig, metricConf conf.SyncPrometheusMetricConfig, monitor sync.Monitor, ) PrometheusAPI[M]
Create a new Prometheus API with the given Prometheus metric type.
type Syncer ¶
type Syncer interface {
sync.Datasource
// Get triggers produced by this syncer.
Triggers() []string
}
Click to show internal directories.
Click to hide internal directories.