Documentation ¶
Index ¶
Constants ¶
View Source
const ( LabelNamespace = "namespace" LabelPod = "pod" LabelContainer = "container" )
Variables ¶
View Source
var ( CommonLabels = []string{LabelNamespace, LabelPod, LabelContainer} DescCpuUsage = prometheus.NewDesc("container_cpu_usage_cores", "CPU cores used", CommonLabels, nil) DescMemUsage = prometheus.NewDesc("container_memory_usage_bytes", "memory used", CommonLabels, nil) )
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v1.2.0
type Config struct { Namespace string `default:"default" usage:"the namespace of the pods to collect"` IgnoreNamespaces []string `default:"kube-system" usage:"when 'namespace' is empty, this lists namespaces to ignore"` HttpBinding string `usage:"binding of http listener for metrics export" default:":8080"` MetricsPath string `usage:"http path for metrics export" default:"/metrics"` Debug bool `usage:"enable debug logging"` }
configuration for the exporter
type Handler ¶ added in v1.2.0
type Handler struct { ExporterConfig Config Logger *zap.Logger ClientSet *versioned.Clientset KubeConfig *rest.Config // contains filtered or unexported fields }
func (*Handler) GetNamespaces ¶ added in v1.2.0
func (*Handler) SetupCollector ¶ added in v1.2.0
func (*Handler) UpdateNamespaces ¶ added in v1.2.0
type KubeMetricsCollector ¶
type KubeMetricsCollector struct {
// contains filtered or unexported fields
}
func NewKubeMetricsCollector ¶
func (*KubeMetricsCollector) Collect ¶
func (c *KubeMetricsCollector) Collect(metrics chan<- prometheus.Metric)
func (*KubeMetricsCollector) Describe ¶
func (c *KubeMetricsCollector) Describe(descs chan<- *prometheus.Desc)
func (*KubeMetricsCollector) UpdateNamespaces ¶ added in v1.2.0
func (c *KubeMetricsCollector) UpdateNamespaces(namespaces []string)
Click to show internal directories.
Click to hide internal directories.