Documentation ¶
Index ¶
- func GetMetricsConfigWatcher() *watcher.ConfigMapWatcher
- func InitKubeMetrics(clusterCache clustercache.ClusterCache, metricsConfig *MetricsConfig, ...)
- func InitKubecostTelemetry(config *MetricsConfig)
- func ResponseMetricMiddleware(handler http.Handler) http.Handler
- func UpdateMetricsConfigFromConfigmap(data map[string]string) error
- type DeploymentMatchLabelsMetric
- type HttpHandlerMetricEvent
- type KubeDeploymentCollector
- type KubeDeploymentReplicasMetric
- type KubeDeploymentStatusAvailableReplicasMetric
- type KubeJobCollector
- type KubeJobStatusFailedMetric
- type KubeMetricsOpts
- type KubeNamespaceCollector
- type KubeNamespaceLabelsMetric
- type KubeNodeCollector
- type KubeNodeLabelsMetric
- type KubeNodeStatusAllocatableCPUCoresMetric
- type KubeNodeStatusAllocatableMemoryBytesMetric
- type KubeNodeStatusAllocatableMetric
- type KubeNodeStatusCapacityCPUCoresMetric
- type KubeNodeStatusCapacityMemoryBytesMetric
- type KubeNodeStatusCapacityMetric
- type KubeNodeStatusConditionMetric
- type KubePVCCollector
- type KubePVCInfoMetric
- type KubePVCResourceRequestsStorageBytesMetric
- type KubePVCapacityBytesMetric
- type KubePVCollector
- type KubePVStatusPhaseMetric
- type KubePodCollector
- type KubePodContainerResourceLimitsCPUCoresMetric
- type KubePodContainerResourceLimitsMemoryBytesMetric
- type KubePodContainerResourceLimitsMetric
- type KubePodContainerResourceRequestsMetric
- type KubePodContainerStatusRestartsTotalMetric
- type KubePodContainerStatusRunningMetric
- type KubePodContainerStatusTerminatedReasonMetric
- type KubePodLabelsCollector
- type KubePodLabelsMetric
- type KubePodOwnerMetric
- type KubePodStatusPhaseMetric
- type KubecostDeploymentCollector
- type KubecostNamespaceCollector
- type KubecostPVInfoMetric
- type KubecostPodCollector
- type KubecostServiceCollector
- type KubecostStatefulsetCollector
- type MetricsConfig
- type NamespaceAnnotationsMetric
- type PodAnnotationsMetric
- type ServiceSelectorLabelsMetric
- type StatefulsetMatchLabelsMetric
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMetricsConfigWatcher ¶
func GetMetricsConfigWatcher() *watcher.ConfigMapWatcher
Returns ConfigMapWatcher for metrics configuration configmap
func InitKubeMetrics ¶
func InitKubeMetrics(clusterCache clustercache.ClusterCache, metricsConfig *MetricsConfig, opts *KubeMetricsOpts)
InitKubeMetrics initializes kubernetes metric emission using the provided options.
func InitKubecostTelemetry ¶
func InitKubecostTelemetry(config *MetricsConfig)
InitKubecostTelemetry registers kubecost application telemetry.
func ResponseMetricMiddleware ¶
ResponseMetricMiddleware dispatches metric events for handles request and responses.
func UpdateMetricsConfigFromConfigmap ¶
Updates metric config file from configmap
Types ¶
type DeploymentMatchLabelsMetric ¶
type DeploymentMatchLabelsMetric struct {
// contains filtered or unexported fields
}
DeploymentMatchLabelsMetric is a prometheus.Metric used to encode deployment match labels
func (DeploymentMatchLabelsMetric) Desc ¶
func (dmlm DeploymentMatchLabelsMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type HttpHandlerMetricEvent ¶
type HttpHandlerMetricEvent struct { Handler string Code int Method string ResponseTime time.Duration ResponseSize uint64 }
HttpHandlerMetricEvent contains http handler response metrics.
type KubeDeploymentCollector ¶
type KubeDeploymentCollector struct { KubeClusterCache clustercache.ClusterCache // contains filtered or unexported fields }
KubeDeploymentCollector is a prometheus collector that generates
func (KubeDeploymentCollector) Collect ¶
func (kdc KubeDeploymentCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
func (KubeDeploymentCollector) Describe ¶
func (kdc KubeDeploymentCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector.
type KubeDeploymentReplicasMetric ¶
type KubeDeploymentReplicasMetric struct {
// contains filtered or unexported fields
}
KubeDeploymentReplicasMetric is a prometheus.Metric used to encode deployment match labels
func (KubeDeploymentReplicasMetric) Desc ¶
func (kdr KubeDeploymentReplicasMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubeDeploymentStatusAvailableReplicasMetric ¶
type KubeDeploymentStatusAvailableReplicasMetric struct {
// contains filtered or unexported fields
}
KubeDeploymentStatusAvailableReplicasMetric is a prometheus.Metric used to encode deployment match labels
func (KubeDeploymentStatusAvailableReplicasMetric) Desc ¶
func (kdr KubeDeploymentStatusAvailableReplicasMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubeJobCollector ¶
type KubeJobCollector struct { KubeClusterCache clustercache.ClusterCache // contains filtered or unexported fields }
KubeJobCollector is a prometheus collector that generates job sourced metrics.
func (KubeJobCollector) Collect ¶
func (kjc KubeJobCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
func (KubeJobCollector) Describe ¶
func (kjc KubeJobCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector.
type KubeJobStatusFailedMetric ¶
type KubeJobStatusFailedMetric struct {
// contains filtered or unexported fields
}
KubeJobStatusFailedMetric
func (KubeJobStatusFailedMetric) Desc ¶
func (kjsf KubeJobStatusFailedMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubeMetricsOpts ¶
type KubeMetricsOpts struct { EmitKubecostControllerMetrics bool EmitNamespaceAnnotations bool EmitPodAnnotations bool EmitKubeStateMetrics bool EmitKubeStateMetricsV1Only bool }
KubeMetricsOpts represents our Kubernetes metrics emission options.
func DefaultKubeMetricsOpts ¶
func DefaultKubeMetricsOpts() *KubeMetricsOpts
DefaultKubeMetricsOpts returns KubeMetricsOpts with default values set
type KubeNamespaceCollector ¶
type KubeNamespaceCollector struct { KubeClusterCache clustercache.ClusterCache // contains filtered or unexported fields }
KubeNamespaceCollector is a prometheus collector that generates namespace sourced metrics
func (KubeNamespaceCollector) Collect ¶
func (nsac KubeNamespaceCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
func (KubeNamespaceCollector) Describe ¶
func (nsac KubeNamespaceCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector.
type KubeNamespaceLabelsMetric ¶
type KubeNamespaceLabelsMetric struct {
// contains filtered or unexported fields
}
NamespaceAnnotationsMetric is a prometheus.Metric used to encode namespace annotations
func (KubeNamespaceLabelsMetric) Desc ¶
func (nam KubeNamespaceLabelsMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubeNodeCollector ¶
type KubeNodeCollector struct { KubeClusterCache clustercache.ClusterCache // contains filtered or unexported fields }
KubeNodeCollector is a prometheus collector that generates node sourced metrics.
func (KubeNodeCollector) Collect ¶
func (nsac KubeNodeCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
func (KubeNodeCollector) Describe ¶
func (nsac KubeNodeCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector.
type KubeNodeLabelsMetric ¶
type KubeNodeLabelsMetric struct {
// contains filtered or unexported fields
}
KubeNodeLabelsMetric is a prometheus.Metric used to encode a duplicate of the deprecated kube-state-metrics metric kube_node_labels
func (KubeNodeLabelsMetric) Desc ¶
func (nam KubeNodeLabelsMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubeNodeStatusAllocatableCPUCoresMetric ¶
type KubeNodeStatusAllocatableCPUCoresMetric struct {
// contains filtered or unexported fields
}
KubeNodeStatusAllocatableCPUCoresMetric is a prometheus.Metric
func (KubeNodeStatusAllocatableCPUCoresMetric) Desc ¶
func (kpcrr KubeNodeStatusAllocatableCPUCoresMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubeNodeStatusAllocatableMemoryBytesMetric ¶
type KubeNodeStatusAllocatableMemoryBytesMetric struct {
// contains filtered or unexported fields
}
KubeNodeStatusAllocatableMemoryBytesMetric is a prometheus.Metric
func (KubeNodeStatusAllocatableMemoryBytesMetric) Desc ¶
func (kpcrr KubeNodeStatusAllocatableMemoryBytesMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubeNodeStatusAllocatableMetric ¶
type KubeNodeStatusAllocatableMetric struct {
// contains filtered or unexported fields
}
KubeNodeStatusAllocatableMetric is a prometheus.Metric
func (KubeNodeStatusAllocatableMetric) Desc ¶
func (kpcrr KubeNodeStatusAllocatableMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubeNodeStatusCapacityCPUCoresMetric ¶
type KubeNodeStatusCapacityCPUCoresMetric struct {
// contains filtered or unexported fields
}
KubeNodeStatusCapacityCPUCoresMetric is a prometheus.Metric used to encode a duplicate of the deprecated kube-state-metrics metric kube_node_status_capacity_memory_bytes
func (KubeNodeStatusCapacityCPUCoresMetric) Desc ¶
func (nam KubeNodeStatusCapacityCPUCoresMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubeNodeStatusCapacityMemoryBytesMetric ¶
type KubeNodeStatusCapacityMemoryBytesMetric struct {
// contains filtered or unexported fields
}
KubeNodeStatusCapacityMemoryBytesMetric is a prometheus.Metric used to encode a duplicate of the deprecated kube-state-metrics metric kube_node_status_capacity_memory_bytes
func (KubeNodeStatusCapacityMemoryBytesMetric) Desc ¶
func (nam KubeNodeStatusCapacityMemoryBytesMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubeNodeStatusCapacityMetric ¶
type KubeNodeStatusCapacityMetric struct {
// contains filtered or unexported fields
}
KubeNodeStatusCapacityMetric is a prometheus.Metric
func (KubeNodeStatusCapacityMetric) Desc ¶
func (kpcrr KubeNodeStatusCapacityMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubeNodeStatusConditionMetric ¶
type KubeNodeStatusConditionMetric struct {
// contains filtered or unexported fields
}
KubeNodeStatusConditionMetric
func (KubeNodeStatusConditionMetric) Desc ¶
func (nam KubeNodeStatusConditionMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubePVCCollector ¶
type KubePVCCollector struct { KubeClusterCache clustercache.ClusterCache // contains filtered or unexported fields }
KubePVCCollector is a prometheus collector that generates pvc sourced metrics
func (KubePVCCollector) Collect ¶
func (kpvc KubePVCCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
func (KubePVCCollector) Describe ¶
func (kpvc KubePVCCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector.
type KubePVCInfoMetric ¶
type KubePVCInfoMetric struct {
// contains filtered or unexported fields
}
KubePVCInfoMetric is a prometheus.Metric
func (KubePVCInfoMetric) Desc ¶
func (kpvcrr KubePVCInfoMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubePVCResourceRequestsStorageBytesMetric ¶
type KubePVCResourceRequestsStorageBytesMetric struct {
// contains filtered or unexported fields
}
KubePVCResourceRequestsStorageBytesMetric is a prometheus.Metric
func (KubePVCResourceRequestsStorageBytesMetric) Desc ¶
func (kpvcrr KubePVCResourceRequestsStorageBytesMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubePVCapacityBytesMetric ¶
type KubePVCapacityBytesMetric struct {
// contains filtered or unexported fields
}
KubePVCapacityBytesMetric is a prometheus.Metric
func (KubePVCapacityBytesMetric) Desc ¶
func (kpcrr KubePVCapacityBytesMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubePVCollector ¶
type KubePVCollector struct { KubeClusterCache clustercache.ClusterCache // contains filtered or unexported fields }
KubePVCollector is a prometheus collector that generates PV metrics
func (KubePVCollector) Collect ¶
func (kpvcb KubePVCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
func (KubePVCollector) Describe ¶
func (kpvcb KubePVCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector.
type KubePVStatusPhaseMetric ¶
type KubePVStatusPhaseMetric struct {
// contains filtered or unexported fields
}
KubePVStatusPhaseMetric is a prometheus.Metric
func (KubePVStatusPhaseMetric) Desc ¶
func (kpcrr KubePVStatusPhaseMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubePodCollector ¶
type KubePodCollector struct { KubeClusterCache clustercache.ClusterCache // contains filtered or unexported fields }
KubePodMetricCollector is a prometheus collector that emits pod metrics
func (KubePodCollector) Collect ¶
func (kpmc KubePodCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
func (KubePodCollector) Describe ¶
func (kpmc KubePodCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector.
type KubePodContainerResourceLimitsCPUCoresMetric ¶
type KubePodContainerResourceLimitsCPUCoresMetric struct {
// contains filtered or unexported fields
}
KubePodContainerResourceLimitsCPUCoresMetric is a prometheus.Metric
func (KubePodContainerResourceLimitsCPUCoresMetric) Desc ¶
func (kpcrr KubePodContainerResourceLimitsCPUCoresMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubePodContainerResourceLimitsMemoryBytesMetric ¶
type KubePodContainerResourceLimitsMemoryBytesMetric struct {
// contains filtered or unexported fields
}
KubePodContainerResourceLimitsMemoryBytesMetric is a prometheus.Metric
func (KubePodContainerResourceLimitsMemoryBytesMetric) Desc ¶
func (kpcrr KubePodContainerResourceLimitsMemoryBytesMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubePodContainerResourceLimitsMetric ¶
type KubePodContainerResourceLimitsMetric struct {
// contains filtered or unexported fields
}
KubePodContainerResourceLimitsMetric is a prometheus.Metric
func (KubePodContainerResourceLimitsMetric) Desc ¶
func (kpcrr KubePodContainerResourceLimitsMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubePodContainerResourceRequestsMetric ¶
type KubePodContainerResourceRequestsMetric struct {
// contains filtered or unexported fields
}
KubePodContainerResourceRequestsMetric is a prometheus.Metric
func (KubePodContainerResourceRequestsMetric) Desc ¶
func (kpcrr KubePodContainerResourceRequestsMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubePodContainerStatusRestartsTotalMetric ¶
type KubePodContainerStatusRestartsTotalMetric struct {
// contains filtered or unexported fields
}
KubePodContainerStatusRestartsTotalMetric is a prometheus.Metric emitting container restarts metrics.
func (KubePodContainerStatusRestartsTotalMetric) Desc ¶
func (kpcs KubePodContainerStatusRestartsTotalMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubePodContainerStatusRunningMetric ¶
type KubePodContainerStatusRunningMetric struct {
// contains filtered or unexported fields
}
KubePodLabelsMetric is a prometheus.Metric used to encode a duplicate of the deprecated kube-state-metrics metric kube_pod_labels
func (KubePodContainerStatusRunningMetric) Desc ¶
func (kpcs KubePodContainerStatusRunningMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubePodContainerStatusTerminatedReasonMetric ¶
type KubePodContainerStatusTerminatedReasonMetric struct {
// contains filtered or unexported fields
}
KubePodContainerStatusTerminatedReasonMetric is a prometheus.Metric emitting container termination reasons.
func (KubePodContainerStatusTerminatedReasonMetric) Desc ¶
func (kpcs KubePodContainerStatusTerminatedReasonMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubePodLabelsCollector ¶
type KubePodLabelsCollector struct { KubeClusterCache clustercache.ClusterCache // contains filtered or unexported fields }
KubePodLabelsCollector is a prometheus collector that emits pod labels only
func (KubePodLabelsCollector) Collect ¶
func (kpmc KubePodLabelsCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
func (KubePodLabelsCollector) Describe ¶
func (kpmc KubePodLabelsCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of pod labels only collected by this Collector.
type KubePodLabelsMetric ¶
type KubePodLabelsMetric struct {
// contains filtered or unexported fields
}
KubePodLabelsMetric is a prometheus.Metric used to encode a duplicate of the deprecated kube-state-metrics metric kube_pod_labels
func (KubePodLabelsMetric) Desc ¶
func (nam KubePodLabelsMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubePodOwnerMetric ¶
type KubePodOwnerMetric struct {
// contains filtered or unexported fields
}
KubePodOwnerMetric is a prometheus.Metric
func (KubePodOwnerMetric) Desc ¶
func (kpo KubePodOwnerMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubePodStatusPhaseMetric ¶
type KubePodStatusPhaseMetric struct {
// contains filtered or unexported fields
}
KubePodStatusPhaseMetric is a prometheus.Metric emitting all phases for a pod
func (KubePodStatusPhaseMetric) Desc ¶
func (kpcs KubePodStatusPhaseMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubecostDeploymentCollector ¶
type KubecostDeploymentCollector struct { KubeClusterCache clustercache.ClusterCache // contains filtered or unexported fields }
KubecostDeploymentCollector is a prometheus collector that generates kubecost specific deployment metrics.
func (KubecostDeploymentCollector) Collect ¶
func (kdc KubecostDeploymentCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
func (KubecostDeploymentCollector) Describe ¶
func (kdc KubecostDeploymentCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector.
type KubecostNamespaceCollector ¶
type KubecostNamespaceCollector struct { KubeClusterCache clustercache.ClusterCache // contains filtered or unexported fields }
KubecostNamespaceCollector is a prometheus collector that generates namespace sourced metrics
func (KubecostNamespaceCollector) Collect ¶
func (nsac KubecostNamespaceCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
func (KubecostNamespaceCollector) Describe ¶
func (nsac KubecostNamespaceCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector.
type KubecostPVInfoMetric ¶
type KubecostPVInfoMetric struct {
// contains filtered or unexported fields
}
--------------------------------------------------------------------------
KubecostPVInfoMetric
-------------------------------------------------------------------------- KubecostPVInfoMetric is a prometheus.Metric
func (KubecostPVInfoMetric) Desc ¶
func (kpvim KubecostPVInfoMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type KubecostPodCollector ¶
type KubecostPodCollector struct { KubeClusterCache clustercache.ClusterCache // contains filtered or unexported fields }
KubecostPodCollector is a prometheus collector that emits pod metrics
func (KubecostPodCollector) Collect ¶
func (kpmc KubecostPodCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
func (KubecostPodCollector) Describe ¶
func (kpmc KubecostPodCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector.
type KubecostServiceCollector ¶
type KubecostServiceCollector struct { KubeClusterCache clustercache.ClusterCache // contains filtered or unexported fields }
KubecostServiceCollector is a prometheus collector that generates service sourced metrics.
func (KubecostServiceCollector) Collect ¶
func (sc KubecostServiceCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
func (KubecostServiceCollector) Describe ¶
func (sc KubecostServiceCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector.
type KubecostStatefulsetCollector ¶
type KubecostStatefulsetCollector struct { KubeClusterCache clustercache.ClusterCache // contains filtered or unexported fields }
StatefulsetCollector is a prometheus collector that generates StatefulsetMetrics
func (KubecostStatefulsetCollector) Collect ¶
func (sc KubecostStatefulsetCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
func (KubecostStatefulsetCollector) Describe ¶
func (sc KubecostStatefulsetCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector.
type MetricsConfig ¶
type MetricsConfig struct {
DisabledMetrics []string `json:"disabledMetrics"`
}
func GetMetricsConfig ¶
func GetMetricsConfig() (*MetricsConfig, error)
Unmarshals metrics.json to a MetricsConfig struct
func UpdateMetricsConfig ¶
func UpdateMetricsConfig(mc *MetricsConfig) (*MetricsConfig, error)
Writes MetricsConfig struct to json file
func (MetricsConfig) GetDisabledMetricsMap ¶
func (mc MetricsConfig) GetDisabledMetricsMap() map[string]struct{}
Gets map of disabled metrics to empty structs
type NamespaceAnnotationsMetric ¶
type NamespaceAnnotationsMetric struct {
// contains filtered or unexported fields
}
NamespaceAnnotationsMetric is a prometheus.Metric used to encode namespace annotations
func (NamespaceAnnotationsMetric) Desc ¶
func (nam NamespaceAnnotationsMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type PodAnnotationsMetric ¶
type PodAnnotationsMetric struct {
// contains filtered or unexported fields
}
PodAnnotationsMetric is a prometheus.Metric used to encode namespace annotations
func (PodAnnotationsMetric) Desc ¶
func (pam PodAnnotationsMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type ServiceSelectorLabelsMetric ¶
type ServiceSelectorLabelsMetric struct {
// contains filtered or unexported fields
}
ServiceSelectorLabelsMetric is a prometheus.Metric used to encode service selector labels
func (ServiceSelectorLabelsMetric) Desc ¶
func (s ServiceSelectorLabelsMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.
type StatefulsetMatchLabelsMetric ¶
type StatefulsetMatchLabelsMetric struct {
// contains filtered or unexported fields
}
StatefulsetMetric is a prometheus.Metric used to encode statefulset match labels
func (StatefulsetMatchLabelsMetric) Desc ¶
func (s StatefulsetMatchLabelsMetric) Desc() *prometheus.Desc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric.