Database Visibility extends monitoring by specifying SQL queries to run on the monitored database and the queries run during normal database activity. You can schedule these custom queries to run on regular intervals and collect the results in a custom metric. See Database Custom Metrics Window.
To specify custom queries to run:
Select the Metric type to generate metrics for which health rules can be defined. Metrics of this type are displayed in the Metric Browser or in the Custom Metrics tab of each collector.
Schedule: The time interval at which you want to run the query. For metric type custom queries, the metric value reported in between the specified intervals is the value observed in the previous query execution.
The timeout for configured custom metric depends on the frequency of running the query. This table provides the timeout details based on the time interval:
Interval (minutes) | Timeout (seconds) |
---|---|
1 | 10 |
5 | 15 |
10 | 30 |
30 | 60 |
60 | 120 |
360 | 180 |
720 | 300 |
1440 | 300 |
Positive integer. For example, the query below returns a positive integer.
SELECT COUNT(*) FROM employees |
String and positive integer. For example, the query below returns a string and a positive integer.
SELECT name, salary FROM employees |
Custom queries appear for all collectors, but the data only reflects the collector that you created it for. You can test the semantics of the query and also validate the results by clicking the Test Query button.
Custom query results are validated if the Database Agent >= 4.5.5. |
The following points provide information about using limits when configuring custom metrics:
dbagent.custom.metric.reportable.per.server
and the Max
value 150. See Database Agent Configuration Properties for information about the key value.Custom metrics are supported for all relational databases: MySQL, Microsoft SQL Server, Microsoft Azure SQL, Oracle, PostgreSQL, DB2, SAP HANA, and Sybase.
You can view your custom metrics in the following locations: