Adding XXXX in a column through logstash

Use mutate

mutate { gsub => [ "someField", "[0-9]{5}$", "xxxxx" ] }