diff --git a/confgenerator/built-in-config-linux.yaml b/confgenerator/built-in-config-linux.yaml index 3be425f612..cd84fc39b6 100644 --- a/confgenerator/built-in-config-linux.yaml +++ b/confgenerator/built-in-config-linux.yaml @@ -8,8 +8,7 @@ logging: service: pipelines: default_pipeline: - receivers: - - syslog + receivers: [syslog] metrics: receivers: hostmetrics: @@ -22,7 +21,5 @@ metrics: service: pipelines: default_pipeline: - receivers: - - hostmetrics - processors: - - metrics_filter + receivers: [hostmetrics] + processors: [metrics_filter] diff --git a/confgenerator/built-in-config-windows.yaml b/confgenerator/built-in-config-windows.yaml index 8f5a495857..ddd74d9d93 100644 --- a/confgenerator/built-in-config-windows.yaml +++ b/confgenerator/built-in-config-windows.yaml @@ -2,15 +2,11 @@ logging: receivers: windows_event_log: type: windows_event_log - channels: - - System - - Application - - Security + channels: [System, Application, Security] service: pipelines: default_pipeline: - receivers: - - windows_event_log + receivers: [windows_event_log] metrics: receivers: hostmetrics: @@ -29,9 +25,5 @@ metrics: service: pipelines: default_pipeline: - receivers: - - hostmetrics - - iis - - mssql - processors: - - metrics_filter + receivers: [hostmetrics, iis, mssql] + processors: [metrics_filter] diff --git a/confgenerator/confgenerator.go b/confgenerator/confgenerator.go index f2485cb1f6..f7ba7e58ed 100644 --- a/confgenerator/confgenerator.go +++ b/confgenerator/confgenerator.go @@ -22,9 +22,9 @@ import ( "strings" "text/template" - "github.com/GoogleCloudPlatform/ops-agent/fluentbit/conf" + "github.com/GoogleCloudPlatform/ops-agent/confgenerator/fluentbit" + "github.com/GoogleCloudPlatform/ops-agent/confgenerator/otel" "github.com/GoogleCloudPlatform/ops-agent/internal/version" - "github.com/GoogleCloudPlatform/ops-agent/otel" "github.com/shirou/gopsutil/host" ) @@ -137,14 +137,14 @@ func generateOtelServices(receiverNameMap map[string]string, exporterNameMap map } // defaultTails returns the default Tail sections for the agents' own logs. -func defaultTails(logsDir string, stateDir string, hostInfo *host.InfoStat) (tails []*conf.Tail) { - tails = []*conf.Tail{} - tailFluentbit := conf.Tail{ +func defaultTails(logsDir string, stateDir string, hostInfo *host.InfoStat) (tails []*fluentbit.Tail) { + tails = []*fluentbit.Tail{} + tailFluentbit := fluentbit.Tail{ Tag: "ops-agent-fluent-bit", DB: filepathJoin(hostInfo.OS, stateDir, "buffers", "ops-agent-fluent-bit"), Path: filepathJoin(hostInfo.OS, logsDir, "logging-module.log"), } - tailCollectd := conf.Tail{ + tailCollectd := fluentbit.Tail{ Tag: "ops-agent-collectd", DB: filepathJoin(hostInfo.OS, stateDir, "buffers", "ops-agent-collectd"), Path: filepathJoin(hostInfo.OS, logsDir, "metrics-module.log"), @@ -158,8 +158,8 @@ func defaultTails(logsDir string, stateDir string, hostInfo *host.InfoStat) (tai } // defaultStackdriverOutputs returns the default Stackdriver sections for the agents' own logs. -func defaultStackdriverOutputs(hostInfo *host.InfoStat) (stackdrivers []*conf.Stackdriver) { - return []*conf.Stackdriver{ +func defaultStackdriverOutputs(hostInfo *host.InfoStat) (stackdrivers []*fluentbit.Stackdriver) { + return []*fluentbit.Stackdriver{ { Match: "ops-agent-fluent-bit|ops-agent-collectd", Workers: getWorkers(hostInfo), @@ -216,14 +216,14 @@ func (uc *UnifiedConfig) GenerateFluentBitConfigs(logsDir string, stateDir strin fbTails := defaultTails(logsDir, stateDir, hostInfo) userAgent, _ := getUserAgent("Google-Cloud-Ops-Agent-Logging", hostInfo) fbStackdrivers := defaultStackdriverOutputs(hostInfo) - fbSyslogs := []*conf.Syslog{} - fbWinEventlogs := []*conf.WindowsEventlog{} - fbFilterParserGroups := []conf.FilterParserGroup{} - fbFilterAddLogNames := []*conf.FilterModifyAddLogName{} - fbFilterRewriteTags := []*conf.FilterRewriteTag{} - fbFilterRemoveLogNames := []*conf.FilterModifyRemoveLogName{} - jsonParsers := []*conf.ParserJSON{} - regexParsers := []*conf.ParserRegex{} + fbSyslogs := []*fluentbit.Syslog{} + fbWinEventlogs := []*fluentbit.WindowsEventlog{} + fbFilterParserGroups := []fluentbit.FilterParserGroup{} + fbFilterAddLogNames := []*fluentbit.FilterModifyAddLogName{} + fbFilterRewriteTags := []*fluentbit.FilterRewriteTag{} + fbFilterRemoveLogNames := []*fluentbit.FilterModifyRemoveLogName{} + jsonParsers := []*fluentbit.ParserJSON{} + regexParsers := []*fluentbit.ParserRegex{} if logging != nil && logging.Service != nil { // Override any user-specified exporters @@ -237,7 +237,7 @@ func (uc *UnifiedConfig) GenerateFluentBitConfigs(logsDir string, stateDir strin p.ExporterIDs = []string{"google"} } - extractedTails := []*conf.Tail{} + extractedTails := []*fluentbit.Tail{} var err error extractedTails, fbSyslogs, fbWinEventlogs, err = generateFluentBitInputs(logging.Receivers, logging.Service.Pipelines, stateDir, hostInfo) if err != nil { @@ -248,7 +248,7 @@ func (uc *UnifiedConfig) GenerateFluentBitConfigs(logsDir string, stateDir strin if err != nil { return "", "", err } - extractedStackdrivers := []*conf.Stackdriver{} + extractedStackdrivers := []*fluentbit.Stackdriver{} fbFilterAddLogNames, fbFilterRewriteTags, fbFilterRemoveLogNames, extractedStackdrivers, err = extractExporterPlugins(logging.Exporters, logging.Service.Pipelines, hostInfo) if err != nil { return "", "", err @@ -259,11 +259,11 @@ func (uc *UnifiedConfig) GenerateFluentBitConfigs(logsDir string, stateDir strin return "", "", err } } - mainConfig, err := conf.GenerateFluentBitMainConfig(fbTails, fbSyslogs, fbWinEventlogs, fbFilterParserGroups, fbFilterAddLogNames, fbFilterRewriteTags, fbFilterRemoveLogNames, fbStackdrivers, userAgent) + mainConfig, err := fluentbit.GenerateFluentBitMainConfig(fbTails, fbSyslogs, fbWinEventlogs, fbFilterParserGroups, fbFilterAddLogNames, fbFilterRewriteTags, fbFilterRemoveLogNames, fbStackdrivers, userAgent) if err != nil { return "", "", err } - parserConfig, err := conf.GenerateFluentBitParserConfig(jsonParsers, regexParsers) + parserConfig, err := fluentbit.GenerateFluentBitParserConfig(jsonParsers, regexParsers) if err != nil { return "", "", err } @@ -468,10 +468,10 @@ func generateOtelProcessors(processors map[string]*MetricsProcessor, pipelines m return excludeMetricsList, processorNameMap, nil } -func generateFluentBitInputs(receivers map[string]*LoggingReceiver, pipelines map[string]*LoggingPipeline, stateDir string, hostInfo *host.InfoStat) ([]*conf.Tail, []*conf.Syslog, []*conf.WindowsEventlog, error) { - fbTails := []*conf.Tail{} - fbSyslogs := []*conf.Syslog{} - fbWinEventlogs := []*conf.WindowsEventlog{} +func generateFluentBitInputs(receivers map[string]*LoggingReceiver, pipelines map[string]*LoggingPipeline, stateDir string, hostInfo *host.InfoStat) ([]*fluentbit.Tail, []*fluentbit.Syslog, []*fluentbit.WindowsEventlog, error) { + fbTails := []*fluentbit.Tail{} + fbSyslogs := []*fluentbit.Syslog{} + fbWinEventlogs := []*fluentbit.WindowsEventlog{} fileReceiverFactories, syslogReceiverFactories, wineventlogReceiverFactories, err := extractReceiverFactories(receivers) if err != nil { return nil, nil, nil, err @@ -480,7 +480,7 @@ func generateFluentBitInputs(receivers map[string]*LoggingReceiver, pipelines ma p := pipelines[pID] for _, rID := range p.ReceiverIDs { if f, ok := fileReceiverFactories[rID]; ok { - fbTail := conf.Tail{ + fbTail := fluentbit.Tail{ Tag: fmt.Sprintf("%s.%s", pID, rID), DB: filepathJoin(hostInfo.OS, stateDir, "buffers", pID+"_"+rID), Path: strings.Join(f.IncludePaths, ","), @@ -492,7 +492,7 @@ func generateFluentBitInputs(receivers map[string]*LoggingReceiver, pipelines ma continue } if f, ok := syslogReceiverFactories[rID]; ok { - fbSyslog := conf.Syslog{ + fbSyslog := fluentbit.Syslog{ Tag: fmt.Sprintf("%s.%s", pID, rID), Listen: f.ListenHost, Mode: f.TransportProtocol, @@ -502,7 +502,7 @@ func generateFluentBitInputs(receivers map[string]*LoggingReceiver, pipelines ma continue } if f, ok := wineventlogReceiverFactories[rID]; ok { - fbWinlog := conf.WindowsEventlog{ + fbWinlog := fluentbit.WindowsEventlog{ Tag: fmt.Sprintf("%s.%s", pID, rID), Channels: strings.Join(f.Channels, ","), Interval_Sec: "1", @@ -516,17 +516,17 @@ func generateFluentBitInputs(receivers map[string]*LoggingReceiver, pipelines ma return fbTails, fbSyslogs, fbWinEventlogs, nil } -func generateFluentBitFilters(processors map[string]*LoggingProcessor, pipelines map[string]*LoggingPipeline) ([]conf.FilterParserGroup, error) { +func generateFluentBitFilters(processors map[string]*LoggingProcessor, pipelines map[string]*LoggingPipeline) ([]fluentbit.FilterParserGroup, error) { // Note: Keep each pipeline's filters in a separate group, because // the order within that group is important, even though the order // of the groups themselves does not matter. - groups := []conf.FilterParserGroup{} + groups := []fluentbit.FilterParserGroup{} for _, pID := range sortedKeys(pipelines) { - fbFilterParsers := []*conf.FilterParser{} + fbFilterParsers := []*fluentbit.FilterParser{} pipeline := pipelines[pID] for _, processorID := range pipeline.ProcessorIDs { p, ok := processors[processorID] - fbFilterParser := conf.FilterParser{ + fbFilterParser := fluentbit.FilterParser{ Match: fmt.Sprintf("%s.*", pID), Parser: processorID, KeyName: "message", @@ -544,26 +544,26 @@ func generateFluentBitFilters(processors map[string]*LoggingProcessor, pipelines } func extractExporterPlugins(exporters map[string]*LoggingExporter, pipelines map[string]*LoggingPipeline, hostInfo *host.InfoStat) ( - []*conf.FilterModifyAddLogName, []*conf.FilterRewriteTag, []*conf.FilterModifyRemoveLogName, []*conf.Stackdriver, error) { - fbFilterModifyAddLogNames := []*conf.FilterModifyAddLogName{} - fbFilterRewriteTags := []*conf.FilterRewriteTag{} - fbFilterModifyRemoveLogNames := []*conf.FilterModifyRemoveLogName{} - fbStackdrivers := []*conf.Stackdriver{} + []*fluentbit.FilterModifyAddLogName, []*fluentbit.FilterRewriteTag, []*fluentbit.FilterModifyRemoveLogName, []*fluentbit.Stackdriver, error) { + fbFilterModifyAddLogNames := []*fluentbit.FilterModifyAddLogName{} + fbFilterRewriteTags := []*fluentbit.FilterRewriteTag{} + fbFilterModifyRemoveLogNames := []*fluentbit.FilterModifyRemoveLogName{} + fbStackdrivers := []*fluentbit.Stackdriver{} stackdriverExporters := make(map[string][]string) for _, pID := range sortedKeys(pipelines) { pipeline := pipelines[pID] for _, exporterID := range pipeline.ExporterIDs { // for each receiver, generate a output plugin with the specified receiver id for _, rID := range pipeline.ReceiverIDs { - fbFilterModifyAddLogNames = append(fbFilterModifyAddLogNames, &conf.FilterModifyAddLogName{ + fbFilterModifyAddLogNames = append(fbFilterModifyAddLogNames, &fluentbit.FilterModifyAddLogName{ Match: fmt.Sprintf("%s.%s", pID, rID), LogName: rID, }) // generate single rewriteTag for this pipeline - fbFilterRewriteTags = append(fbFilterRewriteTags, &conf.FilterRewriteTag{ + fbFilterRewriteTags = append(fbFilterRewriteTags, &fluentbit.FilterRewriteTag{ Match: fmt.Sprintf("%s.%s", pID, rID), }) - fbFilterModifyRemoveLogNames = append(fbFilterModifyRemoveLogNames, &conf.FilterModifyRemoveLogName{ + fbFilterModifyRemoveLogNames = append(fbFilterModifyRemoveLogNames, &fluentbit.FilterModifyRemoveLogName{ Match: rID, }) stackdriverExporters[exporterID] = append(stackdriverExporters[exporterID], rID) @@ -571,7 +571,7 @@ func extractExporterPlugins(exporters map[string]*LoggingExporter, pipelines map } } for _, tags := range stackdriverExporters { - fbStackdrivers = append(fbStackdrivers, &conf.Stackdriver{ + fbStackdrivers = append(fbStackdrivers, &fluentbit.Stackdriver{ Match: strings.Join(tags, "|"), Workers: getWorkers(hostInfo), }) @@ -579,21 +579,21 @@ func extractExporterPlugins(exporters map[string]*LoggingExporter, pipelines map return fbFilterModifyAddLogNames, fbFilterRewriteTags, fbFilterModifyRemoveLogNames, fbStackdrivers, nil } -func extractFluentBitParsers(processors map[string]*LoggingProcessor) ([]*conf.ParserJSON, []*conf.ParserRegex, error) { - fbJSONParsers := []*conf.ParserJSON{} - fbRegexParsers := []*conf.ParserRegex{} +func extractFluentBitParsers(processors map[string]*LoggingProcessor) ([]*fluentbit.ParserJSON, []*fluentbit.ParserRegex, error) { + fbJSONParsers := []*fluentbit.ParserJSON{} + fbRegexParsers := []*fluentbit.ParserRegex{} for _, name := range sortedKeys(processors) { p := processors[name] switch t := p.Type; t { case "parse_json": - fbJSONParser := conf.ParserJSON{ + fbJSONParser := fluentbit.ParserJSON{ Name: name, TimeKey: p.TimeKey, TimeFormat: p.TimeFormat, } fbJSONParsers = append(fbJSONParsers, &fbJSONParser) case "parse_regex": - fbRegexParser := conf.ParserRegex{ + fbRegexParser := fluentbit.ParserRegex{ Name: name, Regex: p.Regex, TimeKey: p.TimeKey, diff --git a/confgenerator/confgenerator_test.go b/confgenerator/confgenerator_test.go index 65765385f1..d14b164fb1 100644 --- a/confgenerator/confgenerator_test.go +++ b/confgenerator/confgenerator_test.go @@ -202,15 +202,15 @@ func updateOrCompareGolden(t *testing.T, testName string, goos string, expectedB expected := strings.ReplaceAll(string(expectedBytes), "\r\n", "\n") actual = strings.ReplaceAll(actual, "\r\n", "\n") goldenPath := fmt.Sprintf(path, goos, testName) - if diff := cmp.Diff(actual, expected); diff != "" { + if diff := cmp.Diff(expected, actual); diff != "" { if *updateGolden { // Update the expected to match the actual. - t.Logf("Detected -update_golden flag. Rewriting the %q golden file to apply the following diff\n%s.", goldenPath, diff) + t.Logf("Detected -update_golden flag. Rewriting the %q golden file to apply the following diff\n%s.", goldenPath, cmp.Diff(actual, expected)) if err := ioutil.WriteFile(goldenPath, []byte(actual), 0644); err != nil { t.Fatalf("error updating golden file at %q : %s", goldenPath, err) } } else { - t.Errorf("test %q: golden file at %s mismatch (-got +want):\n%s", testName, goldenPath, diff) + t.Errorf("test %q: golden file at %s mismatch (-want +got):\n%s", testName, goldenPath, diff) } } } diff --git a/confgenerator/config.go b/confgenerator/config.go index 2471b82dd0..7f8a4cd62e 100644 --- a/confgenerator/config.go +++ b/confgenerator/config.go @@ -26,16 +26,6 @@ import ( yaml "gopkg.in/yaml.v2" ) -// TODO(lingshi): Figure out a cleaner way to do "required" validation. -// The "omitempty" annotation is reserved to make YAML marshal/unmarshal results reasonable. -var requiredFields = []string{ - "channels", - "include_paths", - "listen_host", - "listen_port", - "regex", -} - // Ops Agent config. type UnifiedConfig struct { Logging *Logging `yaml:"logging"` @@ -83,7 +73,7 @@ func ParseUnifiedConfigAndValidate(input []byte, platform string) (UnifiedConfig } type configComponent struct { - Type string `yaml:"type"` + Type string `yaml:"type" validate:"required"` } // Ops Agent logging config. @@ -95,18 +85,18 @@ type Logging struct { } type LoggingReceiverFiles struct { - IncludePaths []string `yaml:"include_paths,omitempty"` - ExcludePaths []string `yaml:"exclude_paths,omitempty"` // optional + IncludePaths []string `yaml:"include_paths,omitempty" validate:"required"` + ExcludePaths []string `yaml:"exclude_paths,omitempty"` } type LoggingReceiverSyslog struct { TransportProtocol string `yaml:"transport_protocol,omitempty"` // one of "tcp" or "udp" - ListenHost string `yaml:"listen_host,omitempty"` - ListenPort uint16 `yaml:"listen_port,omitempty"` + ListenHost string `yaml:"listen_host,omitempty" validate:"required"` + ListenPort uint16 `yaml:"listen_port,omitempty" validate:"required"` } type LoggingReceiverWinevtlog struct { - Channels []string `yaml:"channels,omitempty"` + Channels []string `yaml:"channels,omitempty,flow" validate:"required"` } type LoggingReceiver struct { @@ -118,13 +108,13 @@ type LoggingReceiver struct { } type LoggingProcessorParseJson struct { - Field string `yaml:"field,omitempty"` // optional, default to "message" - TimeKey string `yaml:"time_key,omitempty"` // optional, by default does not parse timestamp - TimeFormat string `yaml:"time_format,omitempty"` // optional, must be provided if time_key is present + Field string `yaml:"field,omitempty"` // default to "message" + TimeKey string `yaml:"time_key,omitempty"` // by default does not parse timestamp + TimeFormat string `yaml:"time_format,omitempty"` // must be provided if time_key is present } type LoggingProcessorParseRegex struct { - Regex string `yaml:"regex,omitempty"` + Regex string `yaml:"regex,omitempty" validate:"required"` LoggingProcessorParseJson `yaml:",inline"` // Type "parse_json" } @@ -144,9 +134,9 @@ type LoggingService struct { } type LoggingPipeline struct { - ReceiverIDs []string `yaml:"receivers,omitempty"` - ProcessorIDs []string `yaml:"processors,omitempty"` - ExporterIDs []string `yaml:"exporters,omitempty"` + ReceiverIDs []string `yaml:"receivers,omitempty,flow"` + ProcessorIDs []string `yaml:"processors,omitempty,flow"` + ExporterIDs []string `yaml:"exporters,omitempty,flow"` } // Ops Agent metrics config. @@ -160,11 +150,11 @@ type Metrics struct { type MetricsReceiver struct { configComponent `yaml:",inline"` - CollectionInterval string `yaml:"collection_interval"` // time.Duration format + CollectionInterval string `yaml:"collection_interval" validate:"required"` // time.Duration format } type MetricsProcessorExcludeMetrics struct { - MetricsPattern []string `yaml:"metrics_pattern"` + MetricsPattern []string `yaml:"metrics_pattern,flow" validate:"required"` } type MetricsProcessor struct { @@ -182,9 +172,9 @@ type MetricsService struct { } type MetricsPipeline struct { - ReceiverIDs []string `yaml:"receivers"` - ProcessorIDs []string `yaml:"processors"` - ExporterIDs []string `yaml:"exporters,omitempty"` + ReceiverIDs []string `yaml:"receivers,flow"` + ProcessorIDs []string `yaml:"processors,flow"` + ExporterIDs []string `yaml:"exporters,omitempty,flow"` } func (uc *UnifiedConfig) Validate(platform string) error { @@ -210,7 +200,7 @@ func (l *Logging) Validate(platform string) error { return err } if len(l.Exporters) > 0 { - log.Print(`The "metrics.exporters" field is no longer needed and will be ignored. This does not change any functionality. Please remove it from your configuration.`) + log.Print(`The "logging.exporters" field is no longer needed and will be ignored. This does not change any functionality. Please remove it from your configuration.`) } for id, r := range l.Receivers { if err := r.ValidateType(subagent, "receiver", id, platform); err != nil { @@ -318,7 +308,7 @@ func (m *Metrics) Validate(platform string) error { return err } if len(p.ExporterIDs) > 0 { - log.Printf(`The "logging.service.pipelines.%s.exporters" field is deprecated and will be ignored. Please remove it from your configuration.`, id) + log.Printf(`The "metrics.service.pipelines.%s.exporters" field is deprecated and will be ignored. Please remove it from your configuration.`, id) } } return nil @@ -333,31 +323,31 @@ func sliceContains(slice []string, value string) bool { return false } -func (c *configComponent) ValidateType(subagent string, component string, id string, platform string) error { - supportedTypes := supportedComponentTypes[platform+"_"+subagent+"_"+component] +func (c *configComponent) ValidateType(subagent string, kind string, id string, platform string) error { + supportedTypes := supportedComponentTypes[platform+"_"+subagent+"_"+kind] if !sliceContains(supportedTypes, c.Type) { // e.g. metrics receiver "receiver_1" with type "unsupported_type" is not supported. // Supported metrics receiver types: [hostmetrics, iis, mssql]. return fmt.Errorf(`%s %s %q with type %q is not supported. Supported %s %s types: [%s].`, - subagent, component, id, c.Type, subagent, component, strings.Join(supportedTypes, ", ")) + subagent, kind, id, c.Type, subagent, kind, strings.Join(supportedTypes, ", ")) } return nil } -func (r *LoggingReceiver) ValidateParameters(subagent string, component string, id string) error { - return validateParameters(*r, subagent, component, id, r.Type) +func (r *LoggingReceiver) ValidateParameters(subagent string, kind string, id string) error { + return validateParameters(*r, subagent, kind, id, r.Type) } -func (p *LoggingProcessor) ValidateParameters(subagent string, component string, id string) error { - return validateParameters(*p, subagent, component, id, p.Type) +func (p *LoggingProcessor) ValidateParameters(subagent string, kind string, id string) error { + return validateParameters(*p, subagent, kind, id, p.Type) } -func (r *MetricsReceiver) ValidateParameters(subagent string, component string, id string) error { - return validateParameters(*r, subagent, component, id, r.Type) +func (r *MetricsReceiver) ValidateParameters(subagent string, kind string, id string) error { + return validateParameters(*r, subagent, kind, id, r.Type) } -func (p *MetricsProcessor) ValidateParameters(subagent string, component string, id string) error { - return validateParameters(*p, subagent, component, id, p.Type) +func (p *MetricsProcessor) ValidateParameters(subagent string, kind string, id string) error { + return validateParameters(*p, subagent, kind, id, p.Type) } type yamlField struct { @@ -395,9 +385,11 @@ func collectYamlFields(s interface{}) []yamlField { // Expand inline structs. parameters = append(parameters, recurse(v)...) } else if f.PkgPath == "" { // skip private non-struct fields + t, _ := f.Tag.Lookup("validate") + validation := strings.Split(t, ",") parameters = append(parameters, yamlField{ Name: n, - Required: sliceContains(requiredFields, n), + Required: sliceContains(validation, "required"), Value: v.Interface(), IsZero: v.IsZero(), }) @@ -408,7 +400,7 @@ func collectYamlFields(s interface{}) []yamlField { return recurse(reflect.ValueOf(s)) } -func validateParameters(s interface{}, subagent string, component string, id string, componentType string) error { +func validateParameters(s interface{}, subagent string, kind string, id string, componentType string) error { supportedParameters := supportedParameters[componentType] // Include type when checking. allParameters := []string{"type"} @@ -421,20 +413,20 @@ func validateParameters(s interface{}, subagent string, component string, id str // e.g. parameter "transport_protocol" in "files" type logging receiver "receiver_1" is not supported. // Supported parameters: [include_paths, exclude_paths]. return fmt.Errorf(`%s is not supported. Supported parameters: [%s].`, - parameterErrorPrefix(subagent, component, id, componentType, p.Name), strings.Join(supportedParameters, ", ")) + parameterErrorPrefix(subagent, kind, id, componentType, p.Name), strings.Join(supportedParameters, ", ")) } continue } if p.IsZero && p.Required { // e.g. parameter "include_paths" in "files" type logging receiver "receiver_1" is required. - return fmt.Errorf(`%s is required.`, parameterErrorPrefix(subagent, component, id, componentType, p.Name)) + return fmt.Errorf(`%s is required.`, parameterErrorPrefix(subagent, kind, id, componentType, p.Name)) } if hasAdditionalValidation { if f, ok := additionalValidation[p.Name]; ok { if err := f(p.Value); err != nil { // e.g. parameter "collection_interval" in "hostmetrics" type metrics receiver "receiver_1" // has invalid value "1s": below the minimum threshold of "10s". - return fmt.Errorf(`%s has invalid value %q: %s`, parameterErrorPrefix(subagent, component, id, componentType, p.Name), p.Value, err) + return fmt.Errorf(`%s has invalid value %q: %s`, parameterErrorPrefix(subagent, kind, id, componentType, p.Name), p.Value, err) } } } @@ -598,26 +590,26 @@ func findInvalid(actual []string, allowed map[string]bool) []string { return invalid } -func validateComponentIds(components interface{}, subagent string, component string) error { +func validateComponentIds(components interface{}, subagent string, kind string) error { for _, id := range sortedKeys(components) { if strings.HasPrefix(id, "lib:") { // e.g. logging receiver id "lib:abc" is not allowed because prefix 'lib:' is reserved for pre-defined receivers. return fmt.Errorf(`%s %s id %q is not allowed because prefix 'lib:' is reserved for pre-defined %ss.`, - subagent, component, id, component) + subagent, kind, id, kind) } } return nil } -func validateComponentKeys(components interface{}, refs []string, subagent string, component string, pipeline string) error { +func validateComponentKeys(components interface{}, refs []string, subagent string, kind string, pipeline string) error { invalid := findInvalid(refs, mapKeys(components)) if len(invalid) > 0 { - return fmt.Errorf("%s %s %q from pipeline %q is not defined.", subagent, component, invalid[0], pipeline) + return fmt.Errorf("%s %s %q from pipeline %q is not defined.", subagent, kind, invalid[0], pipeline) } return nil } -func validateComponentTypeCounts(components interface{}, refs []string, subagent string, component string) error { +func validateComponentTypeCounts(components interface{}, refs []string, subagent string, kind string) error { r := map[string]int{} cm := reflect.ValueOf(components) for _, id := range refs { @@ -633,9 +625,9 @@ func validateComponentTypeCounts(components interface{}, refs []string, subagent } if limit, ok := componentTypeLimits[t]; ok && r[t] > limit { if limit == 1 { - return fmt.Errorf("at most one %s %s with type %q is allowed.", subagent, component, t) + return fmt.Errorf("at most one %s %s with type %q is allowed.", subagent, kind, t) } - return fmt.Errorf("at most %d %s %ss with type %q are allowed.", limit, subagent, component, t) + return fmt.Errorf("at most %d %s %ss with type %q are allowed.", limit, subagent, kind, t) } } return nil @@ -645,6 +637,6 @@ func validateComponentTypeCounts(components interface{}, refs []string, subagent // id is the id of the receiver, processor, or exporter. // componentType is the type of the receiver, processor, or exporter, e.g., "hostmetrics". // parameter is name of the parameter. -func parameterErrorPrefix(subagent string, component string, id string, componentType string, parameter string) string { - return fmt.Sprintf(`parameter %q in %q type %s %s %q`, parameter, componentType, subagent, component, id) +func parameterErrorPrefix(subagent string, kind string, id string, componentType string, parameter string) string { + return fmt.Sprintf(`parameter %q in %q type %s %s %q`, parameter, componentType, subagent, kind, id) } diff --git a/fluentbit/conf/conf.go b/confgenerator/fluentbit/conf.go similarity index 99% rename from fluentbit/conf/conf.go rename to confgenerator/fluentbit/conf.go index 9a96202a65..174ba9cb00 100644 --- a/fluentbit/conf/conf.go +++ b/confgenerator/fluentbit/conf.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package conf provides data structures to represent and generate fluentBit configuration. -package conf +// Package fluentbit provides data structures to represent and generate fluentBit configuration. +package fluentbit import ( "fmt" @@ -194,9 +194,9 @@ const ( tailConf = `[INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB {{.DB}} - Path {{.Path}} Tag {{.Tag}} + Path {{.Path}} + DB {{.DB}} Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -227,9 +227,9 @@ const ( syslogConf = `[INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/syslog Name syslog + Tag {{.Tag}} Mode {{.Mode}} Listen {{.Listen}} - Tag {{.Tag}} Port {{.Port}} Parser lib:default_message_parser @@ -246,8 +246,8 @@ const ( wineventlogConf = `[INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/windows-event-log - Tag {{.Tag}} Name winlog + Tag {{.Tag}} Channels {{.Channels}} Interval_Sec 1 DB {{.DB}}` @@ -255,12 +255,12 @@ const ( stackdriverConf = `[OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^({{.Match}})$ resource gce_instance stackdriver_agent {{.UserAgent}} {{- if .Workers}} workers {{.Workers}} {{- end}} - Match_Regex ^({{.Match}})$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/fluentbit/conf/conf_test.go b/confgenerator/fluentbit/conf_test.go similarity index 98% rename from fluentbit/conf/conf_test.go rename to confgenerator/fluentbit/conf_test.go index 4b8281fab2..97cc81dc74 100644 --- a/fluentbit/conf/conf_test.go +++ b/confgenerator/fluentbit/conf_test.go @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -package conf +package fluentbit import ( "testing" - "github.com/kylelemons/godebug/diff" + "github.com/google/go-cmp/cmp" ) func TestFilterParser(t *testing.T) { @@ -36,7 +36,7 @@ func TestFilterParser(t *testing.T) { t.Errorf("got error: %v, want no error", err) return } - if diff := diff.Diff(want, got); diff != "" { + if diff := cmp.Diff(want, got); diff != "" { t.Errorf("FilterParser %v: FilterParser.renderConfig() returned unexpected diff (-want +got):\n%s", want, diff) } } @@ -89,7 +89,7 @@ func TestFilterRewriteTag(t *testing.T) { t.Errorf("got error: %v, want no error", err) return } - if diff := diff.Diff(want, got); diff != "" { + if diff := cmp.Diff(want, got); diff != "" { t.Errorf("FilterRewriteTag %v: FilterRewriteTag.renderConfig() returned unexpected diff (-want +got):\n%s", want, diff) } } @@ -145,7 +145,7 @@ func TestParserJSON(t *testing.T) { t.Errorf("got error: %v, want no error", err) return } - if diff := diff.Diff(tc.expectedTailConfig, got); diff != "" { + if diff := cmp.Diff(tc.expectedTailConfig, got); diff != "" { t.Errorf("ParserJSON %v: ParserJSON.renderConfig() returned unexpected diff (-want +got):\n%s", tc.parserJSON, diff) } } @@ -243,7 +243,7 @@ func TestParserRegex(t *testing.T) { return } - if diff := diff.Diff(tc.expectedTailConfig, got); diff != "" { + if diff := cmp.Diff(tc.expectedTailConfig, got); diff != "" { t.Errorf("ParserRegex %v: ParserRegex.renderConfig() returned unexpected diff (-want +got):\n%s", tc.parserRegex, diff) } } @@ -296,9 +296,9 @@ func TestTail(t *testing.T) { expectedTailConfig: `[INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB test_db - Path test_path Tag test_tag + Path test_path + DB test_db Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -332,9 +332,9 @@ func TestTail(t *testing.T) { expectedTailConfig: `[INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB test_db - Path test_path Tag test_tag + Path test_path + DB test_db Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -370,9 +370,9 @@ func TestTail(t *testing.T) { expectedTailConfig: `[INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB test_db - Path test_path Tag test_tag + Path test_path + DB test_db Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -405,7 +405,7 @@ func TestTail(t *testing.T) { t.Errorf("got error: %v, want no error", err) return } - if diff := diff.Diff(tc.expectedTailConfig, got); diff != "" { + if diff := cmp.Diff(tc.expectedTailConfig, got); diff != "" { t.Errorf("Tail %v: ran Tail.renderConfig() returned unexpected diff (-want +got):\n%s", tc.tail, diff) } } @@ -456,9 +456,9 @@ func TestSyslog(t *testing.T) { expectedSyslogConfig: `[INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/syslog Name syslog + Tag test_tag Mode tcp Listen 0.0.0.0 - Tag test_tag Port 1234 Parser lib:default_message_parser @@ -480,7 +480,7 @@ func TestSyslog(t *testing.T) { t.Errorf("got error: %v, want no error", err) return } - if diff := diff.Diff(tc.expectedSyslogConfig, got); diff != "" { + if diff := cmp.Diff(tc.expectedSyslogConfig, got); diff != "" { t.Errorf("Tail %v: ran syslog.renderConfig() returned unexpected diff (-want +got):\n%s", tc.syslog, diff) } } @@ -547,8 +547,8 @@ func TestWinlog(t *testing.T) { }, expectedWinlogConfig: `[INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/windows-event-log - Tag windows_event_log Name winlog + Tag windows_event_log Channels System,Application,Security Interval_Sec 1 DB test_DB`, @@ -560,7 +560,7 @@ func TestWinlog(t *testing.T) { t.Errorf("got error: %v, want no error", err) return } - if diff := diff.Diff(tc.expectedWinlogConfig, got); diff != "" { + if diff := cmp.Diff(tc.expectedWinlogConfig, got); diff != "" { t.Errorf("Tail %v: ran wineventlog.renderConfig() returned unexpected diff (-want +got):\n%s", tc.wineventlog, diff) } } @@ -606,10 +606,10 @@ func TestStackdriver(t *testing.T) { want := `[OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(test_match)$ resource gce_instance stackdriver_agent user_agent workers 8 - Match_Regex ^(test_match)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -625,7 +625,7 @@ func TestStackdriver(t *testing.T) { t.Errorf("got error: %v, want no error", err) return } - if diff := diff.Diff(want, got); diff != "" { + if diff := cmp.Diff(want, got); diff != "" { t.Errorf("Stackdriver %v: Stackdriver.renderConfig() returned unexpected diff (-want +got):\n%s", want, diff) } } @@ -731,9 +731,9 @@ func TestGenerateFluentBitMainConfig(t *testing.T) { [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB test_db1 - Path test_path1 Tag test_tag1 + Path test_path1 + DB test_db1 Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -760,9 +760,9 @@ func TestGenerateFluentBitMainConfig(t *testing.T) { [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB test_db2 - Path test_path2 Tag test_tag2 + Path test_path2 + DB test_db2 Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -789,9 +789,9 @@ func TestGenerateFluentBitMainConfig(t *testing.T) { [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/syslog Name syslog + Tag test_tag1 Mode tcp Listen 0.0.0.0 - Tag test_tag1 Port 1234 Parser lib:default_message_parser @@ -809,9 +809,9 @@ func TestGenerateFluentBitMainConfig(t *testing.T) { [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/syslog Name syslog + Tag test_tag2 Mode udp Listen 0.0.0.0 - Tag test_tag2 Port 5678 Parser lib:default_message_parser @@ -835,7 +835,7 @@ func TestGenerateFluentBitMainConfig(t *testing.T) { t.Errorf("got error: %v, want no error", err) return } - if diff := diff.Diff(tc.want, got); diff != "" { + if diff := cmp.Diff(tc.want, got); diff != "" { t.Errorf("test %q: ran GenerateFluentBitMainConfig returned unexpected diff (-want +got):\n%s", tc.name, diff) } } @@ -934,9 +934,9 @@ func TestGenerateFluentBitMainConfigWindows(t *testing.T) { [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB test_db1 - Path test_path1 Tag test_tag1 + Path test_path1 + DB test_db1 Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -963,9 +963,9 @@ func TestGenerateFluentBitMainConfigWindows(t *testing.T) { [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB test_db2 - Path test_path2 Tag test_tag2 + Path test_path2 + DB test_db2 Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -991,16 +991,16 @@ func TestGenerateFluentBitMainConfigWindows(t *testing.T) { [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/windows-event-log - Tag win_tag1 Name winlog + Tag win_tag1 Channels chl1 Interval_Sec 1 DB test_DB1 [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/windows-event-log - Tag win_tag2 Name winlog + Tag win_tag2 Channels chl2 Interval_Sec 1 DB test_DB2 @@ -1014,7 +1014,7 @@ func TestGenerateFluentBitMainConfigWindows(t *testing.T) { t.Errorf("got error: %v, want no error", err) return } - if diff := diff.Diff(tc.want, got); diff != "" { + if diff := cmp.Diff(tc.want, got); diff != "" { t.Errorf("test %q: ran GenerateFluentBitMainConfig returned unexpected diff (-want +got):\n%s", tc.name, diff) } } @@ -1186,7 +1186,7 @@ func TestGenerateFluentBitParserConfig(t *testing.T) { t.Errorf("test %q got error: %v, want no error", tc.name, err) return } - if diff := diff.Diff(tc.want, got); diff != "" { + if diff := cmp.Diff(tc.want, got); diff != "" { t.Errorf("test %q: ran GenerateFluentBitParserConfig returned unexpected diff (-want +got):\n%s", tc.name, diff) } } diff --git a/otel/conf.go b/confgenerator/otel/conf.go similarity index 100% rename from otel/conf.go rename to confgenerator/otel/conf.go diff --git a/otel/conf_test.go b/confgenerator/otel/conf_test.go similarity index 96% rename from otel/conf_test.go rename to confgenerator/otel/conf_test.go index 9caa2ac366..d566c07d1f 100644 --- a/otel/conf_test.go +++ b/confgenerator/otel/conf_test.go @@ -1,3 +1,17 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package otel import ( @@ -5,7 +19,7 @@ import ( "strings" "testing" - "github.com/kylelemons/godebug/diff" + "github.com/google/go-cmp/cmp" ) func TestSection(t *testing.T) { @@ -112,7 +126,7 @@ func TestSection(t *testing.T) { t.Errorf("got error: %v, want no error", err) return } - if diff := diff.Diff(tc.want, got); diff != "" { + if diff := cmp.Diff(tc.want, got); diff != "" { t.Errorf("service.renderConfig() returned unexpected diff (-want +got):\n%s", diff) } } else { @@ -714,8 +728,8 @@ service: t.Errorf("got error: %v, want no error", err) return } - if diff := diff.Diff(got, tc.want); diff != "" { - t.Errorf("test %q: ran GenerateOtelConfig returned unexpected diff (-got +want):\n%s", tc.name, diff) + if diff := cmp.Diff(tc.want, got); diff != "" { + t.Errorf("test %q: ran GenerateOtelConfig returned unexpected diff (-want +got):\n%s", tc.name, diff) } }) } diff --git a/confgenerator/testdata/invalid/linux/logging-receiver_files_type_invalid_parameter_include_paths_is_empty_string/input.yaml b/confgenerator/testdata/invalid/linux/logging-receiver_files_type_invalid_parameter_include_paths_is_empty_string/input.yaml index 22eef91cb3..ab98b92fe3 100644 --- a/confgenerator/testdata/invalid/linux/logging-receiver_files_type_invalid_parameter_include_paths_is_empty_string/input.yaml +++ b/confgenerator/testdata/invalid/linux/logging-receiver_files_type_invalid_parameter_include_paths_is_empty_string/input.yaml @@ -3,8 +3,6 @@ logging: receiver_1: type: files include_paths: "" - google: - type: google_cloud_logging service: pipelines: test_pipeline: diff --git a/confgenerator/testdata/invalid/linux/logging-receiver_invalid_type_windows_event_log/golden_error b/confgenerator/testdata/invalid/linux/logging-receiver_invalid_type_windows_event_log/golden_error new file mode 100644 index 0000000000..518f7d7ced --- /dev/null +++ b/confgenerator/testdata/invalid/linux/logging-receiver_invalid_type_windows_event_log/golden_error @@ -0,0 +1 @@ +logging receiver "receiver_1" with type "windows_event_log" is not supported. Supported logging receiver types: [files, syslog]. \ No newline at end of file diff --git a/confgenerator/testdata/invalid/linux/logging-receiver_invalid_type_windows_event_log/input.yaml b/confgenerator/testdata/invalid/linux/logging-receiver_invalid_type_windows_event_log/input.yaml new file mode 100644 index 0000000000..b09fa0e6d9 --- /dev/null +++ b/confgenerator/testdata/invalid/linux/logging-receiver_invalid_type_windows_event_log/input.yaml @@ -0,0 +1,9 @@ +logging: + receivers: + receiver_1: + type: windows_event_log + channels: [System,Application,Security] + service: + pipelines: + default_pipeline: + receivers: [receiver_1] diff --git a/confgenerator/testdata/invalid/linux/logging-receiver_syslog_type_unsupported_parameter_random/golden_error b/confgenerator/testdata/invalid/linux/logging-receiver_syslog_type_unsupported_parameter_random/golden_error index 92721f642d..796893bbe3 100644 --- a/confgenerator/testdata/invalid/linux/logging-receiver_syslog_type_unsupported_parameter_random/golden_error +++ b/confgenerator/testdata/invalid/linux/logging-receiver_syslog_type_unsupported_parameter_random/golden_error @@ -1,2 +1,2 @@ the agent config file is not valid YAML. detailed error: yaml: unmarshal errors: - line 8: field unsupported_paramater not found in type confgenerator.LoggingReceiver \ No newline at end of file + line 8: field unsupported_parameter not found in type confgenerator.LoggingReceiver \ No newline at end of file diff --git a/confgenerator/testdata/invalid/linux/logging-receiver_syslog_type_unsupported_parameter_random/input.yaml b/confgenerator/testdata/invalid/linux/logging-receiver_syslog_type_unsupported_parameter_random/input.yaml index 798be75e79..ff927d3a63 100644 --- a/confgenerator/testdata/invalid/linux/logging-receiver_syslog_type_unsupported_parameter_random/input.yaml +++ b/confgenerator/testdata/invalid/linux/logging-receiver_syslog_type_unsupported_parameter_random/input.yaml @@ -5,7 +5,7 @@ logging: listen_host: 1.1.1.1 listen_port: 1111 transport_protocol: tcp - unsupported_paramater: value_1 + unsupported_parameter: value_1 service: pipelines: default_pipeline: diff --git a/confgenerator/testdata/invalid/linux/metrics-receiver_invalid_type_iis/golden_error b/confgenerator/testdata/invalid/linux/metrics-receiver_invalid_type_iis/golden_error new file mode 100644 index 0000000000..7b451cbbf2 --- /dev/null +++ b/confgenerator/testdata/invalid/linux/metrics-receiver_invalid_type_iis/golden_error @@ -0,0 +1 @@ +metrics receiver "receiver_1" with type "iis" is not supported. Supported metrics receiver types: [hostmetrics]. \ No newline at end of file diff --git a/confgenerator/testdata/invalid/linux/metrics-receiver_invalid_type_iis/input.yaml b/confgenerator/testdata/invalid/linux/metrics-receiver_invalid_type_iis/input.yaml new file mode 100644 index 0000000000..345e0423ca --- /dev/null +++ b/confgenerator/testdata/invalid/linux/metrics-receiver_invalid_type_iis/input.yaml @@ -0,0 +1,9 @@ +metrics: + receivers: + receiver_1: + type: iis + collection_interval: 60s + service: + pipelines: + custom_pipeline: + receivers: [receiver_1] diff --git a/confgenerator/testdata/invalid/linux/metrics-receiver_invalid_type_mssql/golden_error b/confgenerator/testdata/invalid/linux/metrics-receiver_invalid_type_mssql/golden_error new file mode 100644 index 0000000000..eb15fac5c5 --- /dev/null +++ b/confgenerator/testdata/invalid/linux/metrics-receiver_invalid_type_mssql/golden_error @@ -0,0 +1 @@ +metrics receiver "receiver_1" with type "mssql" is not supported. Supported metrics receiver types: [hostmetrics]. \ No newline at end of file diff --git a/confgenerator/testdata/invalid/linux/metrics-receiver_invalid_type_mssql/input.yaml b/confgenerator/testdata/invalid/linux/metrics-receiver_invalid_type_mssql/input.yaml new file mode 100644 index 0000000000..355f9d85df --- /dev/null +++ b/confgenerator/testdata/invalid/linux/metrics-receiver_invalid_type_mssql/input.yaml @@ -0,0 +1,9 @@ +metrics: + receivers: + receiver_1: + type: mssql + collection_interval: 60s + service: + pipelines: + custom_pipeline: + receivers: [receiver_1] diff --git a/confgenerator/testdata/valid/linux/all-backward_compatible_with_explicit_exporters/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/all-backward_compatible_with_explicit_exporters/golden_fluent_bit_main.conf index 3ab99ae576..075a5896ce 100644 --- a/confgenerator/testdata/valid/linux/all-backward_compatible_with_explicit_exporters/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/all-backward_compatible_with_explicit_exporters/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/default_pipeline_syslog - Path /var/log/messages,/var/log/syslog Tag default_pipeline.syslog + Path /var/log/messages,/var/log/syslog + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/default_pipeline_syslog Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -59,9 +59,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd - Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log Tag ops-agent-collectd + Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -88,9 +88,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit - Path /var/log/google-cloud-ops-agent/subagents/logging-module.log Tag ops-agent-fluent-bit + Path /var/log/google-cloud-ops-agent/subagents/logging-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -134,10 +134,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -152,10 +152,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(syslog)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(syslog)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/linux/all-built_in_config/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/all-built_in_config/golden_fluent_bit_main.conf index 3ab99ae576..075a5896ce 100644 --- a/confgenerator/testdata/valid/linux/all-built_in_config/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/all-built_in_config/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/default_pipeline_syslog - Path /var/log/messages,/var/log/syslog Tag default_pipeline.syslog + Path /var/log/messages,/var/log/syslog + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/default_pipeline_syslog Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -59,9 +59,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd - Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log Tag ops-agent-collectd + Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -88,9 +88,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit - Path /var/log/google-cloud-ops-agent/subagents/logging-module.log Tag ops-agent-fluent-bit + Path /var/log/google-cloud-ops-agent/subagents/logging-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -134,10 +134,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -152,10 +152,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(syslog)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(syslog)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/linux/all-user_config_file_deleted/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/all-user_config_file_deleted/golden_fluent_bit_main.conf index 3ab99ae576..075a5896ce 100644 --- a/confgenerator/testdata/valid/linux/all-user_config_file_deleted/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/all-user_config_file_deleted/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/default_pipeline_syslog - Path /var/log/messages,/var/log/syslog Tag default_pipeline.syslog + Path /var/log/messages,/var/log/syslog + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/default_pipeline_syslog Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -59,9 +59,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd - Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log Tag ops-agent-collectd + Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -88,9 +88,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit - Path /var/log/google-cloud-ops-agent/subagents/logging-module.log Tag ops-agent-fluent-bit + Path /var/log/google-cloud-ops-agent/subagents/logging-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -134,10 +134,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -152,10 +152,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(syslog)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(syslog)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/linux/logging-default_overrides_disable_all/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-default_overrides_disable_all/golden_fluent_bit_main.conf index 3b42d46e3b..f42d5f08a5 100644 --- a/confgenerator/testdata/valid/linux/logging-default_overrides_disable_all/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-default_overrides_disable_all/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd - Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log Tag ops-agent-collectd + Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -59,9 +59,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit - Path /var/log/google-cloud-ops-agent/subagents/logging-module.log Tag ops-agent-fluent-bit + Path /var/log/google-cloud-ops-agent/subagents/logging-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -88,10 +88,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_fluent_bit_main.conf index d657d80f0c..1a9957e268 100644 --- a/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd - Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log Tag ops-agent-collectd + Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -59,9 +59,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit - Path /var/log/google-cloud-ops-agent/subagents/logging-module.log Tag ops-agent-fluent-bit + Path /var/log/google-cloud-ops-agent/subagents/logging-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -88,9 +88,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline1_log_source_id1 - Path /path/to/log/1/a/*,/path/to/log/1/b/* Tag pipeline1.log_source_id1 + Path /path/to/log/1/a/*,/path/to/log/1/b/* + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline1_log_source_id1 Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -119,9 +119,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline2_log_source_id2 - Path /path/to/log/2/a/*,/path/to/log/2/b/* Tag pipeline2.log_source_id2 + Path /path/to/log/2/a/*,/path/to/log/2/b/* + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline2_log_source_id2 Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -150,9 +150,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/syslog Name syslog + Tag pipeline3.test_syslog_source_id_tcp Mode tcp Listen 1.1.1.1 - Tag pipeline3.test_syslog_source_id_tcp Port 1111 Parser lib:default_message_parser @@ -170,9 +170,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/syslog Name syslog + Tag pipeline4.test_syslog_source_id_udp Mode udp Listen 2.2.2.2 - Tag pipeline4.test_syslog_source_id_udp Port 2222 Parser lib:default_message_parser @@ -270,10 +270,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(log_source_id1|log_source_id2|test_syslog_source_id_tcp|test_syslog_source_id_udp)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(log_source_id1|log_source_id2|test_syslog_source_id_tcp|test_syslog_source_id_udp)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -288,10 +288,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/linux/logging-processor_order/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-processor_order/golden_fluent_bit_main.conf index ba9749cf5a..e91df3347a 100644 --- a/confgenerator/testdata/valid/linux/logging-processor_order/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-processor_order/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/default_pipeline_syslog - Path /var/log/messages,/var/log/syslog Tag default_pipeline.syslog + Path /var/log/messages,/var/log/syslog + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/default_pipeline_syslog Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -59,9 +59,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd - Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log Tag ops-agent-collectd + Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -88,9 +88,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit - Path /var/log/google-cloud-ops-agent/subagents/logging-module.log Tag ops-agent-fluent-bit + Path /var/log/google-cloud-ops-agent/subagents/logging-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -117,9 +117,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline1_sample_logs - Path /tmp/*.log Tag pipeline1.sample_logs + Path /tmp/*.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline1_sample_logs Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -146,9 +146,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline2_sample_logs - Path /tmp/*.log Tag pipeline2.sample_logs + Path /tmp/*.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline2_sample_logs Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -250,10 +250,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -268,10 +268,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(syslog|sample_logs|sample_logs)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(syslog|sample_logs|sample_logs)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_fluent_bit_main.conf index a2e8ac7e86..b4fa6b080c 100644 --- a/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd - Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log Tag ops-agent-collectd + Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -59,9 +59,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit - Path /var/log/google-cloud-ops-agent/subagents/logging-module.log Tag ops-agent-fluent-bit + Path /var/log/google-cloud-ops-agent/subagents/logging-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -88,9 +88,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline1_log_source_id1 - Path /path/to/log/1/a/*,/path/to/log/1/b/* Tag pipeline1.log_source_id1 + Path /path/to/log/1/a/*,/path/to/log/1/b/* + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline1_log_source_id1 Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -119,9 +119,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline2_log_source_id2 - Path /path/to/log/2/a/*,/path/to/log/2/b/* Tag pipeline2.log_source_id2 + Path /path/to/log/2/a/*,/path/to/log/2/b/* + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline2_log_source_id2 Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -150,9 +150,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/syslog Name syslog + Tag pipeline3.test_syslog_source_id_tcp Mode tcp Listen 1.1.1.1 - Tag pipeline3.test_syslog_source_id_tcp Port 1111 Parser lib:default_message_parser @@ -170,9 +170,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/syslog Name syslog + Tag pipeline4.test_syslog_source_id_udp Mode udp Listen 2.2.2.2 - Tag pipeline4.test_syslog_source_id_udp Port 2222 Parser lib:default_message_parser @@ -282,10 +282,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(log_source_id1|log_source_id2|test_syslog_source_id_tcp|test_syslog_source_id_udp)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(log_source_id1|log_source_id2|test_syslog_source_id_tcp|test_syslog_source_id_udp)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -300,10 +300,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/linux/logging-processor_parse_regex_type_on_default_pipeline/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-processor_parse_regex_type_on_default_pipeline/golden_fluent_bit_main.conf index 190366b1df..e8a9b8c736 100644 --- a/confgenerator/testdata/valid/linux/logging-processor_parse_regex_type_on_default_pipeline/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-processor_parse_regex_type_on_default_pipeline/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/default_pipeline_syslog - Path /var/log/messages,/var/log/syslog Tag default_pipeline.syslog + Path /var/log/messages,/var/log/syslog + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/default_pipeline_syslog Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -59,9 +59,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd - Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log Tag ops-agent-collectd + Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -88,9 +88,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit - Path /var/log/google-cloud-ops-agent/subagents/logging-module.log Tag ops-agent-fluent-bit + Path /var/log/google-cloud-ops-agent/subagents/logging-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -140,10 +140,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -158,10 +158,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(syslog)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(syslog)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_fluent_bit_main.conf index 762c5c341f..c7a831dc04 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd - Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log Tag ops-agent-collectd + Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -59,9 +59,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit - Path /var/log/google-cloud-ops-agent/subagents/logging-module.log Tag ops-agent-fluent-bit + Path /var/log/google-cloud-ops-agent/subagents/logging-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -88,9 +88,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline1_log_source_id1 - Path /path/to/log/1/* Tag pipeline1.log_source_id1 + Path /path/to/log/1/* + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline1_log_source_id1 Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -117,9 +117,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline2_log_source_id2 - Path /path/to/log/2/a,/path/to/log/2/b Tag pipeline2.log_source_id2 + Path /path/to/log/2/a,/path/to/log/2/b + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline2_log_source_id2 Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -146,9 +146,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline3_log_source_id3 - Path /path/to/log/3/* Tag pipeline3.log_source_id3 + Path /path/to/log/3/* + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline3_log_source_id3 Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -177,9 +177,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline4_log_source_id4 - Path /path/to/log/4/* Tag pipeline4.log_source_id4 + Path /path/to/log/4/* + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline4_log_source_id4 Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -208,9 +208,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline5_log_source_id5 - Path /path/to/log/5/* Tag pipeline5.log_source_id5 + Path /path/to/log/5/* + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/pipeline5_log_source_id5 Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -328,10 +328,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(log_source_id1|log_source_id2|log_source_id3|log_source_id4|log_source_id5)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(log_source_id1|log_source_id2|log_source_id3|log_source_id4|log_source_id5)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -346,10 +346,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/linux/logging-receiver_syslog_type_multiple_receivers/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_syslog_type_multiple_receivers/golden_fluent_bit_main.conf index 64df717202..1c6163a41d 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_syslog_type_multiple_receivers/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_syslog_type_multiple_receivers/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd - Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log Tag ops-agent-collectd + Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -59,9 +59,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit - Path /var/log/google-cloud-ops-agent/subagents/logging-module.log Tag ops-agent-fluent-bit + Path /var/log/google-cloud-ops-agent/subagents/logging-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -88,9 +88,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/syslog Name syslog + Tag pipeline1.test_syslog_source_id_tcp Mode tcp Listen 1.1.1.1 - Tag pipeline1.test_syslog_source_id_tcp Port 1111 Parser lib:default_message_parser @@ -108,9 +108,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/syslog Name syslog + Tag pipeline2.test_syslog_source_id_udp Mode udp Listen 2.2.2.2 - Tag pipeline2.test_syslog_source_id_udp Port 2222 Parser lib:default_message_parser @@ -174,10 +174,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -192,10 +192,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(test_syslog_source_id_tcp|test_syslog_source_id_udp)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(test_syslog_source_id_tcp|test_syslog_source_id_udp)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/linux/metrics-default_overrides_disable_all/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-default_overrides_disable_all/golden_fluent_bit_main.conf index 3ab99ae576..075a5896ce 100644 --- a/confgenerator/testdata/valid/linux/metrics-default_overrides_disable_all/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-default_overrides_disable_all/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/default_pipeline_syslog - Path /var/log/messages,/var/log/syslog Tag default_pipeline.syslog + Path /var/log/messages,/var/log/syslog + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/default_pipeline_syslog Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -59,9 +59,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd - Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log Tag ops-agent-collectd + Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -88,9 +88,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit - Path /var/log/google-cloud-ops-agent/subagents/logging-module.log Tag ops-agent-fluent-bit + Path /var/log/google-cloud-ops-agent/subagents/logging-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -134,10 +134,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -152,10 +152,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(syslog)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(syslog)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_fluent_bit_main.conf index 3ab99ae576..075a5896ce 100644 --- a/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/default_pipeline_syslog - Path /var/log/messages,/var/log/syslog Tag default_pipeline.syslog + Path /var/log/messages,/var/log/syslog + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/default_pipeline_syslog Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -59,9 +59,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd - Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log Tag ops-agent-collectd + Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -88,9 +88,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit - Path /var/log/google-cloud-ops-agent/subagents/logging-module.log Tag ops-agent-fluent-bit + Path /var/log/google-cloud-ops-agent/subagents/logging-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -134,10 +134,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -152,10 +152,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(syslog)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(syslog)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_globs/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_globs/golden_fluent_bit_main.conf index 3ab99ae576..075a5896ce 100644 --- a/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_globs/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_globs/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/default_pipeline_syslog - Path /var/log/messages,/var/log/syslog Tag default_pipeline.syslog + Path /var/log/messages,/var/log/syslog + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/default_pipeline_syslog Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -59,9 +59,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd - Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log Tag ops-agent-collectd + Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -88,9 +88,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit - Path /var/log/google-cloud-ops-agent/subagents/logging-module.log Tag ops-agent-fluent-bit + Path /var/log/google-cloud-ops-agent/subagents/logging-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -134,10 +134,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -152,10 +152,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(syslog)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(syslog)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_custom_collection_interval/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_custom_collection_interval/golden_fluent_bit_main.conf index 3ab99ae576..075a5896ce 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_custom_collection_interval/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_custom_collection_interval/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/default_pipeline_syslog - Path /var/log/messages,/var/log/syslog Tag default_pipeline.syslog + Path /var/log/messages,/var/log/syslog + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/default_pipeline_syslog Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -59,9 +59,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd - Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log Tag ops-agent-collectd + Path /var/log/google-cloud-ops-agent/subagents/metrics-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-collectd Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -88,9 +88,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit - Path /var/log/google-cloud-ops-agent/subagents/logging-module.log Tag ops-agent-fluent-bit + Path /var/log/google-cloud-ops-agent/subagents/logging-module.log + DB /var/lib/google-cloud-ops-agent/fluent-bit/buffers/ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -134,10 +134,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -152,10 +152,10 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(syslog)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version) workers 8 - Match_Regex ^(syslog)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/windows/all-backward_compatible_with_explicit_exporters/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/all-backward_compatible_with_explicit_exporters/golden_fluent_bit_main.conf index eda4a3586a..2584aaaa3d 100644 --- a/confgenerator/testdata/valid/windows/all-backward_compatible_with_explicit_exporters/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/all-backward_compatible_with_explicit_exporters/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit - Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log Tag ops-agent-fluent-bit + Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log + DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -58,8 +58,8 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/windows-event-log - Tag default_pipeline.windows_event_log Name winlog + Tag default_pipeline.windows_event_log Channels System,Application,Security Interval_Sec 1 DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\default_pipeline_windows_event_log @@ -84,9 +84,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -101,9 +101,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(windows_event_log)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(windows_event_log)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/windows/all-built_in_config/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/all-built_in_config/golden_fluent_bit_main.conf index eda4a3586a..2584aaaa3d 100644 --- a/confgenerator/testdata/valid/windows/all-built_in_config/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/all-built_in_config/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit - Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log Tag ops-agent-fluent-bit + Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log + DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -58,8 +58,8 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/windows-event-log - Tag default_pipeline.windows_event_log Name winlog + Tag default_pipeline.windows_event_log Channels System,Application,Security Interval_Sec 1 DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\default_pipeline_windows_event_log @@ -84,9 +84,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -101,9 +101,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(windows_event_log)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(windows_event_log)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/windows/all-user_config_file_deleted/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/all-user_config_file_deleted/golden_fluent_bit_main.conf index eda4a3586a..2584aaaa3d 100644 --- a/confgenerator/testdata/valid/windows/all-user_config_file_deleted/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/all-user_config_file_deleted/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit - Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log Tag ops-agent-fluent-bit + Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log + DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -58,8 +58,8 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/windows-event-log - Tag default_pipeline.windows_event_log Name winlog + Tag default_pipeline.windows_event_log Channels System,Application,Security Interval_Sec 1 DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\default_pipeline_windows_event_log @@ -84,9 +84,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -101,9 +101,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(windows_event_log)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(windows_event_log)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/windows/logging-default_overrides_disable_all/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/logging-default_overrides_disable_all/golden_fluent_bit_main.conf index 3488f777ad..358efb79df 100644 --- a/confgenerator/testdata/valid/windows/logging-default_overrides_disable_all/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/logging-default_overrides_disable_all/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit - Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log Tag ops-agent-fluent-bit + Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log + DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -59,9 +59,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_fluent_bit_main.conf index d0a9ca1740..d55e5b2dce 100644 --- a/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit - Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log Tag ops-agent-fluent-bit + Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log + DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -59,9 +59,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\pipeline1_log_source_id1 - Path /path/to/log/1/a Tag pipeline1.log_source_id1 + Path /path/to/log/1/a + DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\pipeline1_log_source_id1 Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -88,9 +88,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\pipeline2_log_source_id2 - Path /path/to/log/2/a,/path/to/log/2/b Tag pipeline2.log_source_id2 + Path /path/to/log/2/a,/path/to/log/2/b + DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\pipeline2_log_source_id2 Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -116,8 +116,8 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/windows-event-log - Tag default_pipeline.windows_event_log Name winlog + Tag default_pipeline.windows_event_log Channels System,Application,Security Interval_Sec 1 DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\default_pipeline_windows_event_log @@ -182,9 +182,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -199,9 +199,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(windows_event_log|log_source_id1|log_source_id2)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(windows_event_log|log_source_id1|log_source_id2)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_all/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_all/golden_fluent_bit_main.conf index eda4a3586a..2584aaaa3d 100644 --- a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_all/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_all/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit - Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log Tag ops-agent-fluent-bit + Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log + DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -58,8 +58,8 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/windows-event-log - Tag default_pipeline.windows_event_log Name winlog + Tag default_pipeline.windows_event_log Channels System,Application,Security Interval_Sec 1 DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\default_pipeline_windows_event_log @@ -84,9 +84,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -101,9 +101,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(windows_event_log)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(windows_event_log)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_iis/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_iis/golden_fluent_bit_main.conf index eda4a3586a..2584aaaa3d 100644 --- a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_iis/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_iis/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit - Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log Tag ops-agent-fluent-bit + Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log + DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -58,8 +58,8 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/windows-event-log - Tag default_pipeline.windows_event_log Name winlog + Tag default_pipeline.windows_event_log Channels System,Application,Security Interval_Sec 1 DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\default_pipeline_windows_event_log @@ -84,9 +84,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -101,9 +101,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(windows_event_log)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(windows_event_log)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_mssql/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_mssql/golden_fluent_bit_main.conf index eda4a3586a..2584aaaa3d 100644 --- a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_mssql/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_mssql/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit - Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log Tag ops-agent-fluent-bit + Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log + DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -58,8 +58,8 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/windows-event-log - Tag default_pipeline.windows_event_log Name winlog + Tag default_pipeline.windows_event_log Channels System,Application,Security Interval_Sec 1 DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\default_pipeline_windows_event_log @@ -84,9 +84,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -101,9 +101,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(windows_event_log)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(windows_event_log)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/windows/metrics-pipeline_multiple_pipelines/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-pipeline_multiple_pipelines/golden_fluent_bit_main.conf index eda4a3586a..2584aaaa3d 100644 --- a/confgenerator/testdata/valid/windows/metrics-pipeline_multiple_pipelines/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-pipeline_multiple_pipelines/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit - Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log Tag ops-agent-fluent-bit + Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log + DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -58,8 +58,8 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/windows-event-log - Tag default_pipeline.windows_event_log Name winlog + Tag default_pipeline.windows_event_log Channels System,Application,Security Interval_Sec 1 DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\default_pipeline_windows_event_log @@ -84,9 +84,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -101,9 +101,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(windows_event_log)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(windows_event_log)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_fluent_bit_main.conf index eda4a3586a..2584aaaa3d 100644 --- a/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit - Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log Tag ops-agent-fluent-bit + Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log + DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -58,8 +58,8 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/windows-event-log - Tag default_pipeline.windows_event_log Name winlog + Tag default_pipeline.windows_event_log Channels System,Application,Security Interval_Sec 1 DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\default_pipeline_windows_event_log @@ -84,9 +84,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -101,9 +101,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(windows_event_log)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(windows_event_log)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_globs/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_globs/golden_fluent_bit_main.conf index eda4a3586a..2584aaaa3d 100644 --- a/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_globs/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_globs/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit - Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log Tag ops-agent-fluent-bit + Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log + DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -58,8 +58,8 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/windows-event-log - Tag default_pipeline.windows_event_log Name winlog + Tag default_pipeline.windows_event_log Channels System,Application,Security Interval_Sec 1 DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\default_pipeline_windows_event_log @@ -84,9 +84,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -101,9 +101,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(windows_event_log)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(windows_event_log)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_custom_collection_interval/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-receiver_custom_collection_interval/golden_fluent_bit_main.conf index eda4a3586a..2584aaaa3d 100644 --- a/confgenerator/testdata/valid/windows/metrics-receiver_custom_collection_interval/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-receiver_custom_collection_interval/golden_fluent_bit_main.conf @@ -30,9 +30,9 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/tail#config Name tail - DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit - Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log Tag ops-agent-fluent-bit + Path C:\ProgramData\Google\Cloud Operations\Ops Agent\log\logging-module.log + DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\ops-agent-fluent-bit Read_from_Head True # Set the chunk limit conservatively to avoid exceeding the recommended chunk size of 5MB per write request. Buffer_Chunk_Size 512k @@ -58,8 +58,8 @@ [INPUT] # https://docs.fluentbit.io/manual/pipeline/inputs/windows-event-log - Tag default_pipeline.windows_event_log Name winlog + Tag default_pipeline.windows_event_log Channels System,Application,Security Interval_Sec 1 DB C:\ProgramData\Google\Cloud Operations\Ops Agent\run\buffers\default_pipeline_windows_event_log @@ -84,9 +84,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(ops-agent-fluent-bit|ops-agent-collectd)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever. @@ -101,9 +101,9 @@ [OUTPUT] # https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver Name stackdriver + Match_Regex ^(windows_event_log)$ resource gce_instance stackdriver_agent Google-Cloud-Ops-Agent-Logging/latest (BuildDistro=build_distro;Platform=windows;ShortName=win_platform;ShortVersion=win_platform_version) - Match_Regex ^(windows_event_log)$ # https://docs.fluentbit.io/manual/administration/scheduling-and-retries # After 3 retries, a given chunk will be discarded. So bad entries don't accidentally stay around forever.