Element size differs


(Lukas Tilch) #1

Helllo,

when I try to parse a XML document with logstash i get an error

The data seems to be consistent, the original document has about 2XXX data fields. but i got the error
Ruby exception occurred: element size differs (393 should be 394)
after that I split the document in blocks with 100 data fields, becaus i figured it might be to memory intense
as a result i got
Ruby exception occurred: element size differs (61 should be 62)
Ruby exception occurred: element size differs (97 should be 98)
Ruby exception occurred: element size differs (84 should be 85)

filter {
  xml {
  source => "message"
  store_xml => "false"
  force_array => "false"
  #force_content => "true"
      xpath => ["/memberrevisions/memberrevision/ID/text()","ID"]
      xpath => ["/memberrevisions/memberrevision/author/text()","author"]
      xpath => ["/memberrevisions/memberrevision/desc/text()","desc"]
      xpath => ["/memberrevisions/memberrevision/date/text()","date"]
      xpath => ["/memberrevisions/memberrevision/revision/text()","rev"]
      xpath => ["/memberrevisions/memberrevision/name/text()","name"]
      xpath => ["/memberrevisions/memberrevision/path/text()","pathe"]
  }

  ruby {  code => "
  event.set('mksrevision', [event.get('ID'), event.get('author'), event.get('desc'), event.get('date'), event.get('rev'), event.get('name'), event.get('pathe')].transpose)
  array_of_hashes = event.get('mksrevision').collect { |i| {'id' => i[0], 'author' => i[1], 'desc' => i[2], 'date' => i[3], 'rev' => i[4], 'name' => i[5], 'pathe' => i[6]}}
  event.set('mks', array_of_hashes)
  "}
  split {
        field => "mks"
  }

  ruby {
      code => "
        event.get('mks').each {|k, v|
          event.set(k,v)
        }
        event.remove('message')
      "
    }

as is said, the data seems to be consistent
is there any way to get a more detailed log?


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.