i am attempting to take a field and increment the number by one. I had assumed this would be an easy task but it appears to be not so trivial. I have resorted to using the ruby filter and attempting to do this here:
ruby{
code => '
event.set("myLargerNumber", ("myNumber".to_i + 1))
'
}
The issue is "myLargerNumber" is being set to 1, not to "myNumber" plus 1. In other words every rendition causes "myLargerNumber" to be "1". If i change the code as follows, it gets set to "2" every time.:
ruby{
code => '
event.set("myLargerNumber", ("myNumber".to_i + 2))
'
}