Skip to content

Commit

Permalink
Promtail converter will now treat `global positions configuration is …
Browse files Browse the repository at this point in the history
…not supported` as a Warning instead of Error. (#5338)

Signed-off-by: erikbaranowski <[email protected]>
  • Loading branch information
erikbaranowski authored Sep 29, 2023
1 parent 9404e2f commit eec6382
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ Main (unreleased)
- The `instance` label of targets exposed by `prometheus.exporter.*` components
is now more representative of what is being monitored. (@tpaschalis)

- Promtail converter will now treat `global positions configuration is not supported` as a Warning instead of Error. (@erikbaranowski)

### Bugfixes

- Fixed `otelcol.exporter.prometheus` label names for the `otel_scope_info`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(Error) global positions configuration is not supported - each Flow Mode's loki.source.file component has its own positions file in the component's data directory
(Warning) global positions configuration is not supported - each Flow Mode's loki.source.file component has its own positions file in the component's data directory
(Error) Promtail's WAL is currently not supported in Flow Mode
(Error) limits_config is not yet supported in Flow Mode
(Warning) If you have a tracing set up for Promtail, it cannot be migrated to Flow Mode automatically. Refer to the documentation on how to configure tracing in Flow Mode.
Expand Down
2 changes: 1 addition & 1 deletion converter/internal/promtailconvert/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func validateTopLevelConfig(cfg *promtailcfg.Config, diags *diag.Diagnostics) {
// The positions global config is not supported in Flow Mode.
if cfg.PositionsConfig != DefaultPositionsConfig() {
diags.Add(
diag.SeverityLevelError,
diag.SeverityLevelWarn,
"global positions configuration is not supported - each Flow Mode's loki.source.file component "+
"has its own positions file in the component's data directory",
)
Expand Down
4 changes: 2 additions & 2 deletions converter/internal/staticconvert/testdata/promtail_prom.diags
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(Error) global positions configuration is not supported - each Flow Mode's loki.source.file component has its own positions file in the component's data directory
(Warning) global positions configuration is not supported - each Flow Mode's loki.source.file component has its own positions file in the component's data directory
(Warning) server.log_level is not supported - Flow mode components may produce different logs
(Error) global positions configuration is not supported - each Flow Mode's loki.source.file component has its own positions file in the component's data directory
(Warning) global positions configuration is not supported - each Flow Mode's loki.source.file component has its own positions file in the component's data directory
(Warning) server.log_level is not supported - Flow mode components may produce different logs
(Warning) Please review your agent command line flags and ensure they are set in your Flow mode config file where necessary.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(Error) global positions configuration is not supported - each Flow Mode's loki.source.file component has its own positions file in the component's data directory
(Warning) global positions configuration is not supported - each Flow Mode's loki.source.file component has its own positions file in the component's data directory
(Warning) server.log_level is not supported - Flow mode components may produce different logs
(Warning) Please review your agent command line flags and ensure they are set in your Flow mode config file where necessary.
2 changes: 1 addition & 1 deletion converter/internal/staticconvert/testdata/sanitize.diags
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(Error) global positions configuration is not supported - each Flow Mode's loki.source.file component has its own positions file in the component's data directory
(Warning) global positions configuration is not supported - each Flow Mode's loki.source.file component has its own positions file in the component's data directory
(Warning) server.log_level is not supported - Flow mode components may produce different logs
(Warning) Please review your agent command line flags and ensure they are set in your Flow mode config file where necessary.
(Error) unsupported wal_directory metrics config was provided. use the run command flag --storage.path for Flow mode instead.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(Error) global positions configuration is not supported - each Flow Mode's loki.source.file component has its own positions file in the component's data directory
(Warning) global positions configuration is not supported - each Flow Mode's loki.source.file component has its own positions file in the component's data directory
(Warning) server.log_level is not supported - Flow mode components may produce different logs
(Error) unsupported integration which is not being scraped was provided: mssql.
(Error) mapping_config is not supported in statsd_exporter integrations config
Expand Down

0 comments on commit eec6382

Please sign in to comment.