Not getting "Suspended" jobs to log analytics

Bombbe 1,621 Reputation points
2021-07-29T07:25:29.253+00:00

Hi,
I have issues getting "Suspended" jobs logs / event to log analytics.

I have configured "Diagnostic settings" in my Automation Account
118900-diagnostic.png

Then when I query my jobs events last two mouths I can't see single Suspended job
118991-logs.png

Even though I had Suspended job last night which is the latest one

118938-suspended-job.png

Referring to this doc https://learn.microsoft.com/en-us/azure/automation/automation-manage-send-joblogs-log-analytics#azure-monitor-log-records there should be results type "Suspended". Do somebody maybe more information about this? Are those supported or are these some issues / bugs or have I done or understood something wrong?

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,230 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. tbgangav-MSFT 10,426 Reputation points
    2021-08-02T07:58:40.8+00:00

    Hi @Bombbe ,

    I have tried to reproduce the issue but was able to see Suspended state jobs in AzureDiagnostics kusto table in LAW (Log Analytics Workspace). In past there was a similar case that only affected child jobs on Update Management i.e., Patch-MicrosoftOMSComputer jobs only and all other suspended jobs would be showing the suspended status in Log Analytics AzureDiagnostics table. In that case, as a workaround, below query worked as expected and returned the expected results. Also, for resolution of the issue, product engineering team has identified the bug and has provided the fix.

    AzureDiagnostics   
    | where ResourceType contains "AUTOMATION"  
    | where (ResultDescription contains "Suspended" and  ResultType == "In Progress") or (ResultType == "Failed") or (ResultType == "Suspended")  
    | parse ResultDescription with * 'JobId=' JobId '] to be ' Status '. Status will be discovered from exception.' *  
    | summarize max(TimeGenerated) by RunbookName_s, JobId_g, ResultType, ResultDescription, ChildJobId = JobId, Status  
    

    See if your issue is similar to it. If not, to try diagnosing and troubleshooting the cause of this kind of issue, it would require deep dive with the help of related environment trace logs, etc. So for that, I would recommend to raise a technical support request if you have a support plan. But if you don't have a support plan then please send an email to AzCommunity@microsoft.com with subject being "Attn:Krishna" and your subscription ID and this question's link in the body of the email so that my team will work with you via our technical support channel.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.