Skip to content

Commit

Permalink
Add flow annotations to make the generated configs a bit nicer.
Browse files Browse the repository at this point in the history
  • Loading branch information
igorpeshansky committed Aug 4, 2021
1 parent 045a1e9 commit f503293
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 26 deletions.
9 changes: 3 additions & 6 deletions confgenerator/built-in-config-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ logging:
service:
pipelines:
default_pipeline:
receivers:
- syslog
receivers: [syslog]
metrics:
receivers:
hostmetrics:
Expand All @@ -22,7 +21,5 @@ metrics:
service:
pipelines:
default_pipeline:
receivers:
- hostmetrics
processors:
- metrics_filter
receivers: [hostmetrics]
processors: [metrics_filter]
16 changes: 4 additions & 12 deletions confgenerator/built-in-config-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -29,9 +25,5 @@ metrics:
service:
pipelines:
default_pipeline:
receivers:
- hostmetrics
- iis
- mssql
processors:
- metrics_filter
receivers: [hostmetrics, iis, mssql]
processors: [metrics_filter]
16 changes: 8 additions & 8 deletions confgenerator/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ type LoggingReceiverSyslog struct {
}

type LoggingReceiverWinevtlog struct {
Channels []string `yaml:"channels,omitempty"`
Channels []string `yaml:"channels,omitempty,flow"`
}

type LoggingReceiver struct {
Expand Down Expand Up @@ -144,9 +144,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.
Expand All @@ -164,7 +164,7 @@ type MetricsReceiver struct {
}

type MetricsProcessorExcludeMetrics struct {
MetricsPattern []string `yaml:"metrics_pattern"`
MetricsPattern []string `yaml:"metrics_pattern,flow"`
}

type MetricsProcessor struct {
Expand All @@ -182,9 +182,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 {
Expand Down

0 comments on commit f503293

Please sign in to comment.