script to fetch nginx logs and extract KPIs