From 381735d3d40a50822a0451552b8e4d39051296a4 Mon Sep 17 00:00:00 2001 From: Brandon W Maister Date: Tue, 11 Oct 2022 00:26:58 -0700 Subject: [PATCH] logging: Change Docker target discovery log level from Error to Info (#7312) **What this PR does / why we need it**: Discovering a new node is not an error, so having it send errors to dashboards is confusing. **Special notes for your reviewer**: **Checklist** - [x] Reviewed the `CONTRIBUTING.md` guide - [x] Documentation added - [ ] Tests updated - [x] `CHANGELOG.md` updated - [x] Changes that require user attention or interaction to upgrade are documented in `docs/sources/upgrading/_index.md` --- CHANGELOG.md | 2 ++ clients/pkg/promtail/targets/docker/target_group.go | 2 +- docs/sources/upgrading/_index.md | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 471bb9cc92bd5..b8de3fa92b36d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,8 @@ * [7016](https://github.com/grafana/loki/pull/7016) **chodges15**: Fix issue with dropping logs when a file based SD target's labels are updated ##### Changes +* **quodlibetor**: Change Docker target discovery log level from `Error` to `Info` + #### Logcli * [7325](https://github.com/grafana/loki/pull/7325) **dbirks**: Document setting up command completion diff --git a/clients/pkg/promtail/targets/docker/target_group.go b/clients/pkg/promtail/targets/docker/target_group.go index b3c0e457d6f98..b3ce893ec70bb 100644 --- a/clients/pkg/promtail/targets/docker/target_group.go +++ b/clients/pkg/promtail/targets/docker/target_group.go @@ -92,7 +92,7 @@ func (tg *targetGroup) addTarget(id string, discoveredLabels model.LabelSet) err return err } tg.targets[id] = t - level.Error(tg.logger).Log("msg", "added Docker target", "containerID", id) + level.Info(tg.logger).Log("msg", "added Docker target", "containerID", id) return nil } diff --git a/docs/sources/upgrading/_index.md b/docs/sources/upgrading/_index.md index c8bbc989277d2..1900696408811 100644 --- a/docs/sources/upgrading/_index.md +++ b/docs/sources/upgrading/_index.md @@ -203,6 +203,11 @@ This creates a lot of series and we don't think this metric has enough value to While this isn't a direct replacement, two metrics we find more useful are size and line counters configured via pipeline stages, an example of how to configure these metrics can be found in the [metrics pipeline stage docs](https://grafana.com/docs/loki/latest/clients/promtail/stages/metrics/#counter) +#### `added Docker target` log message has been demoted from level=error to level=info + +If you have dashboards that depended on the log level, change them to search for the `msg="added +Docker target"` property. + ### Jsonnet #### Compactor config defined as command line args moved to yaml config