This article covers questions over how to configure custom counters collection and where you can check out them in SEViewer as well as how to transfer counters to Advisor in order to make them available for AVIcode reports.
You know it is an usual practice when developers implement additional counters for their apps. These counters may be used for estimating system or application load, application activity, resources utilization, statistics aggregation, to monitor states of OS, hardware, services, drivers and so on. Along with events being collected by monitoring system, performance counters will be another brick in building a comprehensive view on the problems of your applications. Thus custom counters configuration turns to be a rather common task one faces with while setting up AVIcode solution.
In this article I’ll demonstrate how to collect the custom metrics with AVIcode Agent and where you can find them in SEViewer and get in SCOM after. Finally we’re going to generate Advisor report based on collected data.
Out of box AVIcode Agent is designed to collect the set of hardcoded counters. Some of them are AVIcode-related (as ones from “.NET Apps†category registered during Agent installation), some of them are system (Process, Memory, Processor, CLR, etc). You can find collected counters on “Performance counters†tab in details of the most events (though sometimes this tab is missed, but this is another story 😉 ). Often it’s more than enough to analyze the problem occurring, but assume that’s not the case and we want our own counters to be grabbed. And we may easily extend this set of counters with desired metrics according to actual needs.
Now we are to decide what counters should be gathered in addition to the standard ones. Suppose we want the “First†counter from just registered “ISCounters†category:
-
- Firstly we need to look through “PerfCounterMonitor.config†(C:\Program Files\AVIcode\Intercept\Agent\v5.7.491\Configuration\Standard) to check whether desired counter has already been added there. This configuration file contains a lot of (mostly system-related) metrics defined. Not all of them are enabled to be collected by default, but can be easily enabled if needed. If you find appropriate counter you need in the list, you can skip the next step. In this case, since we want to gather our custom counter, we have to add it to config explicitly.
- Define the counter in “PerfCounterMonitor.configâ€:
Each counter has the following attributes list:
ID: ID of counter definition (should be unique for whole configuration file).
object: performance counter category.
name: performance counter name (should belong to performance counters category defined in object attribute).
edit: true, if this performance counters object supports instances (multiple occurrences of one counters category).
measure: unit of performance counter. Default value is “no suffix”. The value of this attribute is used for consolidation on SEViewer server.Having finished with configuration we need to save file and restart “Intercept Service†responsible for counters collection.
- Now it’s time to configure new counter collection. Custom counters are added only on computer level and not mapped to application or process instance.Open MMC Console, navigate to “Properties†of “Applications†node. Switch to “Performance Counters†tab and click “Advanced…†button:
In appearing dialog click “Add…†and specify new just created counter (say we want to get it for both statistical trends in SEViewer (state counters) and with received AVIcode events (troubleshooting counters)):
Congratulations, you have just configured your first custom counter!
- Having generated some AVIcode events and waited for performance counters collection interval, we can browse SEViewer and check out our metrics.
Our counter has been set for both state and troubleshooting monitoring types.
Well, here it is (it has zero value since it’s never populated).Troubleshooting counters view
State counters view
- If you want to view the custom counters metrics in SCOM you can easily add it for specific monitored application through AVIcode templates wizard:
After counters aggregation interval it will appear on the corresponding “Performance†view:
- And the final step we’re supposed to follow is to transfer the counter to Advisor to make it available for reporting.Open “SEViewer.config†(C:\Program Files (x86)\AVIcode\Intercept\SEViewer) and navigate to “Aggregation†task in section. Follow provided instructions to add your performance counters to reports. For example:
Save file and restart “Intercept Reporting†service to initialize data transferring.
Probably the most evident report to be generated in our case is “Custom Counter Analysis†from “Problem Analysis Reports†group. This report provides daily, weekly and monthly insight on chosen specific performance counters. Among available counters we can notice our own one. Let’s generate report based on its data:
In the ending I should add a few words about custom counters in SCOM 2012 APM. Actually this won’t take much: custom counters collection is not configured on APM side anymore, but you can grab them using standard SCOM functionality (by creating a rule collecting metrics for some object and mapping data to views and monitors).
Today we learned how to monitor custom performance counters by AVIcode. This will help you to extend monitoring by making it more informative from the standpoint of your custom application design.
See you online!