apache:extract_all_user_agents_from_apache_logs
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
apache:extract_all_user_agents_from_apache_logs [2016/11/10 10:02] – peter | apache:extract_all_user_agents_from_apache_logs [2023/07/17 12:10] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Apache - Extract all user agents from Apache logs ====== | ||
- | |||
- | <code bash> | ||
- | cat test.log | awk -F\" ' | ||
- | </ | ||
- | |||
- | (where “test.log” is the access logfile you want to analyse). | ||
- | |||
- | Returns | ||
- | |||
- | < | ||
- | 51916 MetaURI API/2.0 +metauri.com | ||
- | 59899 Twitterbot/ | ||
- | 87819 Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/ | ||
- | 111261 Mozilla/5.0 (compatible; | ||
- | 187812 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:28.0) Gecko/ | ||
- | 189834 Mozilla/5.0 (compatible; | ||
- | 390477 facebookexternalhit/ | ||
- | </ | ||
- | |||
- | The first number (bolded) is the amount of times this spider/ | ||
- | |||
- | <WRAP info> | ||
- | In my example above, you see that the “Facebookexternalhit” user agent accessed the site 390,477 times per month. That is roughly 541x per hour. Excessive. On the kill list, you go! | ||
- | </ |
apache/extract_all_user_agents_from_apache_logs.1478772159.txt.gz · Last modified: 2020/07/15 09:30 (external edit)