@@ -379,28 +379,6 @@ func registerFlags() {
379379 DefManifestDir ,
380380 "Specifies the path to the directory containing the manifest files" ,
381381 )
382- fs .Duration (
383- NginxReloadMonitoringPeriodKey ,
384- DefNginxReloadMonitoringPeriod ,
385- "The amount of time to monitor NGINX after a reload of configuration." ,
386- )
387- fs .Bool (
388- NginxTreatWarningsAsErrorsKey ,
389- DefTreatErrorsAsWarnings ,
390- "Warning messages in the NGINX errors logs after a NGINX reload will be treated as an error." ,
391- )
392-
393- fs .String (
394- NginxApiTlsCa ,
395- DefNginxApiTlsCa ,
396- "The NGINX Plus CA certificate file location needed to call the NGINX Plus API if SSL is enabled." ,
397- )
398-
399- fs .StringSlice (
400- NginxExcludeLogsKey , []string {},
401- "A comma-separated list of one or more NGINX log paths that you want to exclude from metrics " +
402- "collection or error monitoring. This includes absolute paths or regex patterns" ,
403- )
404382
405383 fs .StringSlice (AllowedDirectoriesKey ,
406384 DefaultAllowedDirectories (),
@@ -442,6 +420,7 @@ func registerFlags() {
442420 registerAuxiliaryCommandFlags (fs )
443421 registerCollectorFlags (fs )
444422 registerClientFlags (fs )
423+ registerDataPlaneFlags (fs )
445424
446425 fs .SetNormalizeFunc (normalizeFunc )
447426
@@ -456,6 +435,57 @@ func registerFlags() {
456435 })
457436}
458437
438+ func registerDataPlaneFlags (fs * flag.FlagSet ) {
439+ fs .Duration (
440+ NginxReloadMonitoringPeriodKey ,
441+ DefNginxReloadMonitoringPeriod ,
442+ "The amount of time to monitor NGINX after a reload of configuration." ,
443+ )
444+ fs .Bool (
445+ NginxTreatWarningsAsErrorsKey ,
446+ DefTreatErrorsAsWarnings ,
447+ "Warning messages in the NGINX errors logs after a NGINX reload will be treated as an error." ,
448+ )
449+
450+ fs .String (
451+ NginxApiTlsCa ,
452+ DefNginxApiTlsCa ,
453+ "The NGINX Plus CA certificate file location needed to call the NGINX Plus API if SSL is enabled." ,
454+ )
455+
456+ fs .StringSlice (
457+ NginxExcludeLogsKey , []string {},
458+ "A comma-separated list of one or more NGINX log paths that you want to exclude from metrics " +
459+ "collection or error monitoring. This includes absolute paths or regex patterns" ,
460+ )
461+
462+ // Nginx Reload Backoff Flags
463+ fs .Duration (
464+ NginxReloadBackoffInitialIntervalKey ,
465+ DefNginxReloadBackoffInitialInterval ,
466+ "The client backoff initial interval, value in seconds" )
467+
468+ fs .Duration (
469+ NginxReloadBackoffMaxIntervalKey ,
470+ DefNginxReloadBackoffMaxInterval ,
471+ "The client backoff max interval, value in seconds" )
472+
473+ fs .Duration (
474+ NginxReloadBackoffMaxElapsedTimeKey ,
475+ DefNginxReloadBackoffMaxElapsedTime ,
476+ "The client backoff max elapsed time, value in seconds" )
477+
478+ fs .Float64 (
479+ NginxReloadBackoffRandomizationFactorKey ,
480+ DefNginxReloadBackoffRandomizationFactor ,
481+ "The client backoff randomization factor, value float" )
482+
483+ fs .Float64 (
484+ NginxReloadBackoffMultiplierKey ,
485+ DefNginxReloadBackoffMultiplier ,
486+ "The client backoff multiplier, value float" )
487+ }
488+
459489func registerCommonFlags (fs * flag.FlagSet ) {
460490 fs .StringToString (
461491 LabelsRootKey ,
@@ -906,6 +936,13 @@ func resolveDataPlaneConfig() *DataPlaneConfig {
906936 TreatWarningsAsErrors : viperInstance .GetBool (NginxTreatWarningsAsErrorsKey ),
907937 ExcludeLogs : viperInstance .GetStringSlice (NginxExcludeLogsKey ),
908938 APITls : TLSConfig {Ca : viperInstance .GetString (NginxApiTlsCa )},
939+ ReloadBackoff : & BackOff {
940+ InitialInterval : viperInstance .GetDuration (NginxReloadBackoffInitialIntervalKey ),
941+ MaxInterval : viperInstance .GetDuration (NginxReloadBackoffMaxIntervalKey ),
942+ MaxElapsedTime : viperInstance .GetDuration (NginxReloadBackoffMaxElapsedTimeKey ),
943+ RandomizationFactor : viperInstance .GetFloat64 (NginxReloadBackoffRandomizationFactorKey ),
944+ Multiplier : viperInstance .GetFloat64 (NginxReloadBackoffMultiplierKey ),
945+ },
909946 },
910947 }
911948}
0 commit comments