Solaris' SMF and fault management framework is a very good step towards what you're after, plus it's mature and suitable for use in production.
http://www.oracle.com/technetwork/articles/servers-storage-a...
Don't let the XML configuration put you off. I suspect they'd have used JSON if they were doing it again, but it's from the era when XML was the default structured text based format.
If you want to play with this (and IPS as mentioned above), try OmniOS: http://omnios.omniti.com/