A relational approach to monitoring complex systems