telegraf

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultTelegrafPlugins = []string{
	"cpu",
	"disk",
	"diskio",
	"kernel",
	"mem",
	"processes",
	"swap",
	"system",
}
View Source
var ServiceDetails = map[string]map[string]map[string]string{
	"windows": {
		"default": {
			"configPath":  "C:\\Program Files\\InfluxData\\telegraf\\telegraf.conf",
			"serviceCmd":  "C:\\Program Files\\InfluxData\\telegraf\\telegraf.exe",
			"startHint":   `& "C:\Program Files\InfluxData\telegraf\telegraf.exe" --service-name telegraf service start`,
			"restartHint": `& "C:\Program Files\InfluxData\telegraf\telegraf.exe" --service-name telegraf service stop (then start)`,
		},
	},
	"linux": {
		"default": {
			"configPath":  "/etc/telegraf/telegraf.conf",
			"serviceCmd":  "telegraf",
			"startHint":   "sudo service telegraf start",
			"restartHint": "sudo service telegraf restart",
		},
		"brew": {
			"configPath":  "/home/linuxbrew/.linuxbrew/etc/telegraf.conf",
			"serviceCmd":  "telegraf",
			"startHint":   "brew services start telegraf",
			"restartHint": "brew services restart telegraf",
		},
	},
	"darwin": {
		"amd64": {
			"configPath":  "/usr/local/etc/telegraf.conf",
			"serviceCmd":  "telegraf",
			"startHint":   "brew services start telegraf",
			"restartHint": "brew services restart telegraf",
		},
		"arm64": {
			"configPath":  "/opt/homebrew/etc/telegraf.conf",
			"serviceCmd":  "telegraf",
			"startHint":   "brew services start telegraf",
			"restartHint": "brew services restart telegraf",
		},
	},
}

Functions

func GetServiceSettings added in v0.1.0

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

func ValidateFilePath

func ValidateFilePath(filePath string) error

Types

type Telegraf

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

func NewTelegrafAgent added in v0.1.0

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

func (*Telegraf) InstallPipeline added in v0.1.0

func (t *Telegraf) InstallPipeline(updates chan *pipeline.Pipe) (*pipeline.Pipeline, error)

func (*Telegraf) UninstallPipeline added in v0.1.0

func (t *Telegraf) UninstallPipeline(updates chan *pipeline.Pipe) (*pipeline.Pipeline, error)

func (*Telegraf) UpdateApiKeyPipeline added in v0.1.0

func (t *Telegraf) 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