No data appearing when using the Log Analytics HTTP Data Collector API

Microsoft recently released the Log Analytics HTTP Data Collector API which provides a way to send data into Microsoft OMS without requiring an OMS agent. To test this out I decided to start with Stefan’s blog series on how to inject data for stock prices. His blog posts are available at:

During my testing for part 2 of Stefan’s posts I ran into an issue. The data said that it was being sent to OMS (it reported a 202 which according to the documentation available at https://azure.microsoft.com/en-us/documentation/articles/log-analytics-data-collector-api/ was a success. Unfortunately the only fields which appeared in OMS were the “TimeGenerated” and “SourceSystem” fields as shown below.

api01

The next step I took was to “simplify the equation”. To do this I went direct to Brian Wren’s article for a simpler method to write direct to OMS through the API in PowerShell (https://azure.microsoft.com/en-us/documentation/articles/log-analytics-data-collector-api/). Using his PowerShell script I also received a 202 and I confirmed that this was occurring with both attempts to write data to OMS through the API in PowerShell.

api02

To be extremely comprehensive, I also tried Brian’s script writing to a different workspace in case it was a workspace specific issue – no change. This morning I re-tested both workspaces and they were experiencing the same issue.

What fixed it?

On the recommendation of Daniele, I closed all of my browsers and re-opened them to re-test and it now worked like a champ. The results are shown below for both types of data so I am ready to move on to more testing with the API!

Here is a successful set of data from Brian’s PowerShell script.

And here is a successful set of data from Stefan’s PowerShell script.

Summary: If you are not seeing data when you are successfully using the Log Analytics HTTP Data Collector API and it is indicating that it successfully wrote the data to OMS, close your browsers, re-open and re-test.

I hope that this blog post will save someone hours of debugging which I spent yesterday (and hopefully this is only a temporary issue).

Thank you to Stefan Stranger for the excellent blog post series, Brian Wren for a great starter post, and Stefan Roth for confirming that my results did not indicate that I had lost my sanity. Finally, thank you to Stan and Daniele for the browser restart recommendation.

Tags:

2 Comments

  1. kizer July 20, 2017
    • Cameron Fuller July 24, 2017

Leave a Reply