otel

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = []string{
	"Receiver: hostmetrics",
	"Exporters: Carbon",
}
View Source
var ServiceDetails = map[string]map[string]map[string]string{
	"linux": {
		"default": {
			"configPath":  "/etc/otelcol-contrib/config.yaml",
			"startHint":   "sudo systemctl start otelcol-contrib",
			"restartHint": "sudo systemctl restart otelcol-contrib",
			"receiver":    "hostmetrics",
			"exporter":    "carbon",
		},
	},
	"windows": {
		"default": {
			"exePath":     "C:\\Program Files\\OpenTelemetry Collector Contrib\\otelcol-contrib.exe",
			"configPath":  "C:\\Program Files\\OpenTelemetry Collector Contrib\\config.yaml",
			"startHint":   "sc.exe start otelcol-contrib",
			"restartHint": "Restart-Service otelcol-contrib",
			"receiver":    "hostmetrics",
			"exporter":    "carbon",
		},
	},
	"darwin": {
		"amd64": {
			"configPath":  "/usr/local/etc/otelcol-contrib/config.yaml",
			"startHint":   "launchctl start com.otelcol-contrib-agent",
			"restartHint": "launchctl stop/start otelcol-contrib-agent",
			"receiver":    "hostmetrics",
			"exporter":    "carbon",
		},
		"arm64": {
			"configPath":  "/usr/local/etc/otelcol-contrib/config.yaml",
			"startHint":   "launchctl start com.otelcol-contrib-agent",
			"restartHint": "launchctl stop/start otelcol-contrib-agent",
			"receiver":    "hostmetrics",
			"exporter":    "carbon",
		},
	},
}

Functions

func GetServiceSettings

func GetServiceSettings(os, arch, pkgmngr string) map[string]string

func ValidateFilePath

func ValidateFilePath(filePath string) error

Types

type Otel

type Otel struct {
	// contains filtered or unexported fields
}

func NewOtelAgent

func NewOtelAgent(options map[string]interface{}, sysInfo sysinfo.SysInfo) *Otel

func (*Otel) InstallPipeline

func (o *Otel) InstallPipeline(updates chan *pipeline.Pipe) (*pipeline.Pipeline, error)

func (*Otel) UninstallPipeline

func (o *Otel) UninstallPipeline(updates chan *pipeline.Pipe) (*pipeline.Pipeline, error)

func (*Otel) UpdateApiKeyPipeline

func (o *Otel) UpdateApiKeyPipeline(updates chan *pipeline.Pipe) (*pipeline.Pipeline, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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