例子:
[Fri Oct 18 17:39:11 2013] [error] [client x.x.x.x] client denied by server configuration: /home/client/client.com.br/app/etc/local.xml
[Fri Oct 18 17:39:38 2013] [error] [client x.x.x.x] client denied by server configuration: /home/client/client.com.br/app/etc/local.xml
[Fri Oct 18 17:39:44 2013] [error] [client x.x.x.x] client denied by server configuration: /home/client/mariapiacasa.com.br/app/etc/local.xml
[Fri Oct 18 17:42:41 2013] [error] [client x.x.x.x] client denied by server configuration: /home/client/client.com.br/app/etc/local.xml
[Fri Oct 18 17:47:33 2013] [error] [client x.x.x.x] client denied by server configuration: /home/client/client.com.br/app/etc/local.xml
[Fri Oct 18 17:47:49 2013] [error] [client x.x.x.x] client denied by server configuration: /home/client/client.com.br/app/etc/local.xml
[Fri Oct 18 17:47:58 2013] [error] [client x.x.x.x] client denied by server configuration: /home/client/client.com.br/app/etc/local.xml
[Fri Oct 18 17:50:02 2013] [error] [client x.x.x.x] client denied by server configuration: /home/client/client.com.br/app/etc/local.xml
[Fri Oct 18 17:59:37 2013] [error] [client x.x.x.x] client denied by server configuration: /home/client/client.com.br/app/etc/local.xml
[Fri Oct 18 19:05:34 2013] [error] [client x.x.x.x] File does not exist: /home/client/client.com.br/skin/frontend/default/MAG080138
在这个例子中,我不想被服务器配置拒绝的消息客户端监控行: /home/client/client.com.br/app/etc/local.xml。其他一切都应该受到监控。我知道如何使用以下正则表达式找到我不想出现的内容:
.*client denied by server configuration:.*\/app\/etc\/local\.xml$
在上面的例子中应该只监控一行:
[Fri Oct 18 19:05:34 2013] [error] [client x.x.x.x] File does not exist: /home/client/client.com.br/skin/frontend/default/MAG080138