#!/usr/bin/env python3 # -*- coding: utf-8 -*- # #==============================================================# # File : inventory_load # Desc : parse nginx access to into csv format # Ctime : 2022-05-22 # Mtime : 2022-05-22 # Path : bin/inventory_cmdb # License : Apache-2.0 @ https://pigsty.io/docs/about/license/ # Copyright : 2018-2026 Ruohang Feng / Vonng (rh@vonng.com) #==============================================================# import os, sys, re, csv, datetime NGINX_ACCESS_LOG_REGEX = r'(?P.*?)- - \[(?P