How to write irule to ping a host and bring down the pool

I need to create a irule which should ping a host (a VIP on another LTM) , if ping response fails the pool ( irule to be attached to ) is brought down.

iRule work is not to check server status. Create pool with icmp monitor and call via irule and take decision.