問題情形
為了使用Application Insights也可以監控Azure VM中的相關性能資料,如CPU, Memory,IIS Reuqest等資訊,可以在VM中開始一個一個擴充插件: Azure Monitor Application Insights Agent
在Azure Application Insights的最終效果如下圖(可直接在Live Metrics頁面檢視VM中的實時名額,Incoming Requests/Outgoing Requests/Overall Health):

操作步驟
1) 在Azure中建立VM并遠端登陸 (RDP)到虛拟機中啟用IIS。這是安裝Azure Monitor Application Insights Agent的前提條件
2) 在Azure VM的門戶頁面中,選擇擴充(Extensions )頁面,選擇添加擴充
3) 選擇Application Insights Agent. 然後把Application Insights中複制出連接配接字元串,資料到頁面中
填入Applicaiton Insights的連接配接字元串
4)完成以上步驟後,等待安裝成功。即可回到Applicaiton Insights頁面中,檢視實時資料(第一次檢視可能需要等待幾分鐘時間) 或是Logs中檢視Requests表中資料。
當在複雜的環境中面臨問題,格物之道需:濁而靜之徐清,安以動之徐生。 雲中,恰是如此!