Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var APIRequestTotal = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: namespace, Name: "api_request_count", Help: "The total count of API calls.", }, []string{"code", "path", "verb"}, )
APIRequestTotal returns the total count of API calls
View Source
var AssetsBytesTotal = prometheus.NewGauge( prometheus.GaugeOpts{ Namespace: namespace, Name: "assets_bytes_total", Help: "The total bytes of assets.", }, )
AssetsBytesTotal returns the total bytes of assets
View Source
var AssetsItemsTotal = prometheus.NewGauge( prometheus.GaugeOpts{ Namespace: namespace, Name: "assets_items_total", Help: "The total items of assets.", }, )
AssetsItemsTotal returns the total Items of assets
View Source
var ImagesBytesTotal = prometheus.NewGauge( prometheus.GaugeOpts{ Namespace: namespace, Name: "images_bytes_total", Help: "The total bytes of Images.", }, )
ImagesBytesTotal returns the total bytes of Images
View Source
var ImagesItemsTotal = prometheus.NewGauge( prometheus.GaugeOpts{ Namespace: namespace, Name: "images_items_total", Help: "The total items of Images.", }, )
ImagesItemsTotal returns the total Items of Images
View Source
var MachineStatus = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Namespace: namespace, Name: "machine_status", Help: "The machine status set by HTTP API.", }, []string{"status", "address", "serial", "rack", "role", "machine_type"}, )
MachineStatus returns the machine state metrics
Functions ¶
func GetHandler ¶
GetHandler return http.Handler for prometheus metrics
Types ¶
type APICounter ¶
type APICounter struct {
// contains filtered or unexported fields
}
APICounter represents API counter.
func (*APICounter) Inc ¶
func (c *APICounter) Inc(statusCode int, path, verb string)
Inc increments the counter.
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector is a metrics collector for Sabakan.
func NewCollector ¶
func NewCollector(model *sabakan.Model) *Collector
NewCollector returns a new Collector.
func (Collector) Collect ¶
func (c Collector) Collect(ch chan<- prometheus.Metric)
Collect implements prometheus.Collector.Collect().
func (Collector) Describe ¶
func (c Collector) Describe(ch chan<- *prometheus.Desc)
Describe implements prometheus.Collector.Describe().
Click to show internal directories.
Click to hide internal directories.