Monitoring
bash
Intermediate
Nginx Access Log Analyser
Parse Nginx access logs and report top IPs, endpoints, and status codes.
bash
#!/bin/bash
LOG=${1:-/var/log/nginx/access.log}
echo '=== Top 10 IPs ==='
awk '{print $1}' $LOG | sort | uniq -c | sort -rn | head -10
echo '=== Status Codes ==='
awk '{print $9}' $LOG | sort | uniq -c | sort -rn
Prerequisites
- awk
- sort
- uniq
Pro Tips
- → Pipe to goaccess for a live dashboard.
Commercial Licensing
Acquire a production access token or template license for enterprise deployment.
Module Info
- Language
- bash
- Level
- Intermediate
- Read time
- 2 min
- Published
- Apr 2025
- License
- Commercial License
Newsletter
New modules every week, directly to your inbox.
Similar Modules
Disk IO Monitor
Monitor per-device disk read/write throughput in real time using iostat.
bash
·
Beginner
Cron Job Heartbeat Monitor
Send a heartbeat ping after each cron job run — alert if a heartbeat is missed.
python
·
Intermediate
Datadog Custom Metric Reporter
Report custom business metrics to Datadog from a Python script via DogStatsD.
python
·
Advanced