Documentation ¶
Overview ¶
TODO: rename collector
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ScrapeErrorTotalMetric = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "ksm_scrape_error_total", Help: "Total scrape errors encountered when scraping a resource", }, []string{"resource"}, ) ResourcesPerScrapeMetric = prometheus.NewSummaryVec( prometheus.SummaryOpts{ Name: "ksm_resources_per_scrape", Help: "Number of resources returned per scrape", }, []string{"resource"}, ) )
Functions ¶
This section is empty.
Types ¶
type Builder ¶ added in v1.5.0
type Builder struct {
// contains filtered or unexported fields
}
Builder helps to build collectors. It follows the builder pattern (https://en.wikipedia.org/wiki/Builder_pattern).
func NewBuilder ¶ added in v1.5.0
NewBuilder returns a new builder.
func (*Builder) WithEnabledCollectors ¶ added in v1.5.0
WithEnabledCollectors sets the enabledCollectors property of a Builder.
func (*Builder) WithKubeClient ¶ added in v1.5.0
WithKubeClient sets the kubeClient property of a Builder.
func (*Builder) WithNamespaces ¶ added in v1.5.0
func (b *Builder) WithNamespaces(n options.NamespaceList)
WithNamespaces sets the namespaces property of a Builder.
func (*Builder) WithWhiteBlackList ¶ added in v1.5.0
func (b *Builder) WithWhiteBlackList(l whiteBlackLister)
WithWhiteBlackList configures the white or blacklisted metrics to be exposed by the collectors build by the Builder
type Collector ¶ added in v1.5.0
type Collector struct {
Store Store
}
Collector represents a kube-state-metrics metric collector. It is a stripped down version of the Prometheus client_golang collector.
func NewCollector ¶ added in v1.5.0
NewCollector constructs a collector with the given Store.
Source Files ¶
- builder.go
- collectors.go
- configmap.go
- cronjob.go
- daemonset.go
- deployment.go
- endpoint.go
- hpa.go
- job.go
- limitrange.go
- namespace.go
- node.go
- persistentvolume.go
- persistentvolumeclaim.go
- pod.go
- poddisruptionbudget.go
- replicaset.go
- replicationcontroller.go
- resourcequota.go
- secret.go
- service.go
- statefulset.go
- testutils.go
- utils.go