Last active
August 1, 2021 17:58
-
-
Save mattantonelli/ea8fdb719eb457bedbdbfd0fe42aa627 to your computer and use it in GitHub Desktop.
Top 10 IPs making unique calls from NGINX logs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This command expects the following log format: | |
| # 1.2.3.4 - - [01/Aug/2021:00:00:16 -0400] "GET /news/all HTTP/1.1" 200 41188 "-" "Python/3.7 aiohttp/3.6.2" | |
| cat /opt/nginx/logs/access.log | cut -f1 -d ' ' | sort | uniq -c | sort -n | tail -10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment