Documentation
¶
Index ¶
- func ChangeIntegrationStatus(logTyp string, proto string, isEnabled bool) (string, error)
- func ChangePort(logTyp string, proto string, port string) (string, error)
- func ConfigureCollectorFirstTime() error
- func IsPortAvailable(port string, proto string, cnf *CollectorConfiguration, ...) bool
- func ModulesUp(h *logger.Logger)
- func ValidateChangeInPort(newPort string, dataType configuration.LogType) bool
- func WriteCollectorConfig(integrations map[string]Integration, filename string) error
- func WriteCollectorConfigFromModules(mod []Module, filename string) error
- type CollectorConfiguration
- type CollectorConfigurationOld
- type Integration
- type Module
- type NetflowModule
- func (m *NetflowModule) DisablePort(proto string)
- func (m *NetflowModule) EnablePort(proto string)
- func (m *NetflowModule) GetDataType() string
- func (m *NetflowModule) GetPort(proto string) string
- func (m *NetflowModule) IsPortListen(proto string) bool
- func (m *NetflowModule) SetNewPort(proto string, port string)
- type Port
- type ProtocolListenOld
- type SyslogModule
- func (m *SyslogModule) DisablePort(proto string)
- func (m *SyslogModule) EnablePort(proto string)
- func (m *SyslogModule) GetDataType() string
- func (m *SyslogModule) GetPort(proto string) string
- func (m *SyslogModule) IsPortListen(proto string) bool
- func (m *SyslogModule) SetNewPort(proto string, port string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeIntegrationStatus ¶
func ConfigureCollectorFirstTime ¶
func ConfigureCollectorFirstTime() error
func IsPortAvailable ¶
func IsPortAvailable(port string, proto string, cnf *CollectorConfiguration, currentIntegration string) bool
func ValidateChangeInPort ¶
func ValidateChangeInPort(newPort string, dataType configuration.LogType) bool
Return true if the port change is allowed
func WriteCollectorConfig ¶
func WriteCollectorConfig(integrations map[string]Integration, filename string) error
Types ¶
type CollectorConfiguration ¶
type CollectorConfiguration struct {
Integrations map[string]Integration `json:"integrations"`
}
func MigrateOldConfig ¶
func MigrateOldConfig(old CollectorConfigurationOld) CollectorConfiguration
func ReadCollectorConfig ¶
func ReadCollectorConfig() (CollectorConfiguration, error)
type CollectorConfigurationOld ¶
type CollectorConfigurationOld struct {
LogCollectorIsenabled bool `json:"log_collector_enabled"`
Integrations map[string]ProtocolListenOld `json:"integrations"`
}
type Integration ¶
type Module ¶
type NetflowModule ¶
type NetflowModule struct {
DataType string
Parser parser.Parser
Decoders map[string]*netflow.Decoder
Listener *net.UDPConn
CTX context.Context
Cancel context.CancelFunc
IsEnabled bool
// contains filtered or unexported fields
}
func GetNetflowModule ¶
func GetNetflowModule(h *logger.Logger) *NetflowModule
func (*NetflowModule) DisablePort ¶
func (m *NetflowModule) DisablePort(proto string)
func (*NetflowModule) EnablePort ¶
func (m *NetflowModule) EnablePort(proto string)
func (*NetflowModule) GetDataType ¶
func (m *NetflowModule) GetDataType() string
func (*NetflowModule) GetPort ¶
func (m *NetflowModule) GetPort(proto string) string
func (*NetflowModule) IsPortListen ¶
func (m *NetflowModule) IsPortListen(proto string) bool
func (*NetflowModule) SetNewPort ¶
func (m *NetflowModule) SetNewPort(proto string, port string)
type ProtocolListenOld ¶
type SyslogModule ¶
type SyslogModule struct {
DataType string
TCPListener listenerTCP
UDPListener listenerUDP
Parser parser.Parser
// contains filtered or unexported fields
}
func GetSyslogModule ¶
func GetSyslogModule(dataType string, protoPorts configuration.ProtoPort, h *logger.Logger) *SyslogModule
func (*SyslogModule) DisablePort ¶
func (m *SyslogModule) DisablePort(proto string)
func (*SyslogModule) EnablePort ¶
func (m *SyslogModule) EnablePort(proto string)
func (*SyslogModule) GetDataType ¶
func (m *SyslogModule) GetDataType() string
func (*SyslogModule) GetPort ¶
func (m *SyslogModule) GetPort(proto string) string
func (*SyslogModule) IsPortListen ¶
func (m *SyslogModule) IsPortListen(proto string) bool
func (*SyslogModule) SetNewPort ¶
func (m *SyslogModule) SetNewPort(proto string, port string)
Click to show internal directories.
Click to hide internal directories.