Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions internal/pkg/otel/translate/otelconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,15 @@ type BeatMonitoringConfigGetter func(unitID, binary string) map[string]any
type exporterConfigTranslationFunc func(*config.C, *logp.Logger) (map[string]any, error)

var (
OtelSupportedOutputTypes = []string{"elasticsearch"}
OtelSupportedInputTypes = []string{"filestream", "http/metrics", "beat/metrics", "system/metrics", "prometheus/metrics"}
OtelSupportedOutputTypes = []string{"elasticsearch"}
OtelSupportedFilebeatInputTypes = []string{
"filestream",
"journald",
"log",
"winlog",
}

OtelSupportedInputTypes = OtelSupportedFilebeatInputTypes
configTranslationFuncForExporter = map[otelcomponent.Type]exporterConfigTranslationFunc{
otelcomponent.MustNewType("elasticsearch"): translateEsOutputToExporter,
}
Expand Down Expand Up @@ -118,7 +125,9 @@ func VerifyComponentIsOtelSupported(comp *component.Component) error {
return fmt.Errorf("unsupported output type: %s", comp.OutputType)
}

if !slices.Contains(OtelSupportedInputTypes, comp.InputType) {
// check if given input is supported in OTel runtime
// this includes all metricbeat inputs and some filebeat inputs for now
if !slices.Contains(OtelSupportedInputTypes, comp.InputType) && !strings.HasSuffix(comp.InputType, "/metrics") {
return fmt.Errorf("unsupported input type: %s", comp.InputType)
}

Expand Down