metrics

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package metrics provides metrics used throughout the program, and also exports the maintenance status of every site and machine.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Error is a prometheus metric for exposing any errors that the exporter encounters.
	//
	// TODO: change to gmx_error_total in keeping with prometheus best practices
	// as expressed by their linter.
	Error = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Name: "gmx_error_count",
			Help: "Count of errors.",
		},
		[]string{
			"type",
			"function",
		},
	)
	// Machine is a prometheus metric for exposing machine maintenance status.
	Machine = promauto.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "gmx_machine_maintenance",
			Help: "Whether a machine is in maintenance mode or not.",
		},
		[]string{
			"machine",
			"node",
			"site",
		},
	)
	// Site is a prometheus metric for exposing site maintenance status.
	Site = promauto.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "gmx_site_maintenance",
			Help: "Whether a site is in maintenance mode or not.",
		},
		[]string{
			"site",
		},
	)
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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