Azure / batch-insights

One liners to enable Application insights on azure batch
MIT License
24 stars 16 forks source link

Misleading documentation #11

Closed Aleksanderis closed 6 years ago

Aleksanderis commented 6 years ago

Probably it's not this project issue, but rather BatchLabs (https://github.com/Azure/BatchLabs/issues/1348). However it might be confusing on both sides. Anyway I think people will look for a solution here as well - same as I did it, and didn't find it so easily.

In BatchLabs before I configured AppInsights for my Windows pool, there was a documentation saying how it should be configured (copy-pasting it without any modification).

  1. Add APP_INSIGHTS_KEY environment variable in the start task(App insights instrumentation key)
  2. Add APP_INSIGHTS_APP_ID environment variable in the start task(App insights application ID)
  3. Add os specific one liner in your start task see doc (https://github.com/Azure/batch-insights#ubuntu)

I did everything as described, but AppInsights weren't working. Only after investigating windows.ps1 I saw that environment variable should be called APP_INSIGHTS_INSTRUMENTATION_KEY, not APP_INSIGHTS_KEY. Seems like minor issue, but it's quite hard to spot such ones.

For non-windows setups - it might be not an issue, because it's scheduled in another way, and nodestats.py supports both variants.

timotheeguerin commented 6 years ago

The doc is actually right on this repo, forgot to update in BatchLabs.