prometheusx

package
v1.2.65 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelWarning = "warn"
	LevelError   = "error"
	LevelPanic   = "panic"
)

Variables

This section is empty.

Functions

func Alert

func Alert(level, module, name string) error

func AlertErr

func AlertErr(module, name string)

func AlertPanic

func AlertPanic(module, name string)

func AlertWarn

func AlertWarn(module, name string)

func Init

func Init(config Config)

func PromHandler

func PromHandler(handler http.Handler) gin.HandlerFunc

func PrometheusBind

func PrometheusBind(engine *gin.Engine, path string)

func StartAgent

func StartAgent(addr, path string)

StartAgent starts a prometheus agent.

Types

type Config

type Config struct {
	Host string `json:"host,optional" yaml:"host"`
	Port int    `json:"port,default=9101" yaml:"port"`
	Path string `json:"path,default=/metrics" yaml:"path"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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