Skip to content

Graylog Steam multiple rules not working #17

@tahder

Description

@tahder

Affected Puppet, Ruby, OS and module versions/distributions

How to reproduce (e.g Puppet code you use)

Single entry rule works well, even modified each key...

  graylog_stream { 'DNS':
    ensure      => present,
    description => 'All DNS log entries',
    rules       => [
      field     => 'application_name_x',
      type      => 'equals',
      value     => 'named',
    ],
  }

but modified to have multiple rules keys

  graylog_stream { 'DNS':
    ensure                             => present,
    description                        => 'All DNS log entries',
    rules                              => [
      {
        field => 'application_name_y',
        type  => 'equals',
        value => 'named',
      },
      {
        field    => 'facility',
        type     => 'equals',
        value    => 'kernel',
        inverted => true,
      },
    ],
  }

What are you seeing

==> graylog: Notice: /Stage[main]/Profile::Graylog/Graylog_stream[DNS]/rules: rules changed [
==> graylog:   {
==> graylog:     'field' => 'facility',
==> graylog:     'description' => '',
==> graylog:     'type' => 'equals',
==> graylog:     'inverted' => true,
==> graylog:     'value' => 'kernel'
==> graylog:   }] to [
==> graylog:   {
==> graylog:     'field' => 'application_name_y',
==> graylog:     'description' => '',
==> graylog:     'type' => 'equals',
==> graylog:     'inverted' => false,
==> graylog:     'value' => 'named'
==> graylog:   },
==> graylog:   {
==> graylog:     'field' => 'facility',
==> graylog:     'description' => '',
==> graylog:     'type' => 'equals',
==> graylog:     'inverted' => true,
==> graylog:     'value' => 'kernel'
==> graylog:   }]

What behaviour did you expect instead

<ip>/streams/DNS supposedly will add another rule ie facility in the DNS stream

Output log

Any additional information you'd like to impart

However, deleting the DNS stream and rerun the puppet will able to create the 2 rules defined, but provisioning ie modifying an entry will not be updated.


==> graylog: Notice: /Stage[main]/Profile::Graylog/Graylog_stream[DNS]/rules: rules changed [
==> graylog:   {
==> graylog:     'field' => 'facility',
==> graylog:     'description' => '',
==> graylog:     'type' => 'equals',
==> graylog:     'inverted' => true,
==> graylog:     'value' => 'kernel'
==> graylog:   },
==> graylog:   {
==> graylog:     'field' => 'application_name_y',
==> graylog:     'description' => '',
==> graylog:     'type' => 'equals',
==> graylog:     'inverted' => false,
==> graylog:     'value' => 'named'
==> graylog:   }] to [
==> graylog:   {
==> graylog:     'field' => 'application_name',
==> graylog:     'description' => '',
==> graylog:     'type' => 'equals',
==> graylog:     'inverted' => false,
==> graylog:     'value' => 'named'
==> graylog:   },
==> graylog:   {
==> graylog:     'field' => 'facility',
==> graylog:     'description' => '',
==> graylog:     'type' => 'equals',
==> graylog:     'inverted' => true,
==> graylog:     'value' => 'kernel'
==> graylog:   }]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions