Skip to content

Commit

Permalink
logging: Change Docker target discovery log level from Error to Info (#…
Browse files Browse the repository at this point in the history
…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`
  • Loading branch information
quodlibetor authored Oct 11, 2022
1 parent fe17fee commit 381735d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/promtail/targets/docker/target_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
5 changes: 5 additions & 0 deletions docs/sources/upgrading/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 381735d

Please sign in to comment.