Implement upsert for monitors