Documentation ¶
Overview ¶
Package collector includes all individual collectors to gather and export system metrics.
Index ¶
- Variables
- func DisableDefaultCollectors()
- func GetDiskNameFromURL(logger log.Logger, z string) string
- func GetGCPZoneFromURL(logger log.Logger, z string) string
- func IsNoDataError(err error) bool
- func NewGCPClient(ctx context.Context, scope string) (client *http.Client, err error)
- type Collector
- func NewDataprocIsClusterRunningCollector(logger log.Logger, project string, monitoredRegions []string) (Collector, error)
- func NewGCEDiskSnapshotCollector(logger log.Logger, project string, monitoredRegions []string) (Collector, error)
- func NewGCEIsMachineRunningCollector(logger log.Logger, project string, monitoredRegions []string) (Collector, error)
- func NewIsDiskAttachedCollector(logger log.Logger, project string, monitoredRegions []string) (Collector, error)
- type DataprocIsClusterRunningCollector
- type GCEDiskSnapshotCollector
- type GCEIsDiskAttachedCollector
- type GCEIsMachineRunningCollector
- type GCPCollector
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GCPHttpTimeout time.Duration GCPMaxRetries int GCPRetryStatuses []int GCPBackoffJitterBase time.Duration GCPMaxBackoffDuration time.Duration )
View Source
var ErrNoData = errors.New("collector returned no data")
ErrNoData indicates the collector found no data to collect, but had no other error.
Functions ¶
func DisableDefaultCollectors ¶
func DisableDefaultCollectors()
DisableDefaultCollectors sets the collector state to false for all collectors which have not been explicitly enabled on the command line.
func GetDiskNameFromURL ¶ added in v1.0.0
func IsNoDataError ¶
Types ¶
type Collector ¶
type Collector interface { // Get new metrics and expose them via prometheus registry. Update(ch chan<- prometheus.Metric) error }
Collector is the interface a collector has to implement.
func NewDataprocIsClusterRunningCollector ¶ added in v1.1.0
func NewGCEDiskSnapshotCollector ¶ added in v1.4.0
func NewGCEIsMachineRunningCollector ¶ added in v1.0.0
type DataprocIsClusterRunningCollector ¶ added in v1.1.0
type DataprocIsClusterRunningCollector struct {
// contains filtered or unexported fields
}
func (*DataprocIsClusterRunningCollector) Update ¶ added in v1.1.0
func (e *DataprocIsClusterRunningCollector) Update(ch chan<- prometheus.Metric) error
type GCEDiskSnapshotCollector ¶ added in v1.4.0
type GCEDiskSnapshotCollector struct {
// contains filtered or unexported fields
}
func (*GCEDiskSnapshotCollector) Update ¶ added in v1.4.0
func (e *GCEDiskSnapshotCollector) Update(ch chan<- prometheus.Metric) error
type GCEIsDiskAttachedCollector ¶ added in v1.0.0
type GCEIsDiskAttachedCollector struct {
// contains filtered or unexported fields
}
func (*GCEIsDiskAttachedCollector) Update ¶ added in v1.0.0
func (e *GCEIsDiskAttachedCollector) Update(ch chan<- prometheus.Metric) error
type GCEIsMachineRunningCollector ¶ added in v1.0.0
type GCEIsMachineRunningCollector struct {
// contains filtered or unexported fields
}
func (*GCEIsMachineRunningCollector) Update ¶ added in v1.0.0
func (e *GCEIsMachineRunningCollector) Update(ch chan<- prometheus.Metric) error
type GCPCollector ¶
type GCPCollector struct { Collectors map[string]Collector // contains filtered or unexported fields }
GCPCollector implements the prometheus.Collector interface.
func NewGCPCollector ¶
func NewGCPCollector(ctx context.Context, logger log.Logger, project string, monitoredRedgions []string) (*GCPCollector, error)
NewGCPCollector creates a new GCPCollector.
func (GCPCollector) Collect ¶
func (n GCPCollector) Collect(ch chan<- prometheus.Metric)
Collect implements the prometheus.Collector interface.
func (GCPCollector) Describe ¶
func (n GCPCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements the prometheus.Collector interface.
Click to show internal directories.
Click to hide internal directories.