Probably the simplest way of handing this in SAM would be to create two separate application templates, each with one of the two TCP Port Monitors that you're trying to monitor. Then using the Unmanage Scheduling Utility, create a regularly scheduled, reoccurring, and rotating manage/unmanage plan that coincides with the switching over between your two hosts.