inputs

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 50 Imported by: 0

README

inputs

-- import "."

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 ParseToJSON
func ParseToJSON(s []byte) (string, error)

ParseToJSON parses a html fragment or whole document looking for HTML

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 nolint: gocyclo cyclomatic complexity but easy to understand

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(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.

type Table
type Table struct {
	Attributes map[string]string
	Headers    []string
	Rows       [][]string
}

Table holds a simple table of headers and rows.

func Parse
func Parse(s []byte) ([]*Table, error)

Parse parses a html fragment or whole document looking for HTML tables. It converts all cells into text, stripping away any HTML content.

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 ParseToJSON added in v1.3.6

func ParseToJSON(s []byte) (string, error)

ParseToJSON parses a html fragment or whole document looking for HTML

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 nolint: gocyclo cyclomatic complexity but easy to understand

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(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.

type Table added in v1.3.6

type Table struct {
	Attributes map[string]string
	Headers    []string
	Rows       [][]string
}

Table holds a simple table of headers and rows.

func Parse added in v1.3.6

func Parse(s []byte) ([]*Table, error)

Parse parses a html fragment or whole document looking for HTML tables. It converts all cells into text, stripping away any HTML content.

Jump to

Keyboard shortcuts

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