netdataapi

package
v0.58.1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: GPL-3.0 Imports: 4 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) DynCfgEnable added in v0.56.4

func (a *API) DynCfgEnable(pluginName string) error

func (*API) DynCfgRegisterJob added in v0.56.4

func (a *API) DynCfgRegisterJob(moduleName, jobName, jobType string) error

func (*API) DynCfgReportJobStatus added in v0.56.4

func (a *API) DynCfgReportJobStatus(moduleName, jobName, status, reason string) error

func (*API) DynCfgReset added in v0.56.4

func (a *API) DynCfgReset() error

func (*API) DyncCfgRegisterModule added in v0.56.4

func (a *API) DyncCfgRegisterModule(moduleName string) error

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) FunctionResultReject added in v0.56.4

func (a *API) FunctionResultReject(uid, contentType, payload string) error

func (*API) FunctionResultSuccess added in v0.56.4

func (a *API) FunctionResultSuccess(uid, contentType, payload string) error

func (*API) HOST added in v0.51.0

func (a *API) HOST(guid string) error

func (*API) HOSTDEFINE added in v0.51.0

func (a *API) HOSTDEFINE(guid, hostname string) error

func (*API) HOSTDEFINEEND added in v0.51.0

func (a *API) HOSTDEFINEEND() error

func (*API) HOSTINFO added in v0.51.0

func (a *API) HOSTINFO(guid, hostname string, labels map[string]string) error

func (*API) HOSTLABEL added in v0.51.0

func (a *API) HOSTLABEL(name, value string) error

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