For generating apache logs used https://github.com/mingrammer/flog
flog > apache.log
For generating nginx logs used https://github.com:kscarlett/nginx-log-generator
For generating apache logs used https://github.com/mingrammer/flog
flog > apache.log
For generating nginx logs used https://github.com:kscarlett/nginx-log-generator
| # Output the access log | |
| cat access.log | |
| # Run the results through grep to find any 500 status codes | |
| cat access.log | grep "[: ]500[: ]" | |
| # Find any non 200 status codes | |
| cat access.log | grep -v "[: ]200[: ]" | |
| # Find multiple status codes |
| SELECT table, | |
| formatReadableSize(sum(bytes)) as size, | |
| min(min_date) as min_date, | |
| max(max_date) as max_date | |
| FROM system.parts | |
| WHERE active | |
| GROUP BY table |