AppDynamics switched from Semantic Versioning to Calendar Versioning starting in February 2020 for some agents and March 2020 for the entire product suite.

    Skip to end of metadata
    Go to start of metadata

    Related pages:

    Your Rating:
    1 Star2 Star3 Star4 Star5 Star
    29 rates
    With Database Visibility, you can extend monitoring by specifying SQL queries that you want to run on the monitored database in addition to the queries run during normal database activity. You can schedule these custom queries to run at regular intervals and collect the results in a custom metric.

    To specify custom queries to run:

    1. Navigate to Configuration > Custom Metrics > New
    2. Complete the following fields:

    Name: The name you want to name your custom metric. Once you create a custom metric/event, you cannot change its name.

    Custom Query Metric Type: The type of result that you want from the query. 

        • 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.

        • Select the Event Data type to generate custom events whenever the custom query output is non-empty. If you want to be notified when a custom event occurs, you can create a policy that is triggered by that custom event. Custom events are displayed in the Events tab. If the custom query outputs multiple rows, the first 40 rows will be included in the event details. Each row displays a maximum of 5000 characters, including the column separators (|).

    Database Type: The database platform that you want to run the metric on.

    Databases: The database instances that you want to run the metric on. You can run the metric on all database instances of the specified database type, or on specific database instances that you specify.

    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.

    Query Text: The query that you want to execute. If you are creating a custom metric of Metric type, its query must have one of the following return types:

        • 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

    When you create a custom query, it appears for all collectors, but its 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.


    The results are validated only if the database agent version is greater than 4.5.5.

    The following points provide information about using limits when configuring custom metrics:

    • The total number of custom metrics or events that you can create per account is the product of total number of Collectors and dbmon.config.max.custommetric.
      By default, the value of dbmon.config.max.custommetric is 40. You can adjust the limit up to 150 using the dbmon.config.max.custommetric property in the Controller settings.
    • Up to 150 custom metrics can be reported per collector per minute.
    • You can increase the custom metrics limit from the agent configuration properties by using the key, dbagent.custom.metric.reportable.per.server and the Max value 150. For more information about including the key value, see Database Agent Configuration Properties.
    • The maximum limit configured in the agent takes precedence and overrides the maximum limit configured at account level and controller level. Therefore, the priority order is as following:
      1. Agent level configuration
      2. Account-level configuration
      3. Controller level configuration

    Custom metrics are supported for all relational databases: MySQL, Microsoft SQL Server, Oracle, PostgreSQL, DB2, and Sybase.

    View Custom Metrics

    You can view your custom metrics in the following locations:

    • Navigate to DatabasesMetric Browser and expand the database that you want to view custom metrics for.
    • In Databases, open a database instance, then click the Custom Metrics tab.
    • No labels