An nginx logs to prometheus exporter
-
init repo
go mod tidy
-
prepare config and log file
cp ./conf/access.log.example ./conf/access.log cp ./conf/nginx-log-exporter.yaml.example ./conf/nginx-log-exporter.yaml # update the absolute path in the config file for the log file
-
run the app
go run . --config-file ./conf/nginx-log-exporter.yaml # to simulate the log generation, you can manually copy new lines to the log file