Skip to content

Commit

Permalink
code review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
oliveromahony committed Apr 3, 2023
1 parent 350483e commit a8fd768
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/core/config/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,11 @@ var (
Usage: "The duration the NGINX Agent will monitor error logs after a NGINX reload",
DefaultValue: Defaults.Nginx.ConfigReloadMonitoringPeriod,
},
&BoolFlag{
Name: NginxTreatWarningsAsErrors,
Usage: "On nginx -t, treat warnings as failures on configuration application.",
DefaultValue: Defaults.Nginx.TreatWarningsAsErrors,
},
// Metrics
&DurationFlag{
Name: MetricsCollectionInterval,
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/nginx.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ func (n *Nginx) completeConfigApply(response *NginxConfigValidationResponse) (st
} else {
rollbackError = n.monitor()
if rollbackError != nil {
nginxConfigStatusMessage = fmt.Sprintf("Config apply failed. The following errors were found in the NGINX error logs: %v", rollbackError)
nginxConfigStatusMessage = fmt.Sprintf("Config apply failed. Errors found during monitoring period after applying a new configuration: %v", rollbackError)
rollback = true
} else {
log.Info("No errors found in NGINX errors logs after NGINX reload")
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a8fd768

Please sign in to comment.