metric

package
Version: v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Create a metrics registry.
	Registry = prometheus.NewRegistry()

	// Create some standard server metrics.
	GrpcMetrics = grpcprometheus.NewServerMetrics(
		func(o *prometheus.CounterOpts) {
			o.Namespace = "cete"
		},
	)

	// Raft node state metric
	RaftStateMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "raft",
		Name:      "state",
		Help:      "Node state. 0:Follower, 1:Candidate, 2:Leader, 3:Shutdown",
	}, []string{"id"})

	RaftTermMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "raft",
		Name:      "term",
		Help:      "Term.",
	}, []string{"id"})

	RaftLastLogIndexMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "raft",
		Name:      "last_log_index",
		Help:      "Last log index.",
	}, []string{"id"})

	RaftLastLogTermMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "raft",
		Name:      "last_log_term",
		Help:      "Last log term.",
	}, []string{"id"})

	RaftCommitIndexMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "raft",
		Name:      "commit_index",
		Help:      "Commit index.",
	}, []string{"id"})

	RaftAppliedIndexMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "raft",
		Name:      "applied_index",
		Help:      "Applied index.",
	}, []string{"id"})

	RaftFsmPendingMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "raft",
		Name:      "fsm_pending",
		Help:      "FSM pending.",
	}, []string{"id"})

	RaftLastSnapshotIndexMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "raft",
		Name:      "last_snapshot_index",
		Help:      "Last snapshot index.",
	}, []string{"id"})

	RaftLastSnapshotTermMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "raft",
		Name:      "last_snapshot_term",
		Help:      "Last snapshot term.",
	}, []string{"id"})

	RaftLatestConfigurationIndexMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "raft",
		Name:      "latest_configuration_index",
		Help:      "Latest configuration index.",
	}, []string{"id"})

	RaftNumPeersMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "raft",
		Name:      "num_peers",
		Help:      "Number of peers.",
	}, []string{"id"})

	RaftLastContactMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "raft",
		Name:      "last_copntact",
		Help:      "Last contact.",
	}, []string{"id"})

	RaftNumNodesMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "raft",
		Name:      "num_nodes",
		Help:      "Number of nodes.",
	}, []string{"id"})

	KvsNumReadsMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "kvs",
		Name:      "num_reads",
		Help:      "Number of reads.",
	}, []string{"id"})

	KvsNumWritesMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "kvs",
		Name:      "num_writes",
		Help:      "Number of writes.",
	}, []string{"id"})

	KvsNumBytesReadMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "kvs",
		Name:      "num_bytes_read",
		Help:      "Number of bytes read.",
	}, []string{"id"})

	KvsNumBytesWrittenMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "kvs",
		Name:      "num_bytes_written",
		Help:      "Number of bytes written.",
	}, []string{"id"})

	KvsNumLSMGetsMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "kvs",
		Name:      "num_lsm_gets",
		Help:      "Number of LSM gets.",
	}, []string{"id", "key"})

	KvsNumLSMBloomHitsMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "kvs",
		Name:      "num_lsm_bloom_Hits",
		Help:      "Number of LSM bloom hits.",
	}, []string{"id", "key"})

	KvsNumGetsMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "kvs",
		Name:      "num_gets",
		Help:      "Number of gets.",
	}, []string{"id"})

	KvsNumPutsMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "kvs",
		Name:      "num_puts",
		Help:      "Number of puts.",
	}, []string{"id"})

	KvsNumBlockedPutsMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "kvs",
		Name:      "num_blocked_puts",
		Help:      "Number of blocked puts.",
	}, []string{"id"})

	KvsNumMemtablesGetsMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "kvs",
		Name:      "num_memtables_gets",
		Help:      "Number of memtables gets.",
	}, []string{"id"})

	KvsLSMSizeMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "kvs",
		Name:      "lsm_size",
		Help:      "LSM size.",
	}, []string{"id", "path"})

	KvsVlogSizeMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "kvs",
		Name:      "vlog_size",
		Help:      "Vlog size.",
	}, []string{"id", "path"})

	KvsPendingWritesMetric = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "cete",
		Subsystem: "kvs",
		Name:      "pending_writes",
		Help:      "Pending writes.",
	}, []string{"id", "path"})
)

Functions

This section is empty.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL