Skip to content

Commit

Permalink
Reduce the verbosity of the debug log for monitoring (#26583)
Browse files Browse the repository at this point in the history
* Reduce the verbosity of the debug log for monitoring

Running Elastic Agent using debug mode would result in leaking
credentials for the monitoring of the local logs and metrics. This
PR remove the configuration to be exposed via the debug logging statements.

We can receive the same information by running the `inspect` subcommand
this require access to the local machine and the necessary privileges to
read the files.

* Changelog

* Add PR number, run make check

Co-authored-by: michel-laterman <[email protected]>
(cherry picked from commit c3925fc)
  • Loading branch information
ph authored and mergify-bot committed Jul 5, 2021
1 parent f9f4d3b commit 7d459f7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
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 @@ -73,6 +73,7 @@
- Fix startup with failing configuration {pull}26057[26057]
- Change timestamp in elatic-agent-json.log to use UTC {issue}25391[25391]
- Fix add support for Logstash output. {pull}24305[24305]
- Do not log Elasticsearch configuration for monitoring output when running with debug. {pull}26583[26583]

==== New features

Expand Down
4 changes: 0 additions & 4 deletions x-pack/elastic-agent/pkg/agent/operation/monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,6 @@ func (o *Operator) getMonitoringFilebeatConfig(outputType string, output interfa
},
}

o.logger.Debugf("monitoring configuration generated for filebeat: %v", result)

return result, true
}

Expand Down Expand Up @@ -585,8 +583,6 @@ func (o *Operator) getMonitoringMetricbeatConfig(outputType string, output inter
},
}

o.logger.Debugf("monitoring configuration generated for metricbeat: %v", result)

return result, true
}

Expand Down

0 comments on commit 7d459f7

Please sign in to comment.