The paper describes a "moving sensors" concept, which considers the possibility of autonomous diagnostic devices to interact, data transfer and change their position in space. The idea is based on a combination of multi-agent technologies, mobile robotics and the Internet of Things. To solve the problem of identification time optimization and minimum of faults it is proposed to introduce a multi-agent architecture with software autonomous agents capable of load balancing, risk identification and routing optimization. The concept is illustrated by an example of distributed diagnostics at railways.