Luan_Ph_m
(luanpm)
October 27, 2019, 5:47pm
1
filter {
ruby {
code => "event.set('test', (event.get('vstorage.space.allocatable') / event.get('vstorage.license.capacity')) * 100)"
}
}
The error is
[ERROR][logstash.filters.ruby ] Ruby exception occurred: undefined method `/' for nil:NilClass
[ERROR][logstash.filters.ruby ] Ruby exception occurred: nil can't be coerced into Float
I don't know where is not correct.
Badger
October 27, 2019, 6:52pm
2
That is telling you thtat the vstorage.space.allocatable field does not exist. You could wrap your filter in
if [vstorage.space.allocatable] and [vstorage.license.capacity] { ... }
I assume your field names really do contains periods and they are not nested fields which you would reference as [vstorage][space][allocatable]
system
(system)
Closed
November 24, 2019, 6:52pm
3
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.