Documentation ¶
Index ¶
- func NewReloadState() types.BleemeoReloadState
- type Connector
- func (c *Connector) AccountID() string
- func (c *Connector) AgentID() string
- func (c *Connector) AgentIsClusterLeader() bool
- func (c *Connector) ApplyCachedConfiguration(ctx context.Context)
- func (c *Connector) Connected() bool
- func (c *Connector) DiagnosticArchive(ctx context.Context, archive gloutonTypes.ArchiveWriter) error
- func (c *Connector) DiagnosticPage() string
- func (c *Connector) DiagnosticSNMPAssociation(ctx context.Context, file io.Writer)
- func (c *Connector) EmitInternalMetric(_ context.Context, state registry.GatherState, app storage.Appender) error
- func (c *Connector) GetAllVSphereAssociations(ctx context.Context, devices []types.VSphereDevice) (map[string]string, error)
- func (c *Connector) HandleDiagnosticRequest(ctx context.Context, requestToken string)
- func (c *Connector) HealthCheck() bool
- func (c *Connector) IsMetricAllowed(metric gloutonTypes.LabelsAndAnnotation) (bool, types.DenyReason, error)
- func (c *Connector) LastReport() time.Time
- func (c *Connector) RegistrationAt() time.Time
- func (c *Connector) RelabelHook(ctx context.Context, labels map[string]string) (newLabel map[string]string, retryLater bool)
- func (c *Connector) Run(ctx context.Context) error
- func (c *Connector) Tags() []string
- func (c *Connector) UpdateContainers()
- func (c *Connector) UpdateInfo()
- func (c *Connector) UpdateMonitors()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewReloadState ¶
func NewReloadState() types.BleemeoReloadState
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
Connector manager the connection between the Agent and Bleemeo.
func New ¶
func New(option types.GlobalOption) (c *Connector, err error)
New create a new Connector.
func (*Connector) AccountID ¶
AccountID returns the Account UUID of Bleemeo It return the empty string if the Account UUID is not available.
func (*Connector) AgentID ¶
AgentID returns the Agent UUID of Bleemeo It return the empty string if the Account UUID is not available.
func (*Connector) AgentIsClusterLeader ¶
func (*Connector) ApplyCachedConfiguration ¶
ApplyCachedConfiguration reload metrics units & threshold & monitors from the cache.
func (*Connector) DiagnosticArchive ¶
func (c *Connector) DiagnosticArchive(ctx context.Context, archive gloutonTypes.ArchiveWriter) error
DiagnosticArchive add to a zipfile useful diagnostic information.
func (*Connector) DiagnosticPage ¶
DiagnosticPage return useful information to troubleshoot issue.
func (*Connector) DiagnosticSNMPAssociation ¶
DiagnosticSNMPAssociation return useful information to troubleshoot issue.
func (*Connector) EmitInternalMetric ¶
func (*Connector) GetAllVSphereAssociations ¶
func (*Connector) HandleDiagnosticRequest ¶
func (*Connector) HealthCheck ¶
HealthCheck perform some health check and log any issue found. This method could panic when health condition are bad for too long in order to cause a Glouton restart.
func (*Connector) IsMetricAllowed ¶
func (c *Connector) IsMetricAllowed(metric gloutonTypes.LabelsAndAnnotation) (bool, types.DenyReason, error)
func (*Connector) LastReport ¶
LastReport returns the date of last report with Bleemeo API over MQTT.
func (*Connector) RegistrationAt ¶
RegistrationAt returns the date of registration with Bleemeo API.
func (*Connector) RelabelHook ¶
func (*Connector) UpdateContainers ¶
func (c *Connector) UpdateContainers()
UpdateContainers request to update a containers.
func (*Connector) UpdateInfo ¶
func (c *Connector) UpdateInfo()
UpdateInfo request to update a info, which include the time_drift.
func (*Connector) UpdateMonitors ¶
func (c *Connector) UpdateMonitors()
UpdateMonitors trigger a reload of the monitors.