Monitor Alert Failures

%3CLINGO-SUB%20id%3D%22lingo-sub-2412337%22%20slang%3D%22en-US%22%3EMonitor%20Alert%20Failures%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2412337%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20number%20of%20alert%20rules%20I've%20created%20that%20use%20a%20workspace%20function%20I've%20created.%20I've%20discovered%20if%20the%20function%20is%20deleted%20or%20changed%20in%20such%20a%20away%20that%20the%20alert%20query%20is%20no%20longer%20valid%2C%20the%20alert%20will%20not%20fire.%20Unfortunately%2C%20as%20far%20as%20I%20can%20tell%2C%20there%20is%20no%20way%20to%20know%20if%20a%20scheduled%20query%20alert%20failed%20to%20run%20because%20of%20this.%20I%20read%20that%20alerts%20should%20be%20disabled%20when%20they%20have%20an%20invalid%20query%20and%20reported%20in%20Azure%20Advisor%2C%20but%20that%20doesn't%20seem%20to%20be%20the%20case%20in%20this%20situation.%20There%20also%20doesn't%20appear%20to%20be%20anything%20in%20_LogOperation%20for%20this%20either.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%2C%20I%20need%20to%20either%20be%20able%20to%20write%20a%20query%20that%20can%20somehow%20test%20for%20a%20function%20and%20continue%20to%20run%20if%20it%20is%20not%20valid.%20Or%20a%20way%20to%20send%20an%20alert%20when%20another%20alert%20query%20is%20invalid%20or%20failed.%20Does%20anyone%20know%20if%20it%20is%20possible%20to%20do%20either%20of%20these%20things%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2412337%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAlerts%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Senior Member

I have a number of alert rules I've created that use a workspace function I've created. I've discovered if the function is deleted or changed in such a away that the alert query is no longer valid, the alert will not fire. Unfortunately, as far as I can tell, there is no way to know if a scheduled query alert failed to run because of this. I read that alerts should be disabled when they have an invalid query and reported in Azure Advisor, but that doesn't seem to be the case in this situation. There also doesn't appear to be anything in _LogOperation for this either. 

 

So, I need to either be able to write a query that can somehow test for a function and continue to run if it is not valid. Or a way to send an alert when another alert query is invalid or failed. Does anyone know if it is possible to do either of these things?

0 Replies