inputs

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: Apache-2.0 Imports: 41 Imported by: 0

README

inputs

-- import "github.com/newrelic/nri-flex/internal/inputs"

Usage

func NetDialWithTimeout
func NetDialWithTimeout(dataStore *[]interface{}, command load.Command, dataSample *map[string]interface{}, api load.API, processType *string)

NetDialWithTimeout performs network dial without timeout

func ParseJMX
func ParseJMX(dataStore *[]interface{}, dataInterface interface{}, command load.Command, dataSample *map[string]interface{})

ParseJMX Processes JMX Data

func ParseReader
func ParseReader(in io.Reader, ch chan<- *dto.MetricFamily) error

ParseReader consumes an io.Reader and pushes it to the MetricFamily channel. It returns when all MetricFamilies are parsed and put on the channel.

func ProcessFile
func ProcessFile(dataStore *[]interface{}, cfg *load.Config, apiNo int) error

ProcessFile read and process the file into data collection.

func ProcessQueries
func ProcessQueries(dataStore *[]interface{}, yml *load.Config, apiNo int)

ProcessQueries processes database queries

func Prometheus
func Prometheus(dataStore *[]interface{}, input io.Reader, cfg *load.Config, api *load.API)

Prometheus from http io

func RunCommands
func RunCommands(dataStore *[]interface{}, yml *load.Config, apiNo int)

RunCommands executes the given commands to create one merged sampled

func RunHTTP
func RunHTTP(dataStore *[]interface{}, doLoop *bool, yml *load.Config, api load.API, reqURL *string)

RunHTTP Executes HTTP Requests

func RunScpWithTimeout
func RunScpWithTimeout(dataStore *[]interface{}, cfg *load.Config, api load.API) error

RunScpWithTimeout performs scp with timeout to gather data from a remote file.

func SetJMXCommand
func SetJMXCommand(dataStore *[]interface{}, runCommand *string, command load.Command, api load.API, config *load.Config)

SetJMXCommand Add parameters to JMX call

type Family
type Family struct {
	//Time    time.Time
	Name    string                         `json:"name"`
	Help    string                         `json:"help"`
	Type    string                         `json:"type"`
	Metrics map[int]map[string]interface{} `json:"metrics,omitempty"` // Either metric or summary.
}

Family mirrors the MetricFamily proto message.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NetDialWithTimeout

func NetDialWithTimeout(dataStore *[]interface{}, command load.Command, dataSample *map[string]interface{}, api load.API, processType *string)

NetDialWithTimeout performs network dial without timeout

func ParseJMX

func ParseJMX(dataStore *[]interface{}, dataInterface interface{}, command load.Command, dataSample *map[string]interface{})

ParseJMX Processes JMX Data

func ParseReader

func ParseReader(in io.Reader, ch chan<- *dto.MetricFamily) error

ParseReader consumes an io.Reader and pushes it to the MetricFamily channel. It returns when all MetricFamilies are parsed and put on the channel.

func ProcessFile added in v0.9.7

func ProcessFile(dataStore *[]interface{}, cfg *load.Config, apiNo int) error

ProcessFile read and process the file into data collection.

func ProcessQueries

func ProcessQueries(dataStore *[]interface{}, yml *load.Config, apiNo int)

ProcessQueries processes database queries

func Prometheus

func Prometheus(dataStore *[]interface{}, input io.Reader, cfg *load.Config, api *load.API)

Prometheus from http io

func RunCommands

func RunCommands(dataStore *[]interface{}, yml *load.Config, apiNo int)

RunCommands executes the given commands to create one merged sampled

func RunHTTP

func RunHTTP(dataStore *[]interface{}, doLoop *bool, yml *load.Config, api load.API, reqURL *string)

RunHTTP Executes HTTP Requests

func RunScpWithTimeout added in v0.9.3

func RunScpWithTimeout(dataStore *[]interface{}, cfg *load.Config, api load.API) error

RunScpWithTimeout performs scp with timeout to gather data from a remote file.

func SetJMXCommand

func SetJMXCommand(dataStore *[]interface{}, runCommand *string, command load.Command, api load.API, config *load.Config)

SetJMXCommand Add parameters to JMX call

Types

type Family

type Family struct {
	//Time    time.Time
	Name    string                         `json:"name"`
	Help    string                         `json:"help"`
	Type    string                         `json:"type"`
	Metrics map[int]map[string]interface{} `json:"metrics,omitempty"` // Either metric or summary.
}

Family mirrors the MetricFamily proto message.

Jump to

Keyboard shortcuts

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