fxnn / gowatch

Configurable logfile analysis for your server.
MIT License
8 stars 2 forks source link

Use MapItems for summary configuration #19

Open fxnn opened 9 years ago

fxnn commented 9 years ago

The following summarizer is malfunctioning:

- summarizer: count
  title: Hosts of Discarded and Junk Mails
  where: {
    allof: {
      tags: {contains: 'mail.log'},
      SYSLOGPROG: {contains: 'dovecot'}
    }
  }
  config: {
    '%{msgid_host}': 'deliver\(%{USER:user}\): sieve: msgid=<%{DATA:msgid_nonhost}@%{IPORHOST:msgid_host}>: marked message to be discarded if not explicitly delivered',
    '%{msgid_host}': "deliver\\(%{USER:user}\\): sieve: msgid=<%{DATA:msgid_nonhost}@%{IPORHOST:msgid_host}>: stored mail into mailbox 'Junk'"
  }

The reason for this is the duplicate key in the config section. Currently, only one of both entries gets processed.

To resolve the problem, we must use YAML maps instead.