Skip to content

Pillar input always parsed to string #18

@simonclausen

Description

@simonclausen

It seems that the generated logstash configs are always generated with the pillar input being put into strings ("").

For example

  outputs:
    -
      plugin_name: elasticsearch
      cond: 'if [type] == "test"'
      workers: 8
      index: 'test-%{+YYYY.MM.dd}'
      flush_size: 5000
      hosts:
        - 127.0.0.1:9200

Is parsed into:

output {
    if [type] == "test" {
        elasticsearch {
            index => "test-%{+YYYY.MM.dd}"
            workers => "8" 
            hosts => [
                "127.0.0.1:9200"
            ] 
            flush_size => "5000"
        }
    }
}

In this case logstash will fail overwriting the default of the "workers" setting:

:message=>"Pipeline aborted due to error", :exception=>#<ArgumentError: comparison of String with 1 failed>

This is on logstash-2.3.3; I don't know if logstash previously has been able to overwrite int setting inputs with string.

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