monitor_forwarder

package
v0.0.0-...-cd62ce9 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {

	// Run
	UpForSeconds *prometheus.Desc

	// Forwarder
	FinishedHeight     *prometheus.Desc
	L1Interactions     *prometheus.Desc
	L2Interactions     *prometheus.Desc
	BlocksBehindSyncer *prometheus.Desc

	// Redis publisher
	RedisPublishErrors     []*prometheus.Desc
	RedisPersistentErrors  []*prometheus.Desc
	RedisMessagesPublished []*prometheus.Desc
	RedisPoolHits          []*prometheus.Desc
	RedisPoolIdleConns     []*prometheus.Desc
	RedisPoolMisses        []*prometheus.Desc
	RedisPoolStaleConns    []*prometheus.Desc
	RedisPoolTimeouts      []*prometheus.Desc
	RedisPoolTotalConns    []*prometheus.Desc

	// App sync publisher
	AppSyncPublishErrors     *prometheus.Desc
	AppSyncPersistentErrors  *prometheus.Desc
	AppSyncMessagesPublished *prometheus.Desc
	// contains filtered or unexported fields
}

func NewCollector

func NewCollector(config *config.Config) *Collector

func (*Collector) Collect

func (self *Collector) Collect(ch chan<- prometheus.Metric)

Collect implements required collect function for all promehteus collectors

func (*Collector) Describe

func (self *Collector) Describe(ch chan<- *prometheus.Desc)

func (*Collector) WithMonitor

func (self *Collector) WithMonitor(m *Monitor) *Collector

type Monitor

type Monitor struct {
	*task.Task

	Report report.Report

	// Params
	IsFatalError atomic.Bool
	// contains filtered or unexported fields
}

Stores and computes monitor counters

func NewMonitor

func NewMonitor(config *config.Config) (self *Monitor)

func (*Monitor) Clear

func (self *Monitor) Clear()

func (*Monitor) GetPrometheusCollector

func (self *Monitor) GetPrometheusCollector() (collector prometheus.Collector)

func (*Monitor) GetReport

func (self *Monitor) GetReport() *report.Report

func (*Monitor) IsOK

func (self *Monitor) IsOK() bool

func (*Monitor) OnGetHealth

func (self *Monitor) OnGetHealth(c *gin.Context)

func (*Monitor) OnGetState

func (self *Monitor) OnGetState(c *gin.Context)

func (*Monitor) SetPermanentError

func (self *Monitor) SetPermanentError(err error)

Jump to

Keyboard shortcuts

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