How do I alert on every event found in a custom log?

Nick@ST 1 Reputation point
2020-07-15T09:56:36.417+00:00

I have a log file on a server that contains batch job progress and need to alert on every failure. I have setup a custom log to collect the entries and can run queries to find the failures easily enough but when it comes to alerting I'm struggling to find a solution that will actually do what I need.

We seem to be limited to time-based queries e.g. alert if 1 or more failures are found in 5 minutes. This doesn't work when you have something like this:

job1 failed 00:01
job2 failed 00:02

we would get one alert to say a failure has been found but I need two separate alerts for each job.

Is there a way to do this?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,973 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Leon Laude 85,716 Reputation points
    2020-07-15T10:06:37.483+00:00

    Hi,

    Something here might help:

    Custom logs in Azure Monitor
    https://learn.microsoft.com/en-us/azure/azure-monitor/platform/data-sources-custom-logs

    Create, view, and manage log alerts using Azure Monitor
    https://learn.microsoft.com/en-us/azure/azure-monitor/platform/alerts-log

    Best regards,
    Leon


  2. Stanislav Zhelyazkov 22,021 Reputation points MVP
    2020-07-15T12:25:59.257+00:00

    Hi,
    You basically need to alert on per instance. I have described these scenarios on one of my blog posts. Check them out.

    0 comments No comments