monitor

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2018 License: Apache-2.0 Imports: 10 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 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 {
	TxpoolIngressTx    metrics.Counter
	TxpoolPooledTx     metrics.Counter
	TxpoolDiscardedTx  metrics.Counter
	TxpoolDuplacatedTx metrics.Counter
	TxpoolOutgoingTx   metrics.Counter
	BlockHeight        metrics.Gauge
	BlockTxNum         metrics.Gauge
	CommittedTx        metrics.Counter
}

PromMetrics contains metrics exposed by Consensus.

var JTMetrics *Metrics

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