Jigar Sangoi
Jigar Sangoi

Reputation: 159

Unable to get Process CPU in Azure application insight

I installed application azure insight in my .net mvc application(On VPS server) by following this configuration But I am having issue with some counters like process CPU, Total CPU% etc.

While monitoring application in Live stream I can see request rate, request duration and request failure but committed memory and CPU% are empty

Same with processor time & process CPU in metrics explorer metric explorer

please suggest if I done wrong while configuration.

Upvotes: 3

Views: 1092

Answers (1)

Ben Croughs
Ben Croughs

Reputation: 2644

we had a sort a like issue, the problem was that the user from the application pool did not have access to PerfMon

so the first solution was this on our dev servers: add everyone to the "Performance Monitor Services" on our dev server, and the the CPU and committed memory became visible in AI

enter image description here

i know giving everyone is not that correct, but we will look into it further, a better approach is to use the IIS_APPPool user

We ended up doing this during deploy step in our ymal

 - powershell: |
      try {
          Add-LocalGroupMember -Group "Performance Monitor Users" -Member "IIS AppPool\${{ parameters.WebsiteName }}" -ErrorAction Stop
      } catch [Microsoft.PowerShell.Commands.MemberExistsException] {
          Write-Warning "$member already in $group"
      }
    displayName: "🦸‍♂️ Add IIS User to Performance Monitor Users" 

Upvotes: 3

Related Questions