How to add and remove slaves from a group with a monitor script?