httpcheck

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2019 License: GPL-3.0 Imports: 10 Imported by: 1

README

httpcheck

This module monitors one or more http servers availability and response time.

Charts

It produces the following charts:

  • HTTP Response Time in ms
  • HTTP Check Status in boolean
  • HTTP Current State Duration in seconds
  • HTTP Response Body Length in characters

Check statuses

Status Description
success No error on HTTP request, body reading and body content checking
timeout Timeout error on HTTP request
bad content The body of the response didn't match the regex (only if response_match option is set)
bad status Response status code not in status_accepted
no connection Any other network error not specifically handled by the module

Configuration

Here is an example for 2 servers:

jobs:
  - name: cool_website1
    url: http://cool.website1:8080/home
      
  - name: cool_website2
    url: http://cool.website2:8080/home
    status_accepted:
      - 200
      - 201
      - 202
    response_match: <title>My cool website!<\/title>

For all available options please see module configuration file.

Troubleshooting

Check the module debug output. Run the following command as netdata user:

./go.d.plugin -d -m httpcheck

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chart added in v0.5.0

type Chart = module.Chart

Chart is an alias for module.Chart

type Charts

type Charts = module.Charts

Charts is an alias for module.Charts

type Config added in v0.5.0

type Config struct {
	web.HTTP         `yaml:",inline"`
	AcceptedStatuses []int  `yaml:"status_accepted"`
	ResponseMatch    string `yaml:"response_match"`
}

Config is the HTTPCheck module configuration.

type Dims

type Dims = module.Dims

Dims is an alias for module.Dims

type HTTPCheck

type HTTPCheck struct {
	module.Base
	Config      `yaml:",inline"`
	UpdateEvery int `yaml:"update_every"`
	// contains filtered or unexported fields
}

HTTPCheck HTTPCheck module.

func New

func New() *HTTPCheck

New creates HTTPCheck with default values.

func (HTTPCheck) Charts

func (hc HTTPCheck) Charts() *Charts

Charts creates Charts

func (*HTTPCheck) Check

func (hc *HTTPCheck) Check() bool

Check makes check.

func (HTTPCheck) Cleanup

func (HTTPCheck) Cleanup()

Cleanup makes cleanup.

func (*HTTPCheck) Collect

func (hc *HTTPCheck) Collect() map[string]int64

Collect collects metrics

func (*HTTPCheck) Init

func (hc *HTTPCheck) Init() bool

Init makes initialization

Jump to

Keyboard shortcuts

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