Shared Files for Database Performance Analyzer
  • CPU Utilization for Postgres on Linux/Unix

    This custom metric executes the cat /proc/loadavg command on a Linux/Unix system to retrieve CPU usage information. It parses the output to extract the first column of the output which represents the 1 min load avg of the server. To set this up, create the function on each instance. Paste the provided SQL script (only the SELECT at the bottom of the attached script) into a custom single value metric that runs every minute. Here is an example of the metric definition:
  • Postgres Unarchived WAL File Percent

    This alert is a combination of the alerts in Postgres Unarchived WAL Files and Postgres Total WAL Files to create a percentage of unarchived WAL files. To create this metric in DPA, create a new custom metric of type Single Value and make it look similar to this example:
  • Postgres Max Connection Percent

    PostgreSQL has a system parameter called max_connections , which defines the maximum number of allowed connections to the database instance. This custom metric will compute the percentage of active connections relative to the max_connections setting. To create this in DPA, create a custom metric of type Single Value and make it look similar to this example:
  • Postgres Unarchived WAL Files

    This metrics count the number of "ready" files in the pg_wal directory. These are files that have been completed and are ready for archiving to another system, or to be used by replication. An excessive number of files may indicate a problem with the archival processes. To create this metric, create a custom metric of type Single Value and make it look similar to this example:
  • Postgres Total WAL Files

    This custom metric collects the number of total WAL files present on the system. There is also a custom metric that counts the number of "unarchived" which is important as well. To create this custom metric, create a metric of type Single Value and make it look similar to this example:
  • Azure SQL Database Metrics (Additional)

    DPA comes with many out of the box metrics for Azure SQL Database, and here are some additional ones that you can add to your DPA installation. The attached script contains a query for each of the metrics below. Next to each metric will be the word "single value" or "rate" which is associated with the Type of Metric Query: CPU Metrics CPU Core Count Disk Metrics Page Reads / sec Page Writes / sec Memory Metrics Buffer Cache Size Log Bytes Flushed / sec Page Life Expectancy...
  • MySQL Max Connection Percent

    DPA collects the total number of connections metric out of the box, but a more important metric in my opinion is how close are we to maxing out connections. This metric is a simple calculation of the current number of threads connected divided by the maximum connections allowed system parameter. Create the custom metric as a single value metric and make it look similar to this example:
  • Oracle Data Guard Log Apply Gap Metric

    This custom metric measures the number of redo log files that have been archived in the primary database minus the log files that have been applied in the standby. If you want to get alerted on this, configure a Resource metric alert on top of this custom metric. Note : when running this against an Oracle database that is not part of a Data Guard configuration, it will always return 0. To create this metric in DPA, make it look similar to this:
  • Oracle PGA Utilization

    This custom metric can be used to how how much of the PGA is currently being used. Note that even when this metric goes high, if automatic memory management is turned on, Oracle may resize the PGA as needed. Create a custom metric in DPA and make it look similar to this example:
  • Oracle Hard Parses per Second

    Introduction This custom metric measures the number of hard parses per second during the execution interval in DPA. A hard parse occurs when a SQL has to be loaded into the Oracle Shared Pool. Higher values of hard parses occur when many different SQL statements are being executed. Causes When this value spikes, review the queries that executed within the interval. If your execution interval is 1 minute, review queries from the data point backwards by 1 minute. For example, if the high data...
  • MySQL CPU and Memory Utilization

    Description CPU and Memory utilization are not base metrics in DPA's Resource tab for MySQL because the data is not available from within the database. However, by loading data periodically from the O/S into a table, we can make CPU and Memory information available so DPA can query it. If your MySQL database is running on Linux, there is a file name /proc/loadavg that provides CPU information, and /proc/meminfo that provides Memory information. Note: if you are using Windows, Performance Monitor...
  • Oracle Monitoring - Collecting Service Name (and others)

    Disclaimer Note: the topic of this post is for advanced Oracle users only. If done incorrectly, you can break the DPA monitoring for the instance and you will not be supported. However, at the bottom of the attached script are two commands to help you recover back to default installation. Also , once these changes have been done, this change will not officially be supported by SolarWinds technical support. For questions and help with this, please leave comments and someone will get back to...
  • CPU Utilization for Azure SQL Database using vCore Purchasing Model

    DPA currently collects and displays DTU metrics for Azure SQL Databases. However, if you're using the vCore purchasing model, those metrics are not present and will show as blank in DPA. To get the CPU Utilization metrics for your vCore system, here are some screenshots and queries that you can use as Custom Metrics in DPA. The DMV provides not only database level CPU utilization, but also exposes instance level CPU utilization as well for the times when you have multiple databases on a single server...
  • SQL Server - O/S CPU Utilization on Linux Server

    DPA currently collects O/S CPU Utilization from the dm_os_ring_buffer DMV with a query like this: SELECT top 1 100 - systemidle FROM (SELECT record.value('(./Record/@id)[1]', 'int') AS record_id, record.value('(./Record/SchedulerMonitorEvent/SystemHealth/SystemIdle)[1]','int') AS systemidle, record.value('(./Record/SchedulerMonitorEvent/SystemHealth/ProcessUtilization)[1]', 'int') AS sqlprocessutilization, timestamp FROM (SELECT timestamp, CONVERT(XML, record) AS record FROM sys.dm_os_ring_buffers...
  • Collect Azure SQL Elastic Pool Metrics

    Introduction Note: The attached code was used to accomplish the steps in the Database Configuration section below, which is a prerequisite to the DPA alert configuration. Currently, when DPA monitors databases within an Azure Elastic Pool, each of the databases are registered independently. This means that DPA collects metrics for each of the databases individually. However, some users have also expressed the desire to view higher level Elastic Pool metrics within DPA as well. We have found a...
  • SQL Server Replication Metrics (11 metrics)

    For monitoring SQL Server replication, here are 11 metrics I often add into DPA as custom metrics. Some of these are optional and would only apply if you are using, for example, merge replication. Add each one as a separate custom metric (Options > Custom Metrics) in DPA and make them look similar to this example. Note that not all of them will have thresholds as this one does. I like to add thresholds on the latency metrics and the merge conflicts metric, so that I can also alert on them:
  • DB2 Database Size (MB)

    Within Db2 databases, the system table SYSIBMADM.TBSP_UTILIZATION stores information about tablespaces, and specifically their sizes. All rows can be added together to arrive at the size for the entire database. Once this metric is in place, here is a custom alert that can be used to notify you of excessive growth: https://thwack.solarwinds.com/content-exchange/database-performance-analyzer/m/custom-alerts/3453 To create the Custom Metric in DPA, click on Options > Custom Metrics and clik the...
  • Postgres CPU and Memory Utilization

    Description CPU utilization is not a base metric in DPA's Resource tab because the value is not available from within the database. However, by using Foreign Data Wrappers (FDW) we can make host information available to the database so that DPA can query it. If your Postgres database is running on Linux, there is a file name /proc/loadavg that provides CPU information, and /proc/meminfo that provides Memory information. Note: if you are using Windows, Performance Monitor (perfmon) can be used...
  • TempDB Contention

    Description Contributed by Spaceman Checks for tempdb contention. Had an issue recently caused by this, other metrics didn't highlight much of a problem other than high pagelatch waits. Resolved by adding more data files to tempdb in my case (other options are available though! see The Accidental DBA (Day 27 of 30): Troubleshooting: Tempdb Contention - Paul S. Randal ) Metric Definition To create the metric, click on Options > Custom Metrics and configure similar to the attached screenshot...
  • SQL Server Oldest Open Transaction

    This metric tracks the session with the oldest open transaction and returns the date difference in seconds. If you want to alert off this metric, ensure the thresholds are configured. Query Text SELECT ISNULL(MAX(DATEDIFF(second, start_time, CURRENT_TIMESTAMP)), 0) FROM sys.dm_exec_requests WHERE open_transaction_count > 0