beater

package
v0.0.0-...-cf3610b Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventBuilder

func EventBuilder(params *RespParams) []beat.Event

func New

func New(b *beat.Beat, cfg *common.Config) (beat.Beater, error)

New creates an instance of bravobeat.

Types

type Match

type Match struct {
	Match    string `json:"match,omitempty"`
	Interval int    `json:"metrics_interval,omitempty"`
}

type Message

type Message struct {
	Version string      `json:"jsonrpc"`
	Method  string      `json:"method"`
	Id      int         `json:"id"`
	Params  *SendParams `json:"params,omitempty"`
}

type Metric

type Metric struct {
	Host     string      `json:"host,omitempty"`
	Plugin   string      `json:"plugin,omitempty"`
	Instance string      `json:"instance,omitempty"`
	Type     string      `json:"type,omitempty"`
	Value    interface{} `json:"value,omitempty"`
}

type Metrics

type Metrics struct {
	Metrics  []string `json:"metrics,omitempty"`
	Interval int      `json:"metrics_interval,omitempty"`
}

type RespParams

type RespParams struct {
	Metrics  map[string]Value `json:"metrics"`
	Interval int              `json:"interval"`
}

func CastParams

func CastParams(msg *jsonrpc.RPCResponse) *RespParams

type Response

type Response struct {
	Version string      `json:"jsonrpc"`
	Method  string      `json:"method"`
	Params  *RespParams `json:"params,omitempty"`
}

type SendParams

type SendParams struct {
	Metrics
	Match
}

type Value

type Value struct {
	Timestamp string  `json:"timestamp"`
	Value     float64 `json:"value"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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