How to create alerts depend on many factors like architecture you are using (Patrol/BPPM/TrueSight), the KM itself, etc. I will give you some documentation you can go through:
What you mean with "in the event the KM fails"? Every KM has it's own parameters to measure if a collection stops, configuration is wrong, etc, etc, You will need to check for the collectors parameters and set thresholds accordingly.
Hope the documentation will help you, otherwise if you can give us more details of what you are trying to achieve we can be of more help.