agentstatus

package
v0.0.0-...-2a50bf3 Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package agentstatus provides functions that log SQL Server Agent status.

Index

Constants

View Source
const (
	UnknownError = iota
	SQLCollectionFailure
	GuestCollectionFailure
	ReadConfigurationsFileError
	InvalidConfigurationsError
	SecretValueError
	SQLQueryExecutionError
	WMIQueryExecutionError
	MissingComputeViewerIAMRoleError
	InvalidJSONFormatError
	ProtoJSONUnmarshalError
	ParseKnownHostsError
	SetupSSHKeysError
	SSHDialError
	CommandExecutionError
	RemoteCommandExecutionError
	DataTypeConversionError
	WorkloadManagerConnectionError
	WinGuestCollectionTimeout
	LinuxGuestCollectionTimeout
	MappingLocalLinuxDiskTypeTimeout
)

Agent wide error code mappings. We need to maintain the error code list at go/sqlserver-agent-error-codes.

Variables

This section is empty.

Functions

func NewAgentProperties

func NewAgentProperties(name, version, prefix string, logUsageMetrics bool) *usagemetrics.AgentProperties

NewAgentProperties returns the pointer of the new instance usagemetrics.AgentProperties.

func NewCloudProperties

func NewCloudProperties(projectID, zone, instanceName, projectNumber, image string) *usagemetrics.CloudProperties

NewCloudProperties returns the pointer of the new instance usagemetrics.CloudProperties.

func NewUsageMetricsLogger

func NewUsageMetricsLogger(agentProps *usagemetrics.AgentProperties, cloudProps *usagemetrics.CloudProperties, projectExclusions []string) *usagemetrics.Logger

NewUsageMetricsLogger wraps NewLogger function from usagemetrics package.

func Status

func Status(status string) usagemetrics.Status

Status returns the usagemetrics.Status.

Types

type AgentStatus

type AgentStatus interface {
	// Installed logs the agent status Installed.
	Installed()
	// Started logs the agent status Started.
	Started()
	// Configured logs the agent status Configured.
	Configured()
	// Misconfigured logs the agent status Misconfigured.
	Misconfigured()
	// Updated logs the agent status Updated.
	Updated(version string)
	// Running logs the agent status Running.
	Running()
	// Stopped logs the agent status Stopped.
	Stopped()
	// Action logs the agent status Action.
	Action(id int)
	// Error logs the agent status Error.
	Error(id int)
	// Uninstalled logs the agent status Uninstalled.
	Uninstalled()
	// LogStatus logs the agent status.
	LogStatus(status usagemetrics.Status, v string)
}

AgentStatus interface.

Jump to

Keyboard shortcuts

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