netdataapi

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: GPL-3.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	io.Writer
}

API implements Netdata external plugins API. https://learn.netdata.cloud/docs/agent/collectors/plugins.d#the-output-of-the-plugin

func New

func New(w io.Writer) *API

func (*API) BEGIN

func (a *API) BEGIN(typeID string, ID string, msSince int) (err error)

BEGIN initializes data collection for a chart.

func (*API) CHART

func (a *API) CHART(
	typeID string,
	ID string,
	name string,
	title string,
	units string,
	family string,
	context string,
	chartType string,
	priority int,
	updateEvery int,
	options string,
	plugin string,
	module string) error

CHART creates or update a chart.

func (*API) CLABEL added in v0.33.0

func (a *API) CLABEL(key, value string, source int) error

CLABEL adds or update a label to the chart.

func (*API) CLABELCOMMIT added in v0.33.0

func (a *API) CLABELCOMMIT() error

CLABELCOMMIT adds labels to the chart. Should be called after one or more CLABEL.

func (*API) DIMENSION

func (a *API) DIMENSION(
	ID string,
	name string,
	algorithm string,
	multiplier int,
	divisor int,
	options string) error

DIMENSION adds or update a dimension to the chart just created.

func (*API) DISABLE

func (a *API) DISABLE() error

DISABLE disables this plugin. This will prevent Netdata from restarting the plugin.

func (*API) EMPTYLINE

func (a *API) EMPTYLINE() error

EMPTYLINE writes an empty line.

func (*API) END

func (a *API) END() error

END completes data collection for the initialized chart.

func (*API) FLUSH

func (a *API) FLUSH() error

FLUSH ignores the last collected values.

func (*API) SET

func (a *API) SET(ID string, value int64) error

SET sets the value of a dimension for the initialized chart.

func (*API) SETEMPTY

func (a *API) SETEMPTY(ID string) error

SETEMPTY sets the empty value of a dimension for the initialized chart.

func (*API) VARIABLE

func (a *API) VARIABLE(ID string, value int64) error

VARIABLE sets the value of a CHART scope variable for the initialized chart.

Jump to

Keyboard shortcuts

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