When Sri Ram reached the shores of Lanka, Ravana deputed two demons Shuka and Sarana to spy on the Vanarasena. They put on the guise of monkeys and decided to spy on the army of Rama. This incident is mentioned in the Yudha Kandha of Ramayana.
The varanasena was so huge that it was impossible to gauge the beginning and end of the army. They tried to gather as much information as possible. The army of Rama was countless. They saw bears and monkeys all around. All of them efficient in the art of warfare.
But their luck ran out when they were spotted by Vibhishana. He at once realized that the two are spies of Ravana and got hold of them.
Shuka and Sarana were trembling in fear and they were taken to the presence of Rama.
Rama was amused by their fear and decided to set them free. He was so generous that he offered them to be taken around the army so that they can learn more about the Vanarasena.
Rama then asked Vibhishana to release the two spies.
Rama asked them to go back to Lanka and inform Ravana that He will be at the doorways of Lanka soon and will attack the city to rescue Mata Sita.