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