collector

package
v0.0.0-...-faea212 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BambooAgent

type BambooAgent struct {
	ID       int64  `json:"id"`
	Name     string `json:"name"`
	Type     string `json:"type"`
	IsActive bool   `json:"active"`
	IsBusy   bool   `json:"busy"`
	Enabled  bool   `json:"enabled"`
}

BambooAgent represents an agent's data fetched from the Bamboo API.

type BambooQueue

type BambooQueue struct {
	QueuedBuilds struct {
		Size int64 `json:"size"`
	} `json:"queuedBuilds"`
}

BambooQueue represents the build queue data fetched from the Bamboo API.

type Config

type Config struct {
	ScrapeURI string
	Insecure  bool
}

Config holds the configuration for the exporter.

type Exporter

type Exporter struct {
	URI string
	// contains filtered or unexported fields
}

Exporter collects metrics from Bamboo and exposes them to Prometheus.

func NewExporter

func NewExporter(config *Config, logger *slog.Logger) *Exporter

NewExporter creates a new instance of Exporter.

func (*Exporter) Collect

func (e *Exporter) Collect(ch chan<- prometheus.Metric)

Collect collects metrics from Bamboo and sends them to Prometheus.

func (*Exporter) Describe

func (e *Exporter) Describe(ch chan<- *prometheus.Desc)

Describe describes the Prometheus metrics for the exporter.

Jump to

Keyboard shortcuts

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