bleemeo

package
v0.0.0-...-b19e04c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

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

func (c *Connector) AccountID() string

AccountID returns the Account UUID of Bleemeo It return the empty string if the Account UUID is not available.

func (*Connector) AgentID

func (c *Connector) AgentID() string

AgentID returns the Agent UUID of Bleemeo It return the empty string if the Account UUID is not available.

func (*Connector) AgentIsClusterLeader

func (c *Connector) AgentIsClusterLeader() bool

func (*Connector) ApplyCachedConfiguration

func (c *Connector) ApplyCachedConfiguration(ctx context.Context)

ApplyCachedConfiguration reload metrics units & threshold & monitors from the cache.

func (*Connector) Connected

func (c *Connector) Connected() bool

Connected returns whether the mqtt connector is connected.

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

func (c *Connector) DiagnosticPage() string

DiagnosticPage return useful information to troubleshoot issue.

func (*Connector) DiagnosticSNMPAssociation

func (c *Connector) DiagnosticSNMPAssociation(ctx context.Context, file io.Writer)

DiagnosticSNMPAssociation return useful information to troubleshoot issue.

func (*Connector) EmitInternalMetric

func (c *Connector) EmitInternalMetric(_ context.Context, state registry.GatherState, app storage.Appender) error

func (*Connector) GetAllVSphereAssociations

func (c *Connector) GetAllVSphereAssociations(ctx context.Context, devices []types.VSphereDevice) (map[string]string, error)

func (*Connector) HandleDiagnosticRequest

func (c *Connector) HandleDiagnosticRequest(ctx context.Context, requestToken string)

func (*Connector) HealthCheck

func (c *Connector) HealthCheck() bool

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

func (c *Connector) LastReport() time.Time

LastReport returns the date of last report with Bleemeo API over MQTT.

func (*Connector) RegistrationAt

func (c *Connector) RegistrationAt() time.Time

RegistrationAt returns the date of registration with Bleemeo API.

func (*Connector) RelabelHook

func (c *Connector) RelabelHook(ctx context.Context, labels map[string]string) (newLabel map[string]string, retryLater bool)

func (*Connector) Run

func (c *Connector) Run(ctx context.Context) error

Run run the Connector.

func (*Connector) Tags

func (c *Connector) Tags() []string

Tags returns the Tags set on Bleemeo Cloud platform.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL