Documentation
¶
Index ¶
- type FimBackendType
- type HostFimBackendConfig
- type HostFimBatchConfig
- type HostFimConfig
- type HostFimDedupConfig
- type HostFimPathConfig
- type HostFimPeriodicConfig
- type HostFimSensor
- func NewHostFimSensorFanotify(hostPath string, pathConfigs []HostFimPathConfig, exporter exporters.Exporter) HostFimSensor
- func NewHostFimSensorFanotifyWithBatching(hostPath string, pathConfigs []HostFimPathConfig, exporter exporters.Exporter, ...) HostFimSensor
- func NewHostFimSensorFanotifyWithConfig(hostPath string, pathConfigs []HostFimPathConfig, exporter exporters.Exporter, ...) HostFimSensor
- func NewHostFimSensorPeriodic(hostPath string, config HostFimConfig, exporter exporters.Exporter) HostFimSensor
- func NewHostFimSensorWithBackend(hostPath string, config HostFimConfig, exporter exporters.Exporter) (HostFimSensor, error)
- type HostFimSensorFanotify
- type HostFimSensorPeriodic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FimBackendType ¶
type FimBackendType string
FimBackendType represents the type of FIM backend to use
const ( FimBackendFanotify FimBackendType = "fanotify" FimBackendPeriodic FimBackendType = "periodic" )
type HostFimBackendConfig ¶
type HostFimBackendConfig struct {
BackendType FimBackendType // Explicit backend selection
}
HostFimBackendConfig holds backend selection configuration
type HostFimBatchConfig ¶
type HostFimConfig ¶
type HostFimConfig struct {
BackendConfig HostFimBackendConfig
PathConfigs []HostFimPathConfig
BatchConfig HostFimBatchConfig
DedupConfig HostFimDedupConfig
PeriodicConfig *HostFimPeriodicConfig // Only used for periodic backend
}
HostFimConfig holds the complete FIM configuration
func DefaultHostFimConfig ¶
func DefaultHostFimConfig() HostFimConfig
DefaultHostFimConfig returns a default configuration
func (*HostFimConfig) Validate ¶
func (c *HostFimConfig) Validate() error
Validate validates the configuration
type HostFimDedupConfig ¶
type HostFimPathConfig ¶
type HostFimPeriodicConfig ¶
type HostFimPeriodicConfig struct {
ScanInterval time.Duration // How often to scan (e.g., 5 minutes)
MaxScanDepth int // Maximum directory depth to scan
MaxSnapshotNodes int // Maximum number of nodes in snapshot
IncludeHidden bool // Whether to include hidden files
ExcludePatterns []string // Glob patterns to exclude
MaxFileSize int64 // Maximum file size to track
FollowSymlinks bool // Whether to follow symbolic links
}
HostFimPeriodicConfig holds configuration for periodic scanning
func DefaultPeriodicConfig ¶
func DefaultPeriodicConfig() HostFimPeriodicConfig
DefaultPeriodicConfig returns default periodic scanning configuration
func (*HostFimPeriodicConfig) Validate ¶
func (c *HostFimPeriodicConfig) Validate() error
Validate validates the periodic configuration
type HostFimSensor ¶
type HostFimSensor interface {
Start() error
Stop()
}
func NewHostFimSensorFanotify ¶
func NewHostFimSensorFanotify(hostPath string, pathConfigs []HostFimPathConfig, exporter exporters.Exporter) HostFimSensor
NewHostFimSensorFanotify creates a new fanotify-based FIM sensor
func NewHostFimSensorFanotifyWithBatching ¶
func NewHostFimSensorFanotifyWithBatching(hostPath string, pathConfigs []HostFimPathConfig, exporter exporters.Exporter, batchConfig HostFimBatchConfig) HostFimSensor
NewHostFimSensorFanotifyWithBatching creates a new fanotify-based FIM sensor with batching
func NewHostFimSensorFanotifyWithConfig ¶
func NewHostFimSensorFanotifyWithConfig(hostPath string, pathConfigs []HostFimPathConfig, exporter exporters.Exporter, batchConfig HostFimBatchConfig, dedupConfig HostFimDedupConfig) HostFimSensor
NewHostFimSensorFanotifyWithConfig creates a new fanotify-based FIM sensor with full configuration
func NewHostFimSensorPeriodic ¶
func NewHostFimSensorPeriodic(hostPath string, config HostFimConfig, exporter exporters.Exporter) HostFimSensor
NewHostFimSensorPeriodic creates a new periodic scanning FIM sensor
func NewHostFimSensorWithBackend ¶
func NewHostFimSensorWithBackend( hostPath string, config HostFimConfig, exporter exporters.Exporter, ) (HostFimSensor, error)
NewHostFimSensorWithBackend creates a FIM sensor with explicit backend selection
type HostFimSensorFanotify ¶
type HostFimSensorFanotify struct {
// contains filtered or unexported fields
}
HostFimSensorFanotify implements HostFimSensor using fanotify for subdirectory monitoring
func (*HostFimSensorFanotify) IsRunning ¶
func (h *HostFimSensorFanotify) IsRunning() bool
func (*HostFimSensorFanotify) Start ¶
func (h *HostFimSensorFanotify) Start() error
func (*HostFimSensorFanotify) Stop ¶
func (h *HostFimSensorFanotify) Stop()
type HostFimSensorPeriodic ¶
type HostFimSensorPeriodic struct {
// contains filtered or unexported fields
}
HostFimSensorPeriodic implements HostFimSensor using periodic scanning
func (*HostFimSensorPeriodic) GetLastScanTime ¶
func (h *HostFimSensorPeriodic) GetLastScanTime() time.Time
GetLastScanTime returns the time of the last successful scan
func (*HostFimSensorPeriodic) GetSnapshotStats ¶
func (h *HostFimSensorPeriodic) GetSnapshotStats() map[string]struct{ Current, Previous int }
GetSnapshotStats returns current snapshot statistics for all monitored directories
func (*HostFimSensorPeriodic) IsRunning ¶
func (h *HostFimSensorPeriodic) IsRunning() bool
IsRunning returns whether the sensor is currently running
func (*HostFimSensorPeriodic) Start ¶
func (h *HostFimSensorPeriodic) Start() error
Start starts the periodic scanning sensor
func (*HostFimSensorPeriodic) Stop ¶
func (h *HostFimSensorPeriodic) Stop()
Stop stops the periodic scanning sensor