Data of type AzureDiagnostics is being dropped due to incorrect format at lineOffset: 247. Exception message: Unexpected character encountered while parsing value: \. Path 'records[247].resultDescription', line 1, position 155215.

merlingadz 5 Reputation points
2025-02-26T10:37:01.24+00:00

The Diag setting of my Postgresql seems to send wrong data to my log analytics workspace:

https://learn.microsoft.com/en-us/answers/questions/1701891/log-analytics-workspace-reports-10-warnings

Data of type AzureDiagnostics is being dropped due to incorrect format at lineOffset: 1. Exception message: Unexpected character encountered while parsing value: . Path 'records[1].resultDescription', line 1, position 1081.

Data of type AzureDiagnostics is being dropped due to incorrect format at lineOffset: 247. Exception message: Unexpected character encountered while parsing value: . Path 'records[247].resultDescription', line 1, position 155215.

Does anyone have a work arround in order to solve this issue ?

Azure Database for PostgreSQL

1 answer

Sort by: Most helpful
  1. Vinodh247-1375 44,801 Reputation points Volunteer Moderator
    2025-02-26T13:57:50.8+00:00

    Hi ,

    Thanks for reaching out to Microsoft Q&A.

    This problem has been reported by other users as well, suggesting it might be related to the diagnostic settings of azure services, including azure database for PostgreSQL.

    Potential Workarounds:

    1. Inspect Diagnostic Settings:
      • Review the diagnostic settings configured for your Azure Database for PostgreSQL. Ensure that the logs are being sent in the correct format and that all necessary categories are selected appropriately.
    2. Validate JSON Formatting:
      • The error message indicates a JSON parsing issue. Verify that the logs being generated and sent to Log Analytics are properly formatted JSON. Malformed JSON can lead to ingestion errors.
    3. Check for Recent Changes:
      • Determine if any recent updates or changes were made to your PostgreSQL instance or its diagnostic settings around the time the errors began. Reverting or adjusting these changes might resolve the issue.
    4. Monitor Log Analytics Workspace:
      • Utilize the _LogOperation function in your Log Analytics workspace to identify and analyze the errors. Running the following query can help pinpoint the source of the issue.

        _LogOperation | where Level in ("Error", "Warning") | summarize arg_max(TimeGenerated, *) by Level, Resource=_ResourceId, Computer, Category, Operation, Details=Detail | project TimeGenerated, Level, Category, Computer, Details

    If nothing worked, raise a support case with azure.

    https://learn.microsoft.com/en-us/answers/questions/1701891/log-analytics-workspace-reports-10-warnings

    Please feel free to click the 'Upvote' (Thumbs-up) button and 'Accept as Answer'. This helps the community by allowing others with similar queries to easily find the solution.

    Was this answer helpful?

    1 person found this answer helpful.

Your answer

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