Welcome! Log In Create A New Profile

Advanced

add checksum to nginx log entries

Posted by prajos 
prajos
add checksum to nginx log entries
September 03, 2018 03:30PM
Hi,
I'm wondering if there is a ready way to add a checksum (e.g. CRC) to the
end of each log entry before they get written to the "access" or "error" log
files? One of the project I work on wants each log line to have its own
checksum for some integrity checks.

Any hint on how I can implement these would be of great help.

Thanks,
Cheers,
Prasanna

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,281078,281078#msg-281078

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Francis Daly
Re: add checksum to nginx log entries
September 04, 2018 09:30AM
On Mon, Sep 03, 2018 at 09:26:42AM -0400, prajos wrote:

Hi there,

> I'm wondering if there is a ready way to add a checksum (e.g. CRC) to the
> end of each log entry before they get written to the "access" or "error" log
> files?

I believe that stock nginx does not include a way to do that.

> One of the project I work on wants each log line to have its own
> checksum for some integrity checks.

What kind of corruption is the checksum intended to protect against?

The answer to that might help determine a suitable design for a solution
for you.

> Any hint on how I can implement these would be of great help.

If it is acceptable to be outside nginx, you could have something that
post-processed the logs to add whatever marks you want.

Or maybe you could write nginx logs to a named pipe, and have another
process do whatever you want before writing to "real" disk.

Good luck with it,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Sorry, only registered users may post in this forum.

Click here to login