Smart factories build on cyber-physical systems as one of the most promising technological concepts. Within smart factories, condition-based and predictive maintenance are key solutions to improve competitiveness by reducing downtimes and increasing the overall equipment effectiveness. Besides, the growing interest towards operation flexibility has pushed companies to introduce novel solutions on the shop floor, leading to install cobots for advanced human-machine collaboration. Despite their reliability, also cobots are subjected to degradation and functional failures may influence their operation, leading to anomalous trajectories. In this context, the literature shows gaps in what concerns a systematic adoption of condition-based and predictive maintenance to monitor and predict the health state of cobots to finally assure their expected performance. This work proposes an approach that leverages on a framework for fault detection and diagnostics of cobots inspired by the Prognostics and Health Management process as a guideline. The goal is to habilitate first-level maintenance, which aims at informing the operator about anomalous trajectories. The framework is enabled by a modular structure consisting of hybrid series modelling of unsupervised Artificial Intelligence algorithms, and it is assessed by inducing three functional failures in a 7-axis collaborative robot used for pick and place operations. The framework demonstrates the capability to accommodate and handle different trajectories while notifying the unhealthy state of cobots. Thanks to its structure, the framework is open to testing and comparing more algorithms in future research to identify the best-in-class in each of the proposed steps given the operational context on the shop floor.