Documentation
¶
Index ¶
- type BlockDeviceMetric
- type BlockDeviceMetricsWriter
- type Config
- type Controller
- type DiskStats
- type EBPFTracer
- type FilesystemMetric
- type FilesystemMetricsWriter
- type NodeStatsSummaryMetric
- type NodeStatsSummaryWriter
- type StorageInfoProvider
- type SysfsStorageInfoProvider
- func (s *SysfsStorageInfoProvider) BuildBlockDeviceMetrics(timestamp time.Time) ([]BlockDeviceMetric, error)
- func (s *SysfsStorageInfoProvider) BuildFilesystemMetrics(timestamp time.Time) ([]FilesystemMetric, error)
- func (s *SysfsStorageInfoProvider) CollectNodeStatsSummary(ctx context.Context) (*NodeStatsSummaryMetric, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockDeviceMetric ¶ added in v1.43.1
type BlockDeviceMetric struct {
Name string `avro:"name"`
NodeName string `avro:"node_name"`
NodeTemplate *string `avro:"node_template"`
Path string `avro:"path"`
SizeBytes *int64 `avro:"size_bytes"`
DiskType string `avro:"disk_type"` // HDD, SSD
PartitionOf string `avro:"partition_of"` // parent device for partitions
Holders []string `avro:"holders"` // devices using this device
IsVirtual bool `avro:"is_virtual"` // dm-* or md* devices
RaidLevel string `avro:"raid_level"` // raid0, raid1, raid5, etc
ReadIOPS float64 `avro:"read_iops"`
WriteIOPS float64 `avro:"write_iops"`
ReadThroughputBytes float64 `avro:"read_throughput_bytes"`
WriteThroughputBytes float64 `avro:"write_throughput_bytes"`
ReadLatencyMs float64 `avro:"read_latency_ms"`
WriteLatencyMs float64 `avro:"write_latency_ms"`
InFlightRequests int64 `avro:"in_flight_requests"`
AvgQueueDepth float64 `avro:"avg_queue_depth"`
Utilization float64 `avro:"utilization"`
Timestamp time.Time `avro:"ts"`
// contains filtered or unexported fields
}
BlockDeviceMetric represents enhanced block device metrics with accurate sector sizes
type BlockDeviceMetricsWriter ¶ added in v1.43.1
type BlockDeviceMetricsWriter interface {
Write(metrics ...BlockDeviceMetric) error
}
func NewBlockDeviceMetricsWriter ¶ added in v1.43.1
func NewBlockDeviceMetricsWriter(metricsClient custommetrics.MetricClient) (BlockDeviceMetricsWriter, error)
type Config ¶
type Config struct {
DataBatch config.DataBatchConfig `validate:"required"`
Netflow config.NetflowConfig `validate:"required"`
Events config.EventsConfig `validate:"required"`
Stats config.StatsConfig `validate:"required"`
ProcessTree config.ProcessTreeConfig `validate:"required"`
}
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController( log *logging.Logger, cfg Config, exporters []export.DataBatchWriter, containersClient containersClient, ct conntrackClient, tracer EBPFTracer, signatureEngine signatureEngine, kubeClient kubepb.KubeAPIClient, processTreeCollector processTreeCollector, procHandler procHandler, enrichmentService enrichmentService, blockDeviceMetricsWriter BlockDeviceMetricsWriter, filesystemMetricsWriter FilesystemMetricsWriter, storageInfoProvider StorageInfoProvider, nodeStatsSummaryWriter NodeStatsSummaryWriter, ) *Controller
func (*Controller) IsMutedNamespace ¶
func (c *Controller) IsMutedNamespace(namespace string) bool
func (*Controller) MuteNamespace ¶
func (c *Controller) MuteNamespace(namespace string) error
type DiskStats ¶ added in v1.46.0
type DiskStats struct {
Name string
ReadIOs uint64
ReadMerges uint64
ReadSectors uint64
ReadTicks uint64
WriteIOs uint64
WriteMerges uint64
WriteSectors uint64
WriteTicks uint64
InFlight uint64
IOTicks uint64
TimeInQueue uint64
Timestamp time.Time
}
DiskStats represents raw I/O statistics from /proc/diskstats
type EBPFTracer ¶ added in v1.48.2
type EBPFTracer interface {
Events() <-chan *types.Event
MuteEventsFromCgroup(cgroup uint64, reason string) error
MuteEventsFromCgroups(cgroups []uint64, reason string) error
UnmuteEventsFromCgroup(cgroup uint64) error
ReadSyscallStats() (map[ebpftracer.SyscallStatsKeyCgroupID][]ebpftracer.SyscallStats, error)
CollectNetworkSummary() ([]ebpftracer.TrafficKey, []ebpftracer.TrafficSummary, error)
CollectFileAccessStats() ([]ebpftracer.FileAccessKey, []ebpftracer.FileAccessStats, error)
GetEventName(id events.ID) string
GetDNSNameFromCache(cgroupID uint64, addr netip.Addr) string
RemoveCgroupFromDNSCache(cgroup uint64)
}
type FilesystemMetric ¶ added in v1.43.1
type FilesystemMetric struct {
Devices []string `avro:"devices"`
NodeName string `avro:"node_name"`
NodeTemplate *string `avro:"node_template"`
MountPoint string `avro:"mount_point"`
Type string `avro:"type"` // Filesystem type (ext4, xfs, btrfs, etc.)
Options []string `avro:"options"` // Mount options
TotalBytes *int64 `avro:"total_bytes"`
Labels map[string]string `avro:"labels"`
UsedBytes *int64 `avro:"used_bytes"`
TotalInodes *int64 `avro:"total_inodes"`
UsedInodes *int64 `avro:"used_inodes"`
Timestamp time.Time `avro:"ts"`
}
type FilesystemMetricsWriter ¶ added in v1.43.1
type FilesystemMetricsWriter interface {
Write(metrics ...FilesystemMetric) error
}
func NewFilesystemMetricsWriter ¶ added in v1.43.1
func NewFilesystemMetricsWriter(metricsClient custommetrics.MetricClient) (FilesystemMetricsWriter, error)
type NodeStatsSummaryMetric ¶ added in v1.46.0
type NodeStatsSummaryMetric struct {
NodeName string `avro:"node_name"`
NodeTemplate *string `avro:"node_template"`
ImageFsSizeBytes *int64 `avro:"image_fs_size_bytes"`
ImageFsUsedBytes *int64 `avro:"image_fs_used_bytes"`
ContainerFsSizeBytes *int64 `avro:"container_fs_size_bytes"`
ContainerFsUsedBytes *int64 `avro:"container_fs_used_bytes"`
Timestamp time.Time `avro:"ts"`
}
NodeStatsSummaryMetric represents node-level filesystem statistics from kubelet
type NodeStatsSummaryWriter ¶ added in v1.46.0
type NodeStatsSummaryWriter interface {
Write(metrics ...NodeStatsSummaryMetric) error
}
func NewNodeStatsSummaryWriter ¶ added in v1.46.0
func NewNodeStatsSummaryWriter(metricsClient custommetrics.MetricClient) (NodeStatsSummaryWriter, error)
type StorageInfoProvider ¶ added in v1.43.1
type StorageInfoProvider interface {
BuildFilesystemMetrics(timestamp time.Time) ([]FilesystemMetric, error)
BuildBlockDeviceMetrics(timestamp time.Time) ([]BlockDeviceMetric, error)
CollectNodeStatsSummary(ctx context.Context) (*NodeStatsSummaryMetric, error)
}
func NewStorageInfoProvider ¶ added in v1.43.1
func NewStorageInfoProvider(log *logging.Logger, kubeClient kubepb.KubeAPIClient, clusterID string) (StorageInfoProvider, error)
type SysfsStorageInfoProvider ¶ added in v1.43.1
type SysfsStorageInfoProvider struct {
// contains filtered or unexported fields
}
func (*SysfsStorageInfoProvider) BuildBlockDeviceMetrics ¶ added in v1.43.1
func (s *SysfsStorageInfoProvider) BuildBlockDeviceMetrics(timestamp time.Time) ([]BlockDeviceMetric, error)
func (*SysfsStorageInfoProvider) BuildFilesystemMetrics ¶ added in v1.43.1
func (s *SysfsStorageInfoProvider) BuildFilesystemMetrics(timestamp time.Time) ([]FilesystemMetric, error)
func (*SysfsStorageInfoProvider) CollectNodeStatsSummary ¶ added in v1.46.0
func (s *SysfsStorageInfoProvider) CollectNodeStatsSummary(ctx context.Context) (*NodeStatsSummaryMetric, error)
CollectNodeStatsSummary retrieves node stats summary from the controller and builds a metric
Click to show internal directories.
Click to hide internal directories.