diff --git a/internal/pkg/agent/application/monitoring/v1_monitor.go b/internal/pkg/agent/application/monitoring/v1_monitor.go index 3c6774e8456..a70ba023566 100644 --- a/internal/pkg/agent/application/monitoring/v1_monitor.go +++ b/internal/pkg/agent/application/monitoring/v1_monitor.go @@ -435,7 +435,9 @@ func (b *BeatsMonitor) injectLogsInput(cfg map[string]interface{}, components [] // only monitor service inputs that define a log path continue } - dataset := fmt.Sprintf("elastic_agent.%s", comp.InputSpec.BinaryName) + + fixedBinaryName := strings.ReplaceAll(strings.ReplaceAll(comp.InputSpec.BinaryName, "-", "_"), "/", "_") // conform with index naming policy + dataset := fmt.Sprintf("elastic_agent.%s", fixedBinaryName) streams = append(streams, map[string]interface{}{ idKey: fmt.Sprintf("filestream-monitoring-%s", comp.ID), "type": "filestream",