g

package
v0.0.0-...-76e78dc Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const LAST_MESSAGE_PATH = "/tmp/satori-last-message"
View Source
const (
	VERSION = "8.0.6"
)

Variables

View Source
var (
	ConfigVersion int64
	BinaryHash    []byte
	BinaryPath    string
)
View Source
var (
	ConfigFile string
)

Functions

func Hostname

func Hostname() string

func IP

func IP() string

func LastMessage

func LastMessage(name string)

func ParseConfig

func ParseConfig(cfg string)

func ReportFailure

func ReportFailure(metric string, desc string, tags map[string]string)

func ReportLastMessage

func ReportLastMessage()

func SendToTransfer

func SendToTransfer(metrics []*model.MetricValue)

func SendToTransferProc

func SendToTransferProc()

Types

type GlobalConfig

type GlobalConfig struct {
	Debug     bool     `yaml:"debug"`
	Hostname  string   `yaml:"hostname"`
	FQDN      bool     `yaml:"fqdn"`
	IP        string   `yaml:"ip"`
	Master    string   `yaml:"master"`
	Transfer  []string `yaml:"transfer"`
	HTTP      string   `yaml:"http"`
	NoBuiltin bool     `yaml:"noBuiltin"`
	Cgroups   *struct {
		Memory  int64   `yaml:"mem"`
		CPU     float32 `yaml:"cpu"`
		Enforce bool    `yaml:"enforce"`
	} `yaml:"cgroups"`
	Plugin struct {
		Enabled     bool `yaml:"enabled"`
		SigningKeys []struct {
			Key string `yaml:"key"`
		} `yaml:"signingKeys"`
		AuthorizedKeys string `yaml:"authorizedKeys"`
		Update         string `yaml:"update"`
		Git            string `yaml:"git"`
		CheckoutPath   string `yaml:"checkoutPath"`
		Subdir         string `yaml:"subDir"`
		LogDir         string `yaml:"logs"`
	} `yaml:"plugin"`
	Ignore []struct {
		Metric   string `yaml:"metric"`
		Tag      string `yaml:"tag"`
		TagValue string `yaml:"tagValue"`
	} `yaml:"ignore"`
	Collector *struct {
		IfacePrefix []string `yaml:"ifacePrefix"`
	} `yaml:"collector"`
	AddTags map[string]string `yaml:"addTags"`
}

func Config

func Config() *GlobalConfig

type TransferClient

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

----------------------------

func (TransferClient) Call

func (this TransferClient) Call(metrics interface{}) (interface{}, error)

func (TransferClient) Close

func (this TransferClient) Close() error

func (TransferClient) Closed

func (this TransferClient) Closed() bool

func (TransferClient) Name

func (this TransferClient) Name() string

Jump to

Keyboard shortcuts

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