|
104 | 104 | @waittime_port_13000 = 45 # default waittime for AMACA data port |
105 | 105 | @waittime_port_12563 = 45 # default waittime for AMACA config port |
106 | 106 |
|
107 | | -@netoworkFlowLogsThrottleRate = 1000 |
108 | | -@netoworkFlowLogsThrottleWindow = 300 |
109 | | -@netoworkFlowLogsThrottleInterval = "1s" |
110 | | -@netoworkFlowLogsThrottlePrint = false |
| 107 | +@networkFlowLogsThrottleRate = 1000 |
| 108 | +@networkFlowLogsThrottleWindow = 300 |
| 109 | +@networkFlowLogsThrottleInterval = "1s" |
| 110 | +@networkFlowLogsThrottlePrint = false |
111 | 111 |
|
112 | 112 | def is_number?(value) |
113 | 113 | true if Integer(value) rescue false |
@@ -195,25 +195,25 @@ def populateSettingValuesFromConfigMap(parsedConfig) |
195 | 195 | # networkflow logs settings |
196 | 196 | networkflow_logs_config = parsedConfig[:agent_settings][:networkflow_logs_config] |
197 | 197 | if !networkflow_logs_config.nil? |
198 | | - netoworkFlowLogsThrottleRate = networkflow_logs_config[:throttle_rate] |
199 | | - if is_valid_number?(netoworkFlowLogsThrottleRate) |
200 | | - @netoworkFlowLogsThrottleRate = netoworkFlowLogsThrottleRate.to_i |
201 | | - puts "Using config map value: networkflow logs throttle_rate = #{@netoworkFlowLogsThrottleRate}" |
202 | | - end |
203 | | - netoworkFlowLogsThrottleWindow = networkflow_logs_config[:throttle_window] |
204 | | - if is_valid_number?(netoworkFlowLogsThrottleWindow) |
205 | | - @netoworkFlowLogsThrottleWindow = netoworkFlowLogsThrottleWindow.to_i |
206 | | - puts "Using config map value: networkflow logsthrottle_window = #{@netoworkFlowLogsThrottleWindow}" |
207 | | - end |
208 | | - netoworkFlowLogsThrottleInterval = networkflow_logs_config[:throttle_interval] |
209 | | - if !netoworkFlowLogsThrottleInterval.nil? && !netoworkFlowLogsThrottleInterval.empty? |
210 | | - @netoworkFlowLogsThrottleInterval = netoworkFlowLogsThrottleInterval |
211 | | - puts "Using config map value: networkflow logs throttle_interval = #{@netoworkFlowLogsThrottleInterval}" |
212 | | - end |
213 | | - netoworkFlowLogsThrottlePrint = networkflow_logs_config[:throttle_print] |
214 | | - if !netoworkFlowLogsThrottlePrint.nil? && netoworkFlowLogsThrottlePrint.downcase == "true" |
215 | | - @netoworkFlowLogsThrottlePrint = true |
216 | | - puts "Using config map value: networkflow logs throttle_print = #{@netoworkFlowLogsThrottlePrint}" |
| 198 | + networkFlowLogsThrottleRate = networkflow_logs_config[:throttle_rate] |
| 199 | + if is_valid_number?(networkFlowLogsThrottleRate) |
| 200 | + @networkFlowLogsThrottleRate = networkFlowLogsThrottleRate.to_i |
| 201 | + puts "Using config map value: networkflow logs throttle_rate = #{@networkFlowLogsThrottleRate}" |
| 202 | + end |
| 203 | + networkFlowLogsThrottleWindow = networkflow_logs_config[:throttle_window] |
| 204 | + if is_valid_number?(networkFlowLogsThrottleWindow) |
| 205 | + @networkFlowLogsThrottleWindow = networkFlowLogsThrottleWindow.to_i |
| 206 | + puts "Using config map value: networkflow logsthrottle_window = #{@networkFlowLogsThrottleWindow}" |
| 207 | + end |
| 208 | + networkFlowLogsThrottleInterval = networkflow_logs_config[:throttle_interval] |
| 209 | + if !networkFlowLogsThrottleInterval.nil? && !networkFlowLogsThrottleInterval.empty? |
| 210 | + @networkFlowLogsThrottleInterval = networkFlowLogsThrottleInterval |
| 211 | + puts "Using config map value: networkflow logs throttle_interval = #{@networkFlowLogsThrottleInterval}" |
| 212 | + end |
| 213 | + networkFlowLogsThrottlePrint = networkflow_logs_config[:throttle_print] |
| 214 | + if !networkFlowLogsThrottlePrint.nil? && networkFlowLogsThrottlePrint.downcase == "true" |
| 215 | + @networkFlowLogsThrottlePrint = true |
| 216 | + puts "Using config map value: networkflow logs throttle_print = #{@networkFlowLogsThrottlePrint}" |
217 | 217 | end |
218 | 218 | end |
219 | 219 |
|
@@ -464,10 +464,10 @@ def populateSettingValuesFromConfigMap(parsedConfig) |
464 | 464 | file.write("export NODES_EMIT_STREAM_BATCH_SIZE=#{@nodesEmitStreamBatchSize}\n") |
465 | 465 |
|
466 | 466 | # networkflow logs settings |
467 | | - file.write("export NETWORKFLOW_LOGS_THROTTLE_RATE=#{@netoworkFlowLogsThrottleRate}\n") |
468 | | - file.write("export NETWORKFLOW_LOGS_THROTTLE_WINDOW=#{@netoworkFlowLogsThrottleWindow}\n") |
469 | | - file.write("export NETWORKFLOW_LOGS_THROTTLE_INTERVAL=#{@netoworkFlowLogsThrottleInterval}\n") |
470 | | - file.write("export NETWORKFLOW_LOGS_THROTTLE_PRINT=#{@netoworkFlowLogsThrottlePrint}\n") |
| 467 | + file.write("export NETWORKFLOW_LOGS_THROTTLE_RATE=#{@networkFlowLogsThrottleRate}\n") |
| 468 | + file.write("export NETWORKFLOW_LOGS_THROTTLE_WINDOW=#{@networkFlowLogsThrottleWindow}\n") |
| 469 | + file.write("export NETWORKFLOW_LOGS_THROTTLE_INTERVAL=#{@networkFlowLogsThrottleInterval}\n") |
| 470 | + file.write("export NETWORKFLOW_LOGS_THROTTLE_PRINT=#{@networkFlowLogsThrottlePrint}\n") |
471 | 471 |
|
472 | 472 | # fbit settings |
473 | 473 | file.write("export ENABLE_FBIT_INTERNAL_METRICS=#{@enableFbitInternalMetrics}\n") |
|
0 commit comments