Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When I receive kernel traces in my logs, the last line is empty. I'd like to filter/ignore these empty kernel messages using syslog-ng and patterndb. Here is the pattern I have so far that is not matching empty:

  <rule class='system' id='kernel_empty' provider='local'>
  <description></description>
    <patterns>
      <pattern></pattern>
    </patterns>
  </rule>

How do I exclude these empty kernel messages?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

try to add an empty line (or a line-break) to the pattern. For example,

<patterns>
  <pattern>
</pattern>
</patterns>
share|improve this answer
    
You'll have to wrap XML tags in a {code} block, or the system will hide it :) –  adaptr Dec 21 '11 at 13:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.