metrics

package
v1.153.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: AGPL-3.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PoBInfo *prometheus.GaugeVec = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Name: "darkstat_pob_info",
		Help: "PoB Info",
	}, []string{"pob_nick", "pob_name"})
	PoBHealth *prometheus.GaugeVec = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Name: "darkstat_pob_health",
		Help: "PoB health",
	}, []string{"pob_nick"})
	PoBActive *prometheus.GaugeVec = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Name: "darkstat_pob_active",
		Help: "PoB active",
	}, []string{"pob_nick"})
	PoBCargoLeft *prometheus.GaugeVec = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Name: "darkstat_pob_cargo_left",
		Help: "PoB cargo left",
	}, []string{"pob_nick"})
	PoBLevel *prometheus.GaugeVec = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Name: "darkstat_pob_level",
		Help: "PoB level",
	}, []string{"pob_nick"})
	PoBMoney *prometheus.GaugeVec = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Name: "darkstat_pob_money",
		Help: "PoB money",
	}, []string{"pob_nick"})
	PoBItemsAmount *prometheus.GaugeVec = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Name: "darkstat_pob_items_amount",
		Help: "PoB items amount",
	}, []string{"pob_nick"})

	PoBGoodQuantity *prometheus.GaugeVec = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Name: "darkstat_pob_good_quantity",
		Help: "PoB items amount",
	}, []string{"pob_nick", "good_category", "good_nick", "good_name"})
)
View Source
var (
	HttpResponseByPatternDurationHist *prometheus.HistogramVec = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Name: "darkstat_http_by_pattern_duration_seconds_hist",
		Help: "Duration histogram of http request in seconds",
	}, []string{"pattern", "status_code"})

	HttpResponseByPatternAndUserAgentTotal *prometheus.CounterVec = promauto.NewCounterVec(prometheus.CounterOpts{
		Name: "darkstat_http_by_useragent_finished_total",
		Help: "Count of http requests by useragent and pattern",
	}, []string{"pattern", "useragent"})

	HttpResponseByIpFinishedTotal *prometheus.CounterVec = promauto.NewCounterVec(prometheus.CounterOpts{
		Name: "darkstat_http_by_ip_finished_total",
		Help: "Finished http requests by ip total",
	}, []string{"ip", "status_code"})
	HttpResponseByIpDurationSum *prometheus.GaugeVec = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Name: "darkstat_http_by_ip_duration_seconds_sum",
		Help: "Duration sum of http request by ip in seconds",
	}, []string{"ip", "status_code"})

	// Technically u need only Sum and Count? May be buckets are overkill
	HttpResponseByPatternBodySizeHist *prometheus.HistogramVec = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Name: "darkstat_http_by_pattern_body_size_bytes_hist",
		Help: "Body size histogram of http response in bytes",

		Buckets: []float64{10_000, 25_000, 50_000, 100_000, 250_000, 500_000, 1_000_000, 2_500_000, 5_000_000, 10_000_000},
	}, []string{"pattern", "status_code"})
)

Functions

This section is empty.

Types

type Metronom

type Metronom struct {
	Reg *prometheus.Registry
}

func NewMetronom

func NewMetronom(mux *http.ServeMux) *Metronom

func (*Metronom) Run

func (m *Metronom) Run()

Jump to

Keyboard shortcuts

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