Skip to content

Instantly share code, notes, and snippets.

@lamvak
Created July 3, 2013 20:46
Show Gist options
  • Save lamvak/5922662 to your computer and use it in GitHub Desktop.
Save lamvak/5922662 to your computer and use it in GitHub Desktop.
rule for logcheck that will ignore any HEAD/GET/POST reuqest with status either of 200/206/301/304, other than requests of /wp-admin or /wp-login (which will still be reported); log entries formatted with nginx configuration: log_format main '$remote_addr - $remote_user [$time_local] ' '"$request" $status $bytes_sent ' '"$http_referer" "$http_us…
^[.0-9]+ - [^ ]+ \[[^]]+\] "(HEAD|GET|POST) ([^"/][^"]*|/([^"w][^"]*|w([^"p][^"]*|(p([^"-][^"]*|(-([^"al][^"]*|(l([^"o][^"]*|(o([^"g][^"]*|(g([^"i][^"]*|(i([^"n][^"]*|(n([^".][^"]*|(\.([^"p][^"]*|(p([^"h][^"]*|(h([^"p][^"]*|(p[^ "?]+)))))))))))))))))|(a([^"d][^"]*|(d([^"m][^"]*|(m([^"i][^"]*|(i([^"n][^"]*|(n([^"/][^"]*)))))))))))))))))HTTP/[.0-9]+" (200|206|301|304) [0-9]+ "[^"]*" "[^"]*" "[^"]*"$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment