Splunk Search

MS SQL Server Perfmon multiple Install instances

bmacias84
Champion

I am trying to create generic MSSQL for data collection. While installing SQL you are able to use the DEFAULT_INSTANCE or create NAMED_INSTANCES. Creating NAMED_INSTANCES allows you to have multiple MSSQL installation running on different ports.

With a DEFAULT_INSTANCE the counters will look like:


[perfmon://SQLServer:GeneralStatistics]
counters = User Connections
disabled = 0
interval = 60
object = SQLServer:General Statistics
index = <some_index>

On a NAMED_INSTANCE the counters will look like:


[perfmon://<NAMED_INSTANCE>:GeneralStatistics]
counters = User Connections
disabled = 0
interval = 60
object = <NAMED_INSTANCE>:General Statistics
index = <some_index>

NAMED_INSTANCE could be foo,bar, MSQL$HELLO, or MSQL$THREEHUNDRED. I would like to wild card all objects SQL objects for General Statistics for example. I do know I can create a WMI query quite easily to complish this but I would prefer using perfmon for constancy. Also trying to avoid creating stanzas for each instance of SQL.

Cheers

Tags (3)
0 Karma

ahall_splunk
Splunk Employee
Splunk Employee

You can do this by wildcards in the object. This is a regular expression, so something like the following in Splunk Universal Forwarder 6.0 and beyond:

[perfmon://GeneralStats]
counters = User Connections
interval = 60
object = [^:]+:General Statistics
index = perfmon
disabled = 0

bmacias84
Champion

Thats good to know, but does that work for virtual (shared) node in an active active SQL 2012 env. The perfmon counters for the virtual and physical node are different if you collect through the virtual node vs the physical node.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...