monit

package
v0.0.0-...-f9f5cb3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatHttpStatusCode

func FormatHttpStatusCode(httpStatusCode int64) string

func GetTimeIntervalTag

func GetTimeIntervalTag(respTime float64) (ret []string)

func ModRecorder

func ModRecorder() func(http.Handler) http.Handler

func MonitorMe

func MonitorMe(params MonitorParams)

func NotFound

func NotFound(w http.ResponseWriter, r *http.Request)

func PanicLogger

func PanicLogger(panicMsg interface{}, serviceID string, requestURI string, curTime time.Time)

Types

type DataDogAgent

type DataDogAgent struct {
	Client *dogstatsd.Client
}

func GetDataDogAgent

func GetDataDogAgent() *DataDogAgent

TODO: handle errnous cases

func (*DataDogAgent) ClientExists

func (d *DataDogAgent) ClientExists() (exists bool)

func (*DataDogAgent) Close

func (d *DataDogAgent) Close()

func (*DataDogAgent) Count

func (d *DataDogAgent) Count(name string, value int64, tags []string, rate float64) (err error)

func (*DataDogAgent) Histogram

func (d *DataDogAgent) Histogram(name string, value float64, tags []string, rate float64) (err error)

type MonitorParams

type MonitorParams struct {
	ServiceId    string
	RespTime     float64
	ResponseCode int64
	CacheHit     bool
}

Jump to

Keyboard shortcuts

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