Documentation
¶
Index ¶
- func ChangeFileIntegrationStatus(logTyp string, isEnabled bool) ([]string, error)
- func ChangeIntegrationStatus(logTyp string, proto string, isEnabled bool, tlsOptions ...bool) (string, error)
- func CheckPortConfigured(port string, proto string, cnf *schema.CollectorConfig, ...) string
- func CheckPortConflict(port string, proto string, cnf *schema.CollectorConfig, ...) string
- func ConfigureFirstTime() error
- func DisableTLSForIntegration(logTyp string, proto string) error
- func EnableTLSForIntegration(logTyp string, proto string) (string, error)
- func GetFileIntegrationPaths(logTyp string) ([]string, error)
- func InstallAll() error
- func IsPortBindable(port string, proto string) bool
- func StartAll(ctx context.Context)
- func StopAll()
- func SyncCollectorConfig() error
- func UninstallAll() error
- type ChangeFilePathsResult
- type ChangePortResult
- type Collector
- type Installable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeFileIntegrationStatus ¶
ChangeFileIntegrationStatus enables or disables a file-based integration.
func ChangeIntegrationStatus ¶
func ChangeIntegrationStatus(logTyp string, proto string, isEnabled bool, tlsOptions ...bool) (string, error)
ChangeIntegrationStatus enables or disables an integration.
func CheckPortConfigured ¶
func CheckPortConfigured(port string, proto string, cnf *schema.CollectorConfig, currentIntegration string) string
CheckPortConfigured checks if a port is configured (but not necessarily enabled) by another integration. Returns the integration name if configured, empty string otherwise.
func CheckPortConflict ¶
func CheckPortConflict(port string, proto string, cnf *schema.CollectorConfig, currentIntegration string) string
CheckPortConflict checks if a port is in use by another enabled integration. Returns the integration name if there's a conflict, empty string otherwise.
func ConfigureFirstTime ¶
func ConfigureFirstTime() error
ConfigureFirstTime is an alias for SyncCollectorConfig for backward compatibility. Deprecated: Use SyncCollectorConfig instead.
func DisableTLSForIntegration ¶
DisableTLSForIntegration disables TLS for an integration.
func EnableTLSForIntegration ¶
EnableTLSForIntegration enables TLS for an integration.
func GetFileIntegrationPaths ¶
GetFileIntegrationPaths returns the configured paths for a file integration.
func InstallAll ¶
func InstallAll() error
InstallAll installs all platform collectors that implement Installable.
func IsPortBindable ¶
IsPortBindable checks if the system can bind to a port.
func StartAll ¶
StartAll starts all collectors: platform-specific, syslog and netflow. The context is used for graceful shutdown signaling.
func SyncCollectorConfig ¶
func SyncCollectorConfig() error
SyncCollectorConfig ensures the collector config file exists and is synchronized with the current ProtoPorts and FilePaths. It handles both initial creation and version upgrades: - If config doesn't exist → creates it with all integrations from ProtoPorts and FilePaths - If config exists → adds new integrations, removes obsolete ones
func UninstallAll ¶
func UninstallAll() error
UninstallAll uninstalls all platform collectors that implement Installable.
Types ¶
type ChangeFilePathsResult ¶
type ChangeFilePathsResult struct {
OldPaths []string
}
ChangeFilePathsResult contains the result of a path change operation.
func ChangeFilePaths ¶
func ChangeFilePaths(logTyp string, paths []string) (ChangeFilePathsResult, error)
ChangeFilePaths changes the paths for a file-based integration.
type ChangePortResult ¶
ChangePortResult contains the result of a port change operation.
func ChangePort ¶
func ChangePort(logTyp string, proto string, port string) (ChangePortResult, error)
ChangePort changes the port for an integration. Returns the old port and a warning if another integration has the same port configured.
type Collector ¶
type Collector interface {
Name() string
Start(ctx context.Context, queue chan *plugins.Log)
Stop()
}
Collector is the interface that every collector must implement.
type Installable ¶
Installable is an optional interface for collectors that install system services.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package auditd provides a native collector for Linux Audit Framework events.
|
Package auditd provides a native collector for Linux Audit Framework events. |
|
Package configwatcher provides a shared config file watcher using fsnotify.
|
Package configwatcher provides a shared config file watcher using fsnotify. |
|
Package schema defines shared configuration types for collector packages.
|
Package schema defines shared configuration types for collector packages. |