I started to explain here, why instrumentation (though strictly speaking this is not a security feature) is very important to build secure applications.
Which specific technology you use to let someone know that something is wrong, depends on the environment your application runs in. If the admins of the application uses Performance Monitor – then go for PerfMon – if they use network monitoring systems like Microsoft Operations Manager – WMI might be the right solution.
For my instrumentation talk at DevWeek i created a little sample applications which shows how use WMI to publish information and events as well as a WMI consumer that monitors that information.
The provider app publishes the number of failed logons to WMI, and if a user has three consecutive failed logons an event is generated. The consumer periodically polls the WMI class and subscribes to the event. enjoy.