In this paper, we focus on the consensus problem for leaderless and leader-followers multi-agent systems with periodically intermittent control. The dynamics of each agent in the system is a linear system, and the interconnection topology among the agents is assumed to be switching. We assume that each agent can only share the outputs with its neighbours. Therefore, a class of distributed intermittent observer-based consensus protocols are proposed for each agent. First, in order to solve this problem, a parameter-dependent common Lyapunov function is constructed. Using this function, we prove that all agents can access a prescribed value, under the designed intermittent controller and observer, if there are suitable conditions on communication. Second, based on the investigation of the leader-following consensus problem, we design a new distributed intermittent observer-based protocol for each following agent. Finally, we provide an illustrative example to verify the effectiveness of the proposed approach.