Skip to content

Commit

Permalink
Reset entries for syslog-ng stderr and stdout redirects in the persis…
Browse files Browse the repository at this point in the history
…t-file

syslog-ng tracks the offset but could not identify a re-write of a file that results in the same file length. This prevent marking the version of sc4s in the internal logs which is confusing for the end user
  • Loading branch information
rfaircloth-splunk committed Mar 13, 2020
1 parent 1684030 commit 519886d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ COPY etc/conf.d /opt/syslog-ng/etc/conf.d
COPY etc/go_templates /opt/syslog-ng/etc/go_templates
COPY etc/context_templates /opt/syslog-ng/etc/context_templates
COPY etc/local_config /opt/syslog-ng/etc/local_config

COPY reset_persist /opt/syslog-ng/etc/
COPY sbin/entrypoint.sh /

COPY VERSION /
Expand Down
3 changes: 3 additions & 0 deletions package/reset_persist
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
affile_sd_curpos(/opt/syslog-ng/var/log/syslog-ng.out) = { "value": "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 " }

affile_sd_curpos(/opt/syslog-ng/var/log/syslog-ng.err) = { "value": "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 " }
1 change: 1 addition & 0 deletions package/sbin/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ echo sc4s version=$(cat /VERSION) >/opt/syslog-ng/var/log/syslog-ng.out
/opt/syslog-ng/sbin/syslog-ng -s >>/opt/syslog-ng/var/log/syslog-ng.out 2>/opt/syslog-ng/var/log/syslog-ng.err

echo syslog-ng starting
/opt/syslog-ng/bin/persist-tool add /opt/syslog-ng/etc/reset_persist -o /opt/syslog-ng/var
exec /opt/syslog-ng/sbin/syslog-ng $@

0 comments on commit 519886d

Please sign in to comment.