0

I am looking for a way to monitor and alert when a webjob fails. Is there any tools(Apart from cloudmonix and Newrelic) that can support this?

Hari Subramaniam
  • 1,814
  • 5
  • 26
  • 46

1 Answers1

1

If you're using the WebJobs SDK, you might take a look at the new ErrorTrigger binding that was recently added (details here). It allows you to define a job function that will automatically be triggered when errors reach a certain threshold. Here's an example function that will be called whenever 10 errors occur within a 30 minute sliding window (throttled at a maximum of 1 notification per hour):

 public static void ErrorMonitor(
    [ErrorTrigger("0:30:00", 10, Throttle = "1:00:00")] TraceFilter filter, 
    TextWriter log)
 {
      // Access error details and send an email/SMS, etc.

      // log last 5 detailed errors to the Dashboard
      log.WriteLine(filter.GetDetailedMessage(5));
 }

See the Error Monitoring wiki page for more information.

mathewc
  • 13,312
  • 2
  • 45
  • 53