Dynamic properties are defined in xml files located in the [dbWatch Server]/server/resources/properties/ catalog.
You cannot add files to this catalogue manually, but import them by placing them in the [dbWatch Server]/server/resources/import_area catalog.
Examples of property definitions:
<property> <key>version</key> <compatability>instance[databasetype='oracle']</compatability> <value engine="sql">select VERSION from v$instance</value> <valid-for>24h</valid-for> </property> <property> <key>active_session_count</key> <compatability>instance[databasetype='oracle']</compatability> <value engine="sql">select count(*) from v$session where status = 'ACTIVE' and username is not null</value> <valid-for>5m</valid-for> </property>
The fields are:
- key : The name that identifies this property (used in dbwql queries).
- compatability : DBWQL query that defines the database instances that this property is compatible with.
- value : An query that defines the property value.
- valid-for : How long this property can be cached. Format xh/xm/xs, examples “24h”, “15m”, “60s”. (hours/minutes/seconds cannot be combined, so “1m 30s” is not allowed and must be written as “90s”).
There can be several value tags, they form a sequence of steps that are executed when resolving the property.