simdog

package module
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: MIT Imports: 12 Imported by: 1

README

# simdog
simple prometheus exporter

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "None"
	GitHash   = "NoneHash"
	GitBranch = "NoneBranch"
	COYPRIGHT = "©2018-%d %s"
	Owner     = "jialinwu"
	BuildTime = "None"
	BuildUser = "None"
	BuildHost = "None"
	GoVersion = runtime.Version()
)
View Source
var CurProc *process.Process

Functions

func HeadlCheckHandler added in v1.0.3

func HeadlCheckHandler(w http.ResponseWriter, r *http.Request)

func IncQps

func IncQps()

func LogVersion added in v1.0.4

func LogVersion(params map[string]string)

LogVersion assigns version info to params

func NewVersionCollector

func NewVersionCollector(appName string) prometheus.Collector

NewVersionCollector returns a collector that exports metrics about current version information.

func ReadBuildInfo

func ReadBuildInfo()

func ReadBuildInfoNoExit

func ReadBuildInfoNoExit()

func VersionHandler added in v1.0.2

func VersionHandler(w http.ResponseWriter, r *http.Request)

Types

type CpuMetric

type CpuMetric struct {
	// contains filtered or unexported fields
}

func NewCpuMetric

func NewCpuMetric(metricName string) *CpuMetric

func (*CpuMetric) Collect

func (m *CpuMetric) Collect(ch chan<- prometheus.Metric)

func (*CpuMetric) Describe

func (m *CpuMetric) Describe(ch chan<- *prometheus.Desc)

type NetMetric

type NetMetric struct {
	// contains filtered or unexported fields
}

func NewNetMetric

func NewNetMetric(metricName string) *NetMetric

func (*NetMetric) Collect

func (m *NetMetric) Collect(ch chan<- prometheus.Metric)

func (*NetMetric) Describe

func (m *NetMetric) Describe(ch chan<- *prometheus.Desc)

type QpsMetric

type QpsMetric struct {
	// contains filtered or unexported fields
}

func NewQpsMetric

func NewQpsMetric(metricName string) *QpsMetric

func (*QpsMetric) Collect

func (m *QpsMetric) Collect(ch chan<- prometheus.Metric)

func (*QpsMetric) Describe

func (m *QpsMetric) Describe(ch chan<- *prometheus.Desc)

Directories

Path Synopsis
cmd
sample Module

Jump to

Keyboard shortcuts

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