How to configure multiple sql instance in windows/metricbeat.yml

We have installed metricbeat in windows and configured perfmon entry in windows.yml file to capture SQL instance ( MSSQL ) counters for single instance.
In windows.yml file we hot-coded instance name under "instance_name" and "query" fields(pls refer below sample entries)

module : windows
metricsets:
-perfmon
period:10s
perfmon.counters:
-instance_label: mssql.bufferManager.name
instance_name:SERVERNAME\SQLINSTANCEName1
measurement_label:mssql.bufferManager.bufferCacheHitRatio
query: '\MSSQL$SQLINSTANCEName1:Buffer Namager\Buffer Cache hit ratio'

-instance_label: mssql.accessMethods.name
instance_name:SERVERNAME\SQLINSTANCEName1
measurement_label:mssql.accessMethods..indexSearchSec
query: '\MSSQL$SQLINSTANCEName1:Access Methods\Index Searches/sec'

In metricbeat.yml file also, we hot-coded instance name under "fields" column ,(pls refer below sample entries )
fields:
type:Database
technology:MSSQL
instanceName: SERVERNAME\SQLINSTANCEName1

Multiple sql instance's are running in our server (includes both default as well as named instances), to configure for multiple instances, then I should duplicate all the metricsets again for new instances in windows.yml and configure new instance name in metricbeat.yml ..

Is there any other way to capture perfmon for all sql instances which are running in the server ?
I searched in net, but didnt get any solution. Can any one please help on this ?

@andrewkroh Do you know the answer here? Thank you in advance!

In your case this is not possible because you only can use wildcards for (parent/instance)/counter but not for the object \MSSQL$SQLINSTANCEName1:Access Methods. For example this would work \Access Methods(SQLINSTANCE1)\Index Searches/sec. Then you where able to put an * for the instance.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.