1
votes

I want to insert the custom performance counter and performance counter data through Azure Application Insights SDK to Cloud Services, Virtual Machines performance counters.

How can we use Application Insights SDK to add performance counter data to performance counters for virtual machines. Can we do this using Application Insights?

1
There is a sample of Application Insights for Java which you can refer to, please see github.com/Microsoft/ApplicationInsights-Java/tree/master/….Peter Pan

1 Answers

0
votes

See in Customize performance counter collection.

For example, for JMX PC you can update ApplicatonInsights.xml with):

<PerformanceCounters>
  <Jmx>
    <Add objectName="java.lang:type=ClassLoading" attribute="TotalLoadedClassCount" displayName="Loaded Class Count"/>
  </Jmx>
</PerformanceCounters>

For exmaple, for Windows PC you can update ApplicatonInsights.xml with:

<PerformanceCounters>
  <Windows>
    <Add displayName="Process User Time" categoryName="Process" counterName="%User Time" instanceName="__SELF__" />
  </Windows>
</PerformanceCounters>

You can read the parameters description in the article.