Technological advances in areas such as communications, computer processing, connectivity, data management are gradually introducing the internet of things (IoT) paradigm across companies of different domain. In this context and as systems are making a shift into cyberphysical system of systems, connected devices provide massive data, that are usually streamed to a central node for further processing. In particular and related to the manufacturing domain, data processing can provide insight in the operational condition of the organization or process monitored. However, there are near real time constraints for such insights to be generated and data-driven decision making to be enabled. In the context of internet of things for smart manufacturing and empowered by the aforementioned, this study discusses a fog computing paradigm for enabling maintenance related predictive analytic in a manufacturing environment through a two step approach: 1. Model training on the cloud, 2) Model execution on the edge. The proposed approach has been applied to a use case coming from the robotic industry.