agentparams

package
v0.0.0-...-9d34b66 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	StableChannel  channel = "stable"
	BetaChannel    channel = "beta"
	NightlyChannel channel = "nightly"
)

Variables

This section is empty.

Functions

func WithAdditionalInstallParameters

func WithAdditionalInstallParameters(parameters []string) func(*Params) error

WithAdditionalInstallParameters passes a list of parameters to the underlying installer

func WithAgentConfig

func WithAgentConfig(config string) func(*Params) error

WithAgentConfig sets the configuration of the Agent.

func WithFakeintake

func WithFakeintake(fakeintake *fakeintake.Fakeintake) func(*Params) error

WithFakeintake installs the fake intake and configures the Agent to use it.

This option is overwritten by `WithIntakeHostname`.

func WithFile

func WithFile(absolutePath string, content string, useSudo bool) func(*Params) error

WithFile adds a file with contents to the install at the given path. This should only be used when the agent needs to be restarted after writing the file.

func WithFileWithPermissions

func WithFileWithPermissions(absolutePath string, content string, useSudo bool, perms optional.Option[perms.FilePermissions]) func(*Params) error

WithFileWithPermissions adds a file like WithFile but we can predefine the permissions of the file.

func WithIntakeHostname

func WithIntakeHostname(hostname string) func(*Params) error

WithIntakeName configures the agent to use the given hostname as intake.

To use a fakeintake, see WithFakeintake.

This option is overwritten by `WithFakeintake`.

func WithIntegration

func WithIntegration(folderName string, content string) func(*Params) error

WithIntegration adds the configuration for an integration.

func WithLatest

func WithLatest() func(*Params) error

WithLatest uses the latest Agent 7 version in the stable channel.

func WithLatestNightly

func WithLatestNightly() func(*Params) error

func WithLogs

func WithLogs() func(*Params) error

WithLogs enables the log agent

func WithPipeline

func WithPipeline(pipelineID string) func(*Params) error

WithPipeline use a specific version of the Agent by pipeline id. For example: `16497585` uses the version `pipeline-16497585`

func WithPulumiResourceOptions

func WithPulumiResourceOptions(resources ...pulumi.ResourceOption) func(*Params) error

func WithSecurityAgentConfig

func WithSecurityAgentConfig(config string) func(*Params) error

WithSecurityAgentConfig sets the configuration of the security-agent.

func WithSkipAPIKeyInConfig

func WithSkipAPIKeyInConfig() func(*Params) error

WithSkipAPIKeyInConfig does not add the API key in the Agent configuration file.

func WithSystemProbeConfig

func WithSystemProbeConfig(config string) func(*Params) error

WithSystemProbeConfig sets the configuration of system-probe.

func WithTelemetry

func WithTelemetry() func(*Params) error

WithTelemetry enables the Agent telemetry go_expvar and openmetrics.

func WithVersion

func WithVersion(version string) func(*Params) error

WithVersion use a specific version of the Agent. For example: `6.39.0` or `7.41.0~rc.7-1`

Types

type FileDefinition

type FileDefinition struct {
	Content     string
	UseSudo     bool
	Permissions optional.Option[perms.FilePermissions]
}

type Option

type Option = func(*Params) error

type PackageVersion

type PackageVersion struct {
	Major      string
	Minor      string // Empty means latest
	Channel    channel
	PipelineID string
}

type Params

type Params struct {
	Version             PackageVersion
	AgentConfig         string
	SystemProbeConfig   string
	SecurityAgentConfig string
	Integrations        map[string]*FileDefinition
	Files               map[string]*FileDefinition
	ExtraAgentConfig    []pulumi.StringInput
	ResourceOptions     []pulumi.ResourceOption
	// This is a list of additional installer flags that can be used to pass installer-specific
	// parameters like the MSI flags.
	AdditionalInstallParameters []string
	SkipAPIKeyInConfig          bool
}

func NewParams

func NewParams(env config.Env, options ...Option) (*Params, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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