http_response

package
v4.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	*collector.BaseCollector
}

func NewCollector

func NewCollector() *Collector

type Rule

type Rule struct {
	URLs                []string `label:"URLs" json:"urls,required" description:"List of urls to query" example:"https://github.com/didi/nightingale"`
	Method              string   `label:"Method" json:"method" description:"HTTP Request Method, default GET" example:"GET"`
	ResponseTimeout     int      `label:"ResponseTimeout" json:"response_timeout" default:"5" description:"Set response_timeout (default 5 seconds)"`
	Headers             []string `label:"Headers" json:"headers" description:"HTTP Request Headers" example:"Content-Type: application/json"`
	Username            string   `label:"Username" json:"username" description:"Optional HTTP Basic Auth Credentials, Username" example:"username"`
	Password            string   `label:"Password" json:"password" description:"Optional HTTP Basic Auth Credentials, Password" example:"password"`
	Body                string   `label:"Body" json:"body" description:"Optional HTTP Request Body" example:"{'fake':'data'}"`
	ResponseBodyMaxSize int      `` /* 162-byte string literal not displayed */
	ResponseStringMatch string   `` /* 141-byte string literal not displayed */
	ResponseStatusCode  int      `` /* 159-byte string literal not displayed */
	Interface           string   `label:"Interface" json:"interface" description:"Interface to use when dialing an address" example:"eth0"`
	HTTPProxy           string   `` /* 162-byte string literal not displayed */
	FollowRedirects     bool     `label:"FollowRedirects" json:"follow_redirects" description:"Whether to follow redirects from the server (defaults to false)"`
	plugins.ClientConfig
}

func (*Rule) TelegrafInput

func (p *Rule) TelegrafInput() (telegraf.Input, error)

func (*Rule) Validate

func (p *Rule) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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