Forum Discussion

praveen_ramesh's avatar
praveen_ramesh
Copper Contributor
Jun 05, 2024

Missing entries in custom log table

We are writing to a custom log table in a few Log Analytics workspaces - these workspaces are targetted by a few different instances of our application (beta/staging/prods, etc).

Interestingly some 3 of these workspaces are missing certain logs while the other 5 or so do have it. There are no exceptions thrown in our asp.net core code where we do a SendMessage to OMS either.

 

Any ideas if something like this is possible and how to troubleshoot/fix?

Thanks

  • Take this:

     

    • Verify Diagnostic Settings Configuration: Ensure that the diagnostic settings are correctly configured to send the desired logs to your Log Analytics workspace. Navigate to the Azure portal, go to the resource for which you want to collect logs, and check the diagnostic settings.
    • Check Log Analytics Workspace Configuration: Verify that the Log Analytics workspace is properly set up and connected to the resource. Ensure that the workspace is not experiencing any connectivity issues or restrictions that might prevent logs from being ingested.
    • Review Access and Permissions: Make sure you have the necessary permissions to view the logs in the Log Analytics workspace. Ensure that the resource sending logs and the Log Analytics workspace are within the same Azure subscription or have appropriate cross-subscription permissions.
    • Use Azure Monitor Logs: Use Azure Monitor Logs to query and search for the logs. Go to the Azure portal, navigate to your Log Analytics workspace, and use the "Logs" section to run queries. You can use a query like AzureDiagnostics | where Category == "Metrics" to search for metrics logs.
    • Check for Delays or Data Retention Issues: Be aware that there might be a delay in log ingestion. Wait for some time and check again. Verify the data retention settings in your Log Analytics workspace to ensure logs are not being deleted prematurely.
    • Log Analytics Agent Troubleshooting: If you're using the Log Analytics agent, run the troubleshooting tool to diagnose any issues. Open the PowerShell prompt as administrator on the machine where the agent is installed, navigate to the directory where the tool is located, and execute the main script.

Resources