netdataapi

package
v0.32.1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 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 initialize 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 create or update a chart.

func (*API) DIMENSION

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

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

func (*API) DISABLE

func (a *API) DISABLE() error

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

func (*API) EMPTYLINE

func (a *API) EMPTYLINE() error

EMPTYLINE write an empty line.

func (*API) END

func (a *API) END() error

END complete data collection for the initialized chart.

func (*API) FLUSH

func (a *API) FLUSH() error

FLUSH ignore the last collected values.

func (*API) SET

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

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

func (*API) SETEMPTY

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

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

func (*API) VARIABLE

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

VARIABLE set 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