Documentation ¶
Index ¶
Constants ¶
View Source
const (
ContentTypeJSON = "application/json"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Call ¶
type Call struct { // allow to overwrite scheme Scheme string `yaml:"scheme"` URI string `yaml:"uri"` URL string `yaml:"url"` Method string `yaml:"method"` Data interface{} `yaml:"data"` ContentType string `yaml:"contentType"` Check []Check `yaml:"check"` Headers map[string]string `yaml:"headers"` Comment string `yaml:"comment"` }
type Check ¶
type Check struct { Comment string `yaml:"comment"` JSONPath map[string]Expect `yaml:"jsonPath"` GoQuery map[string]Expect `yaml:"goQuery"` Headers map[string]string `yaml:"headers"` Regex map[string]Expect `yaml:"regex"` Duration time.Duration `yaml:"duration"` StatusCode int64 `yaml:"statusCode"` ContentType string `yaml:"contentType"` Redirect string `yaml:"redirect"` MatchReply string `yaml:"matchReply"` }
type Server ¶
type Server struct { // endpoint to expose metrics Address string `yaml:"address"` // auth BasicAuthFile string `yaml:"basicAuthFile"` // Notifications TLS *struct { Address string `yaml:"address"` Cert string `yaml:"cert"` Key string `yaml:"key"` } SMTP *struct { User string `yaml:"user"` Pass string `yaml:"pass"` Server string `yaml:"server"` Port int `yaml:"port"` From string `yaml:"from"` To []string `yaml:"to"` } `yaml:"smtp"` Slack string `yaml:"slack"` Sms *SMS `yaml:"sms"` }
Server models the petze.yml main config file
func LoadServer ¶
type Service ¶
type Service struct { // service identifier ID string `yaml:"id"` Endpoint string `yaml:"endpoint"` Interval time.Duration `yaml:"interval"` Session []Call `yaml:"session"` // Notifications NotifyIfResolved bool `yaml:"notifyIfResolved"` // Generate an error if the TLS certificate will expire in less then TLSWarning time.Duration `yaml:"tlsWarning"` }
Service is a service to monitor The service id is the name of the file including its relative path in the config folder e.g: google.yml -> service ID: google cluster1/service1.yml -> service ID: cluster1/service1
Click to show internal directories.
Click to hide internal directories.