zmon

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client defines client for interfacing with the ZMON API.

func NewZMONClient

func NewZMONClient(dataServiceEndpoint string, client *http.Client) *Client

NewZMONClient initializes a new ZMON Client.

func (*Client) Query

func (c *Client) Query(checkID int, key string, tags map[string]string, aggregators []string, duration time.Duration) ([]DataPoint, error)

Query queries the ZMON KairosDB endpoint and returns the resulting list of data points for the query.

https://kairosdb.github.io/docs/build/html/restapi/QueryMetrics.html

type DataPoint

type DataPoint struct {
	Time  time.Time
	Value float64
}

DataPoint defines a single datapoint returned from a query.

type Entity

type Entity struct {
	ID string `json:"id"`
}

Entity defines a ZMON entity.

type ZMON

type ZMON interface {
	Query(checkID int, key string, tags map[string]string, aggregators []string, duration time.Duration) ([]DataPoint, error)
}

ZMON defines an interface for talking to the ZMON API.

Jump to

Keyboard shortcuts

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