Skip to content

Commit

Permalink
Reduce the verbosity of the debug log for monitoring (elastic#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]>
  • Loading branch information
ph and michel-laterman authored Jul 5, 2021
1 parent 1862f78 commit c3925fc
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 @@ -72,6 +72,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 c3925fc

Please sign in to comment.