Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Elastic Agent] Fix index for Agent monitoring to to elastic_agent. #21932

Merged
merged 2 commits into from
Oct 19, 2020
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions x-pack/elastic-agent/CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- Fix issue where inputs without processors defined would panic {pull}21628[21628]
- Partial extracted beat result in failure to spawn beat {issue}21718[21718]
- Use local temp instead of system one {pull}21883[21883]
- Rename monitoring index from `elastic.agent` to `elastic_agent` {pull}21932[21932]

==== New features

Expand Down
18 changes: 9 additions & 9 deletions x-pack/elastic-agent/pkg/agent/operation/monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,14 @@ func (o *Operator) getMonitoringFilebeatConfig(output interface{}) (map[string]i
"paths": []string{
filepath.Join(paths.Home(), "logs", "elastic-agent-json.log"),
},
"index": "logs-elastic.agent-default",
"index": "logs-elastic_agent-default",
"processors": []map[string]interface{}{
{
"add_fields": map[string]interface{}{
"target": "data_stream",
"fields": map[string]interface{}{
"type": "logs",
"dataset": "elastic.agent",
"dataset": "elastic_agent",
"namespace": "default",
},
},
Expand All @@ -202,7 +202,7 @@ func (o *Operator) getMonitoringFilebeatConfig(output interface{}) (map[string]i
"add_fields": map[string]interface{}{
"target": "event",
"fields": map[string]interface{}{
"dataset": "elastic.agent",
"dataset": "elastic_agent",
},
},
},
Expand All @@ -220,14 +220,14 @@ func (o *Operator) getMonitoringFilebeatConfig(output interface{}) (map[string]i
"message_key": "message",
},
"paths": paths,
"index": fmt.Sprintf("logs-elastic.agent.%s-default", name),
"index": fmt.Sprintf("logs-elastic_agent.%s-default", name),
"processors": []map[string]interface{}{
{
"add_fields": map[string]interface{}{
"target": "data_stream",
"fields": map[string]interface{}{
"type": "logs",
"dataset": fmt.Sprintf("elastic.agent.%s", name),
"dataset": fmt.Sprintf("elastic_agent.%s", name),
"namespace": "default",
},
},
Expand All @@ -236,7 +236,7 @@ func (o *Operator) getMonitoringFilebeatConfig(output interface{}) (map[string]i
"add_fields": map[string]interface{}{
"target": "event",
"fields": map[string]interface{}{
"dataset": fmt.Sprintf("elastic.agent.%s", name),
"dataset": fmt.Sprintf("elastic_agent.%s", name),
},
},
},
Expand Down Expand Up @@ -270,14 +270,14 @@ func (o *Operator) getMonitoringMetricbeatConfig(output interface{}) (map[string
"metricsets": []string{"stats", "state"},
"period": "10s",
"hosts": endpoints,
"index": fmt.Sprintf("metrics-elastic.agent.%s-default", name),
"index": fmt.Sprintf("metrics-elastic_agent.%s-default", name),
"processors": []map[string]interface{}{
{
"add_fields": map[string]interface{}{
"target": "data_stream",
"fields": map[string]interface{}{
"type": "metrics",
"dataset": fmt.Sprintf("elastic.agent.%s", name),
"dataset": fmt.Sprintf("elastic_agent.%s", name),
"namespace": "default",
},
},
Expand All @@ -286,7 +286,7 @@ func (o *Operator) getMonitoringMetricbeatConfig(output interface{}) (map[string
"add_fields": map[string]interface{}{
"target": "event",
"fields": map[string]interface{}{
"dataset": fmt.Sprintf("elastic.agent.%s", name),
"dataset": fmt.Sprintf("elastic_agent.%s", name),
},
},
},
Expand Down