No description
  • Go 96.7%
  • Shell 3.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-10 09:30:28 +02:00
internal add mapping from CIDR to IPs 2026-10-07 22:08:21 +02:00
.gitignore gitignore update 2026-10-07 22:18:28 +02:00
CHANGELOG.md add mapping from CIDR to IPs 2026-10-07 22:08:21 +02:00
go.mod malformed go.sum fixed 2026-10-07 22:22:08 +02:00
go.sum malformed go.sum fixed 2026-10-07 22:22:08 +02:00
go.work v1.0.0 - first approach to nginx logs parsing 2026-10-05 11:59:42 +02:00
LOCAL_INSTRUCTIONS.md add enrichment functions, that add new calculated fields to the database; read CHANGELOG.md for details 2026-10-07 15:46:37 +02:00
main.go add mapping from CIDR to IPs 2026-10-07 22:08:21 +02:00
README.md add enrichment functions, that add new calculated fields to the database; read CHANGELOG.md for details 2026-10-07 15:46:37 +02:00
run.sh update run script 2026-10-10 09:30:28 +02:00
TODO.md add mapping from CIDR to IPs 2026-10-07 22:08:21 +02:00

Crude Nginx Access Logs Parser

For the purposes of having fun with Go and not being bored, this is a very primitive Nginx access logs parser. It reads access logs and extracts the fields, writes it first to a .csv file and then to persistent .duckdb file. This simplifies further analysis. in Observable Framework.

Server Logs Extraction Process

cron job is setup on the VPS which copies nginx logs every night to the dedicated folder. On the client machine there is a bash script which wraps up the process as follows:

  • copies files from the server to the client with rsync
  • extracts and unpacks log files into a dedicated folder
  • runs nginx-parser
  • creates nginx.csv and nginx.duckdb
  • copies nginx.duckdb to the Observable Framework project folder as well

This process is configured as systemd service and timer, which runs nightly.

Data Enrichment

  • This repository is used as a source of IP addresses of various AI crawlers - Link
  • This repository is used as a source of ASN information and IP ranges - Link