telegraf

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: Apache-2.0 Imports: 7 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]string{
	"windows": {
		"configPath": "C:\\Program Files\\InfluxData\\telegraf\\telegraf.conf",
		"serviceCmd": "C:\\Program Files\\InfluxData\\telegraf\\telegraf.exe",
		"startCmd":   "C:\\Program Files\\InfluxData\\telegraf\\telegraf.exe --service start",
		"restartCmd": "C:\\Program Files\\InfluxData\\telegraf\\telegraf.exe --service stop (then start)",
	},
	"linux": {
		"configPath": "/etc/telegraf/telegraf.conf",
		"confDir":    "/etc/telegraf",
		"serviceCmd": "/usr/bin/telegraf",
		"startCmd":   "service telegraf start",
		"restartCmd": "service telegraf restart",
	},
	"darwin": {
		"configPathAmd": "/usr/local/etc/telegraf.conf",
		"configDirAmd":  "/usr/local/etc",
		"configPathArm": "/opt/homebrew/etc/telegraf.conf",
		"confDirArm":    "/opt/homebrew/etc",
		"startCmd":      "brew services start telegraf",
		"serviceCmd":    "telegraf",
		"restartCmd":    "brew services restart telegraf",
	},
}

Functions

func GetConfigPath

func GetConfigPath(os, arch string) string

func ValidateFilePath

func ValidateFilePath(filePath, osys, arch string, tui bool) error

Types

type Telegraf

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

func (*Telegraf) Install

func (t *Telegraf) Install(apikey string, sysinfo sysinfo.SysInfo, options map[string]interface{}, updates chan<- string) error

func (*Telegraf) Uninstall

func (t *Telegraf) Uninstall(sysinfo sysinfo.SysInfo, updates chan<- string) error

func (*Telegraf) UpdateApiKey

func (t *Telegraf) UpdateApiKey(apikey string, options map[string]interface{}, updates chan<- string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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