Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitConf ¶
func InitConf(conf *VESAgentConfiguration) error
InitConf initilize the config store from config file, env and cli variables.
Types ¶
type AlertManagerConfiguration ¶
type AlertManagerConfiguration struct { Bind string `yaml:"bind,omitempty"` Path string `yaml:"path,omitempty"` User string `yaml:"user"` Password string `yaml:"password"` }
AlertManagerConfiguration parameters
type ClusterConfiguration ¶
type ClusterConfiguration struct { ID string `mapstructure:"id"` // Local node ID Peers Peers `mapstructure:"peers"` // List of cluster's node Debug bool `mapstructure:"debug"` // Display raft log messages DisplayLogs bool `mapstructure:"displayLogs"` // Display replication log entries }
ClusterConfiguration is the configuration of the raft cluster
type HeartbeatConfiguration ¶
type HeartbeatConfiguration struct {
DefaultInterval time.Duration `mapstructure:"defaultInterval,omitempty"`
}
HeartbeatConfiguration parameters
type MeasurementConfiguration ¶
type MeasurementConfiguration struct { DomainAbbreviation string `mapstructure:"domainAbbreviation"` // "Measurement" or "Mfvs" DefaultInterval time.Duration `mapstructure:"defaultInterval"` // Default measurement interval MaxBufferingDuration time.Duration `mapstructure:"maxBufferingDuration"` // Maximum timeframe size of buffering Prometheus PrometheusConfig `mapstructure:"prometheus"` // Prometheus configuration }
MeasurementConfiguration parameters
type MetricRule ¶
type MetricRule struct { Target string `mapstructure:"target"` // Target VES event field Expr string `mapstructure:"expr"` // Prometheus query expression VMIDLabel string `mapstructure:"vmId"` // Metric label holding the VNF ID Labels []Label `mapstructure:"labels"` // Set of VES fields to map to values of given label ObjectName string `mapstructure:"object_name"` // JSON Object Name ObjectInstance string `mapstructure:"object_instance"` // JSON Object instance ObjectKeys []Label `mapstructure:"object_keys"` // JSON Object keys }
MetricRule defines how to retrieve metrics and map them into a list of evel.EventMeasurement struct
func (MetricRule) WithDefaults ¶
func (rule MetricRule) WithDefaults(def *MetricRule) MetricRule
WithDefaults applies default values from `def` to `rule`, and return a new one
type MetricRules ¶
type MetricRules struct { DefaultValues *MetricRule `mapstructure:"defaults"` // Default rules to apply (except for expr), labels are merged Metrics []MetricRule `mapstructure:"metrics"` // List of query and mapping of rules }
MetricRules defines a list of rules, and defaults values for them
type Peer ¶
type Peer struct { ID string `mapstructure:"id"` // Peer ID Address string `mapstructure:"address"` // Peer address and port }
Peer is the configuration of a single raft peer
type Peers ¶
type Peers []Peer
Peers is a list of peer configuration
type PrometheusConfig ¶
type PrometheusConfig struct { Address string `mapstructure:"address"` // Base URL to prometheus API Timeout time.Duration `mapstructure:"timeout"` // API request timeout KeepAlive time.Duration `mapstructure:"keepalive"` // HTTP Keep-Alive Rules MetricRules `mapstructure:"rules"` // Querying rules }
PrometheusConfig parameters
type VESAgentConfiguration ¶
type VESAgentConfiguration struct { PrimaryCollector govel.CollectorConfiguration `mapstructure:"primaryCollector"` BackupCollector govel.CollectorConfiguration `mapstructure:"backupCollector,omitempty"` Heartbeat HeartbeatConfiguration `mapstructure:"heartbeat,omitempty"` Measurement MeasurementConfiguration `mapstructure:"measurement,omitempty"` Event govel.EventConfiguration `mapstructure:"event,omitempty"` AlertManager AlertManagerConfiguration `mapstructure:"alertManager,omitempty"` Cluster *ClusterConfiguration `mapstructure:"cluster"` // Optional cluster config. If absent, fallbacks to single node mode Debug bool `mapstructure:"debug,omitempty"` CaCert string `mapstructure:"caCert,omitempty"` // Root certificate content DataDir string `mapsctructure:"datadir"` // Path to directory containing data }
VESAgentConfiguration parameters
Click to show internal directories.
Click to hide internal directories.