Skip to content

Commit 62a831c

Browse files
authored
feat: add configurable retries with exponential backoff (#56)
On windows blackbox was preventing log rotation when configured with invalid syslog credentials as it was locking the file while trying to endlessly reconnect. This change makes it so that blackbox exits which unlocks the file and indicates that the config is invalid. Signed-off-by: Andrew Crump <[email protected]>
1 parent a2501d8 commit 62a831c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

jobs/syslog_forwarder_windows/spec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ properties:
6363
description: limit goprocess to a single cpu via gomaxprocs
6464
default: true
6565

66+
syslog.blackbox.max_retries:
67+
description: maximum number of times to retry the connection with an exponential backoff between attempts
68+
default: 10
69+
6670
syslog.migration.disabled:
6771
default: false
6872
description: |

jobs/syslog_forwarder_windows/templates/blackbox_config.yml.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ syslog:
4848
transport: <%= syslog_transport %>
4949
address: <%= syslog_address %>:<%= syslog_port %>
5050
ca: <%= syslog_ca %>
51+
max_retries: <%= p("syslog.blackbox.max_retries") %>
5152
exclude_file_pattern: '*.[0-9].*.log'
5253

5354
<% end %>

0 commit comments

Comments
 (0)