Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid FieldReference in array crashes Logstash #134

Open
Aketzu opened this issue Apr 26, 2019 · 1 comment
Open

Invalid FieldReference in array crashes Logstash #134

Aketzu opened this issue Apr 26, 2019 · 1 comment

Comments

@Aketzu
Copy link

Aketzu commented Apr 26, 2019

  • Version: Logstash 7.0.0
  • Operating System: Linux Debian

I have following in a Logstash pipeline:

filter {
  mutate {
    id => "rename_fields"
    rename => { "770" => "gprs_operator" }
  }
  mutate {
    id => "parse_operator"
    split => { "gprs_operator" => "," }
    rename => { "gprs_operator[0]" => "gprs_operator_name" }
    rename => { "gprs_operator[0]" => "gprs_operator_number" }
    remove_field => [ "gprs_operator" ]
    strip => ["gprs_operator_name", "gprs_operator_number"]
  }
}

So basically it would parse incoming string "elisa, 24405" into name: "elisa", number: "24405". This used to work in previous Elastic versions (somewhere from 5.x to 6.7) and broke in 7.0.

I'm not sure which exact input triggers the problem but it might be empty or nonexistent param. This then triggers org.jruby.exceptions.RuntimeError: (RuntimeError) Invalid FieldReference: 'gprs_operator[0]' which in turn causes whole logstash to exit and restart. (And after a while read the same message again, parse, crash, restart...)

Full crash log in this snippet

@TheVastyDeep
Copy link

Logstash stopped allowing ambiguous field references in 7.x, you should change it to "[gprs_operator][0]". This is working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants