monitor

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

* Define types and structures related to prometheus metrics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartExpvarServer

func StartExpvarServer(config ExpvarConfig)

func StartPprofServer added in v1.0.0

func StartPprofServer(config PprofConfig)

func StartPrometheusServer

func StartPrometheusServer(config PrometheusConfig)

startPrometheusServer starts a Prometheus HTTP server, listening for metrics collectors on addr.

func StopPrometheusServer

func StopPrometheusServer()

stopPrometheusServer stops a Prometheus HTTP server

Types

type ExpvarConfig

type ExpvarConfig struct {
	ExpvarEnabled bool
	ExpvarPort    string
	ExpvarPath    string
}

type Metrics

type Metrics struct {
	ApigatewayReceivedTx metrics.Counter
	SwitchTakenTx        metrics.Counter
	TxpoolIngressTx      metrics.Counter
	TxpoolPooledTx       metrics.Counter
	TxpoolDiscardedTx    metrics.Counter
	TxpoolDuplacatedTx   metrics.Counter
	TxpoolOutgoingTx     metrics.Counter
	ConsensusPeerId      metrics.Gauge
	ConsensusMasterId    metrics.Gauge
	BlockHeight          metrics.Gauge
	BlockTxNum           metrics.Gauge
	CommittedTx          metrics.Counter
}

PromMetrics contains metrics exposed by Consensus.

var JTMetrics *Metrics

type PprofConfig added in v1.0.0

type PprofConfig struct {
	PprofEnabled bool
	PprofPort    string
}

type PrometheusConfig

type PrometheusConfig struct {
	PrometheusEnabled bool
	PrometheusPort    string
	PrometheusMaxConn int
}

Jump to

Keyboard shortcuts

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