Documentation
¶
Index ¶
- Constants
- func GetLocalRabbitMQCredentials(rabbitMQSalt string) (username, password string, err error)
- func Max(a, b int) int
- func Min(a, b int) int
- type CompressionType
- type Configuration
- func (config *Configuration) AMQPURL(censorPassword bool) string
- func (config Configuration) FileExtensionForCompressionType() string
- func (config *Configuration) GetAMQPTLSConfigFromConf() *tls.Config
- func (config *Configuration) MoveFileToDebug(name string)
- func (config *Configuration) ParseEventTypes(input *ini.File)
- func (config *Configuration) ParseOAuthConfiguration(input *ini.File, errs *ConfigurationError)
- func (config Configuration) WrapWriterWithCompressionSettings(writer io.WriteCloser) (FlushableWriteCloser, error)
- type ConfigurationError
- type FlushableWriteCloser
- type NOPFlushWrappedWriter
Constants ¶
View Source
const ( FileOutputType = iota S3OutputType OLDS3OutputType TCPOutputType UDPOutputType SyslogOutputType HTTPOutputType SplunkOutputType KafkaOutputType )
View Source
const ( LEEFOutputFormat = iota JSONOutputFormat )
View Source
const DEFAULTEXITTIMEOUT = 7
View Source
const DEFAULTLOGBACKUPS = 7
View Source
const DEFAULTLOGLOCATION = "/var/log/cb/integrations/cb-event-forwarder"
View Source
const DEFAULTLOGRETAINDAYS = 21
View Source
const DEFAULTLOGSIZE = 50
View Source
const MAXLOGBACKUPS = 30
View Source
const MAXLOGSIZE = 500
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CompressionType ¶
type CompressionType string
const ( LZ4COMPRESSION CompressionType = "LZ4" GZIPCOMPRESSION CompressionType = "GZIP" NOCOMPRESSION CompressionType = "NONE" )
func CompressionTypeFromString ¶
func CompressionTypeFromString(typeString string) (CompressionType, error)
type Configuration ¶
type Configuration struct {
ServerName string
AMQPHostname string
DebugFlag bool
DebugStore string
OutputType int
OutputFormat int
AMQPUsername string
AMQPPassword string
AMQPPort int
AMQPTLSEnabled bool
AMQPTLSClientKey string
AMQPTLSClientCert string
AMQPTLSCACert string
AMQPQueueName string
AMQPAutomaticAcking bool
OutputParameters string
EventTypes []string
EventMap map[string]bool
HTTPServerPort int
CbServerURL string
UseRawSensorExchange bool
// DRY RUN CONTROLS REAL OUTPUT - WHEN DRYRUN IS TRUE, REAL OUTPUT WILL NOT OCCUR
DryRun bool
// CannedInput bool CONTROLS REAL INPUT - WHEN CANNEDINPUT IS TRUE, bundles from stress_rabbit will be used instead
CannedInput bool
CannedInputLocation *string
// RunConsumer bool
// Controls whether or not a rabbitmq consumer is bound
RunConsumer bool
// this is a hack for S3 specific configuration
S3ServerSideEncryption *string
S3CredentialProfileName *string
S3ACLPolicy *string
S3ObjectPrefix *string
S3Endpoint *string
S3UseDualStack bool
S3Concurrency int
// SSL/TLS-specific configuration
TLSClientKey *string
TLSClientCert *string
TLSCACert *string
TLSVerify bool
TLSCName *string
TLS12Only bool
// HTTP-specific configuration
HTTPAuthorizationToken *string
HTTPPostTemplate *template.Template
HTTPContentType *string
OAuthJwtClientEmail string
OAuthJwtPrivateKey []byte
OAuthJwtPrivateKeyId string
OAuthJwtScopes []string
OAuthJwtTokenUrl string
EventTextAsJsonByteArray bool
CompressHTTPPayload bool
// configuration options common to bundled outputs (S3, HTTP)
UploadEmptyFiles bool
CommaSeparateEvents bool
BundleSendTimeout time.Duration
BundleSizeMax int64
// Compress data on S3 or file output types
FileHandlerCompressData bool
CompressionLevel int
CompressionType CompressionType
TLSConfig *tls.Config
// Kafka-specific configuration
KafkaBrokers *string
KafkaTopicSuffix string
KafkaTopic string
KafkaUsername string
KafkaPassword string
KafkaMaxRequestSize int32
KafkaCompressionType *string
KafkaSSLKeyLocation *string
KafkaSSLCertificateLocation *string
KafkaSSLCALocation *string
KafkaAlgorithm string
KafkaUseTLSTransport bool
// Splunkd
SplunkToken *string
RemoveFromOutput []string
AuditLog bool
NumProcessors int
UseTimeFloat bool
ExitTimeoutSeconds time.Duration
// graphite/carbon
RunMetrics bool
CarbonMetricsEndpoint *string
MetricTag string
//Logging
LogLevel log.Level
LogDir string
LogSizeMB int
LogBackups int
LogMaxAge int
}
func ParseConfig ¶
func ParseConfig(fn string, rabbitMQSalt string) (Configuration, error)
func (*Configuration) AMQPURL ¶
func (config *Configuration) AMQPURL(censorPassword bool) string
func (Configuration) FileExtensionForCompressionType ¶
func (config Configuration) FileExtensionForCompressionType() string
func (*Configuration) GetAMQPTLSConfigFromConf ¶
func (config *Configuration) GetAMQPTLSConfigFromConf() *tls.Config
func (*Configuration) MoveFileToDebug ¶
func (config *Configuration) MoveFileToDebug(name string)
func (*Configuration) ParseEventTypes ¶
func (config *Configuration) ParseEventTypes(input *ini.File)
func (*Configuration) ParseOAuthConfiguration ¶
func (config *Configuration) ParseOAuthConfiguration(input *ini.File, errs *ConfigurationError)
parseOAuthConfiguration parses OAuth related configuration from input and populates config with relevant fields.
func (Configuration) WrapWriterWithCompressionSettings ¶
func (config Configuration) WrapWriterWithCompressionSettings(writer io.WriteCloser) (FlushableWriteCloser, error)
type ConfigurationError ¶
func (ConfigurationError) Error ¶
func (e ConfigurationError) Error() string
type FlushableWriteCloser ¶
type NOPFlushWrappedWriter ¶
type NOPFlushWrappedWriter struct {
io.WriteCloser
}
func (NOPFlushWrappedWriter) Flush ¶
func (writer NOPFlushWrappedWriter) Flush() error
Click to show internal directories.
Click to hide internal directories.