I'm trying to monitor for a specific condition in my application whereby it sometimes loses access to its database. When it does this an event is logged into the Windows Application Event log. When it regains connection another event is logged.
I know how to create an event log monitor for tracking a specific event but I need help logically creating a monitor that will show the system as down if the connection loss event occurs, but then returns to normal when the recovery event occurs. From what I can see this is not possible with the default windows event log component monitor for 2 reasons.
1) if the original event falls outside of the polling interval it will no longer be considered "found" thus no issue detected even if the servicer has been down for quite some time, and
2) I see no way to tie two different events together in said monitor
Am I going to have to build something custom for this? E.g. Powershell?