تنسيق سجل Goaccess

هل لدى أي شخص تنسيق ملف سجل لمحلل ملفات السجل goaccess يعمل مع سجلات nginx التي تنتجها تثبيتات Docker الخاصة بـ Discourse؟ أواجه صعوبة في كتابته.

إعجاب واحد (1)

حسنًا، سأجيب على سؤالي بنفسي…

تنسيق ملف السجل في حاوية docker هو:

log_format log_discourse ‘[$time_local] “$http_host” $remote_addr “$request” “$http_user_agent” “$sent_http_x_discourse_route” $status $bytes_sent “$http_referer” $upstream_response_time $request_time “$upstream_http_x_discourse_username” “$upstream_http_x_discourse_trackview” “$upstream_http_x_queue_time” “$upstream_http_x_redis_calls” “$upstream_http_x_redis_time” “$upstream_http_x_sql_calls” “$upstream_http_x_sql_time”’;

هناك برنامج نصي مساعد يمكنه تحليل هذا وإنتاج تنسيق ملف سجل .goaccess على github:

هذا هو الناتج:

time-format %T
date-format %d/%b/%Y
log_format [%d:%t %^] “%v” %h “%r” “%u” “%^” %s %b “%R” %^ %T “%^” “%^” “%^” “%^” “%^” “%^” “%^”

من الصعب جدًا كتابة ذلك بنفسك. أعتقد أن هذا قد يكون مفيدًا للآخرين في المستقبل.

برنامج goaccess هو محلل ملفات سجل ويب مرئي لطيف جدًا.

GoAccess - محلل سجلات الويب المرئي

إعجابَين (2)