title: Setting up data and options used by Azure Log Analytics with API Management
body: <p>I have questions on using Azure Log Analytics for API Management. I cannot find more information on Azure Log Analytics with API Management.</p>
  
  <p>Questions</p>
  
  <ol>
  <li><p>What data is Log Analytics based on by default?</p></li>
  <li><p>Do I need to specify or turn on what data Log Analytics is based on? Screenshot of Log Analytics tool are below </p></li>
  <li><p>What data is in each field in red box under Log and Metric is on the screenshot below?</p></li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/W916m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W916m.png" alt="enter image description here"></a></p>
  
  <p>Below are two ways to add data to Log Analytics with APIM.</p>
  
  <ol>
  <li><p>API within APIM</p>
  
  <p>API under APIM instance -> Settings -> Azure Monitor -> enable it -></p>
  
  <p>Once it is enabled, it seems all the API instances under the APIM instance will use the settings. That is, data from ALL API instances instead of the one API instance will be added to Log Analytics.</p>
  
  <p>Is this correct?</p></li>
  <li><p>Under Diagnostics setting</p>
  
  <p>APIM instance -> Diagnostics settings -> Add diagnostic setting</p>
  
  <p>This will show up the screenshot above.</p>
  
  <p>Below is all tables shown under Log Analytics tool</p>
  
  <p><a href="https://i.stack.imgur.com/Mckis.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Mckis.png" alt="Log Analytics Tool"></a></p></li>
  </ol>
  
  <p><a href="https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-app-insights" rel="nofollow noreferrer">How to integrate Azure API Management with Azure Application Insights</a> has no info on Log Analytics.</p>
  
  <p><a href="https://docs.microsoft.com/en-gb/azure/azure-monitor/log-query/get-started-portal" rel="nofollow noreferrer">Get started with Azure Monitor Log Analytics</a></p>