Software Defined Networks (SDN) are gaining momentum as a solution for current and future networking issues. Its programmability and centralised control enables a more dynamic management of the network. But this feature introduces the cost of a potential increase in failures, since every modification introduced on the control plane is a new possibility for failures to appear and cause a decrement of the quality for the offered service. Following a classical approach, this kind of problems could be solved increasing the number of high skilled human operators, which would dramatically increase network operation cost. Our approach is to apply Machine Learning and Data Analysis for monitoring and diagnosis SDN networks with the goal of automating these tasks. In this paper, we present an architecture for a self-diagnosis service which is deployed on top of a SDN management platform. In addition, a prototype of the proposed service with different diagnosis models for SDN networks has been developed. The evaluation shows encouraging results which will be explored in future works.