<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">First, please note that the parameter you provide to "trigger" and "ignore" is a regular expression, and so the "%" is not required, and likely to be problematic (meaning, it won't match unless there's an actual "%" in a log line).</div><div><br></div><div class="gmail_quote">On 4 December 2014 at 05:22, Scot Kreienkamp <span dir="ltr"><<a href="mailto:Scot.Kreienkamp@la-z-boy.com" target="_blank">Scot.Kreienkamp@la-z-boy.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">





<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal"><span style="color:rgb(31,73,125)">Does anyone know if the ignore and trigger statements are applied per log?</span></p></div></div></blockquote><div><br></div><div>Yes, they are per log.</div><div><br></div><div>These two options are fundamentally different, and applied at different times in the log processing.  The "ignore" option specifies which lines should be ignored completely.</div><div><br></div><div>From what's left, some or all will be sent to the server.  You have a certain number of bytes that the client will send back to the server, and any more than that will be truncated.  The "trigger" option will look through these un-ignored lines and give preference to the lines that match the trigger string.  So these trigger-matched lines will get sent for (almost) certain, and whatever doesn't match will be truncated before being sent.</div><div><br></div><div>If you can use "ignore" to clean out enough lines so that what's left will be under your limit (10kB), then that's all you need to do.  However, if you cannot, you will end up with a truncated log, and so will need to use "trigger" to make sure the interesting lines get through.</div><div><br></div><div>These two should work together, but due to a bug in the client-side code, you can sometimes have problems.  So best to choose one or the other.</div><div><br></div><div>If what you're looking for is to send through ONLY the lines you care about and want to alert on, then you might be able to use a negative-match regular expression in your "ignore" definition.  Something like this:</div><div><br></div><font face="monospace">ignore ^(?!.*(FATAL|Fatal|FAIL|Fail|fail|Error|ERROR|error|timestamp|deadlock|Deadlock|password authentication failed|pg_hba.conf|invalid magic number))</font></div><div class="gmail_quote"><div><br></div><div>This bit of regex magic matches any log line that doesn't include the strings given, and in that way only non-matching lines are ignored.</div><div><br></div><div>J<br></div><div><br></div></div></div></div>