Skip to content

Commit

Permalink
Make log monitoring dataset for services in par with indexing restric…
Browse files Browse the repository at this point in the history
…tions (#2034)

(cherry picked from commit 047c1b5)
  • Loading branch information
michalpristas authored and mergify[bot] committed Dec 30, 2022
1 parent bb8b5de commit 96c287d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/pkg/agent/application/monitoring/v1_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 96c287d

Please sign in to comment.