Essentially, I have some integer fields coming in. But if the system sending the JSON doesn't get an integer value, it can either pass a "-" or "(empty)".
Fields with these values are of no use to me. So I would like to simply refrain from sending them to Elastic.
Have a look at the prune filter.
And as a second part, what would happen if I used the
mutate convertto cast these to integers?
By the look of the code you'd get an exception in the log. It should still let the message through, I think. If that causes the event to be dropped I'd say it's a bug. It would be easy to try, of course.