Documentation
¶
Index ¶
Constants ¶
View Source
const ( LogLevelAlert = "ALERT" LogLevelError = "ERROR" LogLevelWarning = "WARNING" LogLevelNotice = "NOTICE" LogLevelDebug = "DEBUG" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.2.0
func ParseConfig ¶ added in v0.2.0
type ErrLogEntry ¶ added in v1.0.0
type ErrLogParser ¶ added in v1.0.0
type ErrLogParser struct {
}
func NewErrLogParser ¶ added in v1.0.0
func NewErrLogParser() *ErrLogParser
func (*ErrLogParser) Parse ¶ added in v1.0.0
func (p *ErrLogParser) Parse(ctx context.Context, r io.Reader, out chan ErrLogEntry) error
func (*ErrLogParser) ParseOne ¶ added in v1.0.0
func (p *ErrLogParser) ParseOne(r *bufio.Reader) (ErrLogEntry, error)
type Process ¶ added in v0.2.0
type Process struct {
// contains filtered or unexported fields
}
func NewProcess ¶ added in v0.2.0
func (*Process) HandleSignal ¶ added in v0.2.0
type PromCollector ¶ added in v1.0.0
type PromCollector struct {
// contains filtered or unexported fields
}
func NewPromCollector ¶ added in v1.0.0
func NewPromCollector(log *zap.Logger, metrics *PromMetrics, pools []Pool) *PromCollector
func (*PromCollector) Collect ¶ added in v1.0.0
func (c *PromCollector) Collect(metrics chan<- prometheus.Metric)
func (*PromCollector) Describe ¶ added in v1.0.0
func (c *PromCollector) Describe(descs chan<- *prometheus.Desc)
type PromMetrics ¶ added in v1.0.0
type PromMetrics struct {
ListenQueue *prometheus.GaugeVec
ListenQueueLen *prometheus.GaugeVec
IdleProcesses *prometheus.GaugeVec
ActiveProcesses *prometheus.GaugeVec
TotalProcesses *prometheus.GaugeVec
AcceptedConn *prometheus.GaugeVec
StartSince *prometheus.GaugeVec
MaxListenQueue *prometheus.GaugeVec
MaxActiveProcesses *prometheus.GaugeVec
MaxChildrenReached *prometheus.GaugeVec
SlowRequests *prometheus.GaugeVec
}
func NewPromMetrics ¶ added in v1.0.0
func NewPromMetrics() *PromMetrics
type SlowlogEntry ¶ added in v1.0.0
type SlowlogEntry struct {
CreatedAt time.Time
PoolName string
Pid int
ScriptFilename string
Stacktrace []SlowlogTraceEntry
}
func (*SlowlogEntry) Reset ¶ added in v1.0.0
func (se *SlowlogEntry) Reset()
func (*SlowlogEntry) String ¶ added in v1.0.0
func (se *SlowlogEntry) String() string
type SlowlogParser ¶ added in v1.0.0
type SlowlogParser struct {
// contains filtered or unexported fields
}
func NewSlowlogParser ¶ added in v1.0.0
func NewSlowlogParser(maxTraceLen int) *SlowlogParser
func (*SlowlogParser) Parse ¶ added in v1.0.0
func (slp *SlowlogParser) Parse(ctx context.Context, r io.Reader, out chan SlowlogEntry) error
type SlowlogTraceEntry ¶ added in v1.0.0
type Status ¶
type Status struct {
Name string `json:"pool"`
ProcessManager string `json:"process manager"`
StartTime int `json:"start time"`
StartSince int `json:"start since"`
AcceptedConn int `json:"accepted conn"`
ListenQueue int `json:"listen queue"`
MaxListenQueue int `json:"max listen queue"`
ListenQueueLen int `json:"listen queue len"`
IdleProcesses int `json:"idle processes"`
ActiveProcesses int `json:"active processes"`
TotalProcesses int `json:"total processes"`
MaxActiveProcesses int `json:"max active processes"`
MaxChildrenReached int `json:"max children reached"`
SlowRequests int `json:"slow requests"`
}
Click to show internal directories.
Click to hide internal directories.