This paper shows an implementation of an Industrial Internet of Things (IIoT) system designed to monitor electric motors in order to detect operating anomalies. This system will also be the basis for a future predictive maintenance system. The design and testing of the prototype, developed using multisensor microcontrollers and single-board computers as gateways, are presented. Each microcontroller gathers real-time data about the vibrations and temperature of an electric motor. The IIoT prototype has been designed using low-cost hardware components, open-source software and a free version of an IoT analytics service in the cloud, where all the relevant information is stored. During the development of this prototype, vibration analysis in the frequency domain was carried out both in the microcontroller and in the gateway to analyse their capabilities. This approach is also the springboard to take advantage of edge and fog computing as complement to cloud computing. The prototype has been tested in a laboratory and in an industrial dairy plant.