Documentation
¶
Overview ¶
Package containers implements the functionality needed to fetch metrics from the different runtimes supported (Docker, containerd, etc.).
Package containers provides container-related utilities. Filter types have moved to comp/core/workloadfilter/legacy.
Index ¶
- Constants
- func BuildEntityName(runtime, id string) string
- func GetPauseContainerExcludeList() []stringdeprecated
- func IsEntityName(name string) bool
- func IsExcludedByAnnotationInner(annotations map[string]string, containerName string, excludePrefix string) booldeprecated
- func IsPauseContainer(labels map[string]string) bool
- func PreprocessImageFilter(imageFilter string) stringdeprecated
- func ShortContainerID(containerID string) string
- func SplitEntityName(name string) (string, string)
- type EnvFilter
- type Filterdeprecated
- type FilterTypedeprecated
Constants ¶
const ContainerEntityName = "container_id"
ContainerEntityName is the entity name applied to all containers
const ContainerEntityPrefix = ContainerEntityName + EntitySeparator
ContainerEntityPrefix is the prefix that any entity corresponding to a container must have It replaces any prior prefix like <runtime>:// in a pod container status.
const EntitySeparator = "://"
EntitySeparator is used to separate the entity name from its ID
Variables ¶
This section is empty.
Functions ¶
func BuildEntityName ¶
BuildEntityName builds a valid entity name for a given container runtime and cid.
func GetPauseContainerExcludeList
deprecated
func GetPauseContainerExcludeList() []string
GetPauseContainerExcludeList returns the exclude list for pause containers.
Deprecated: use comp/core/workloadfilter.Component instead.
func IsEntityName ¶
IsEntityName tests whether a given entity name is valid
func IsPauseContainer ¶ added in v0.9.0
IsPauseContainer returns whether a container is a pause container based on the container labels This util can be used to exclude pause container in best-effort Note: Pause containers can still be excluded based on the image name via the container filtering module
func PreprocessImageFilter
deprecated
func ShortContainerID ¶
ShortContainerID shortens the container identifier.
func SplitEntityName ¶
SplitEntityName returns the prefix and container cid parts of a valid entity name
Types ¶
type EnvFilter ¶
type EnvFilter struct {
// contains filtered or unexported fields
}
EnvFilter defines a filter for environment variables
func EnvVarFilterFromConfig ¶
func EnvVarFilterFromConfig() EnvFilter
EnvVarFilterFromConfig returns an EnvFilter based on the options present in the config
func (EnvFilter) IsIncluded ¶
IsIncluded returns whether the given env variable name is included
type Filter
deprecated
Filter holds the state for the container filtering logic.
Deprecated: use comp/core/workloadfilter.Component instead.
func GetPauseContainerFilter
deprecated
added in
v0.9.0
GetPauseContainerFilter returns a filter that excludes pause containers when excludePause is true. The excludePause value should come from the "exclude_pause_container" config key.
Deprecated: use comp/core/workloadfilter.Component instead.
func NewFilter
deprecated
func NewFilter(ft FilterType, includeList, excludeList []string) (*Filter, error)
NewFilter creates a new container filter from include and exclude pattern slices.
Deprecated: use comp/core/workloadfilter.Component instead.
type FilterType
deprecated
type FilterType = legacy.FilterType
FilterType indicates the container filter type.
Deprecated: use comp/core/workloadfilter.Component instead.
const ( // GlobalFilter is used to cover both MetricsFilter and LogsFilter filter types. // // Deprecated: use comp/core/workloadfilter.Component instead. GlobalFilter FilterType = legacy.GlobalFilter // MetricsFilter refers to the Metrics filter type. // // Deprecated: use comp/core/workloadfilter.Component instead. MetricsFilter FilterType = legacy.MetricsFilter // LogsFilter refers to the Logs filter type. // // Deprecated: use comp/core/workloadfilter.Component instead. LogsFilter FilterType = legacy.LogsFilter // KubeNamespaceFilterPrefix is the prefix used for Kubernetes namespaces. // // Deprecated: use comp/core/workloadfilter.Component instead. KubeNamespaceFilterPrefix = legacy.KubeNamespaceFilterPrefix )
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
image
module
|
|
|
Package containers provides metadata for containers.
|
Package containers provides metadata for containers. |
|
Package metrics registers all the different collectors for container-related metrics.
|
Package metrics registers all the different collectors for container-related metrics. |
|
containerd
Package containerd implements the containerd metrics collector
|
Package containerd implements the containerd metrics collector |
|
cri
Package cri implements the CRI metrics collector.
|
Package cri implements the CRI metrics collector. |
|
docker
Package docker implements the Docker metrics collector.
|
Package docker implements the Docker metrics collector. |
|
ecsfargate
Package ecsfargate implements the ECS Fargate metrics collector.
|
Package ecsfargate implements the ECS Fargate metrics collector. |
|
ecsmanagedinstances
Package ecsmanagedinstances implements the ECS Managed Instances metrics collector.
|
Package ecsmanagedinstances implements the ECS Managed Instances metrics collector. |
|
kubelet
Package kubelet implements the Kubelet metrics collector.
|
Package kubelet implements the Kubelet metrics collector. |
|
provider
Package provider defines the Provider interface which allows to get metrics collectors for the different container runtimes supported (Docker, containerd, etc.).
|
Package provider defines the Provider interface which allows to get metrics collectors for the different container runtimes supported (Docker, containerd, etc.). |
|
system
Package system implements the system metrics collector, which is based on Linux cgroups.
|
Package system implements the system metrics collector, which is based on Linux cgroups. |