Any queriable node in the dbwatch server can have properties.
These can be statically set values or dynamically created.
This document describes the format used to define dynamic properties.

The file header

<properties>
	<asproperties>
		<name>Oracle properties</name>
		<version>1</version>
		<company>dbwatch.no</company>
		<group>no.dbwatch</group>
		<artifactid>oracle_properties</artifactid>
		<version>1</version>
	</asproperties>
	<property>
.......
</properties>

The property declarations

A simple property

A simple property decleration consists of:
- Key decleration. Which specifies which properties the declaration produces.
- Compability tag. Which specifies which queriable nodes this property chould be mounted under. This is specified using dbwql.
- Valid-for tag. Which specifies how long the property value should be cached.
- A series of value tags. Which contains the queries which will be executed during the resolution of this property.

	<property>
		<key>one</key>
		<compatability>instance[databasetype='oracle']</compatability>
		<value engine="sql">select 1 from dual</value>
		<valid-for>24h</valid-for>
	</property>

The key tag.

The key declaration is used to declare the structure, types and names of the output of the property declaration, as well as mapping to the output of value queries.

Nesting keys

Keys can be nested inside each other to create a hierarchy of properties.
A key declaration like this:

		<key name="tablespace" entityType="tablespace" column="NAME"> 
			<key name="allocated" column="ALLOCATED"/>
			<key name="used" column="USED"/>			
		</key>

Can produce a graph like this.

	instance:myInstance
		|--tablespace=>tablespace:myTablespace@instance:myInstance
		|		|-allocated=>allocated:10G@tablespace:myTablespace@instance:myInstance
		|		|-used=>used:1G@tablespace:myTablespace@instance:myInstance
		|
		|--tablespace=>tablespace:myOtherTablespace@instance:myInstance
		|		|-allocated=>allocated:15G@tablespace:myOtherTablespace@instance:myInstance
		|		|-used=>used:2G@tablespace:myOtherTablespace@instance:myInstance

Value mapping

A key can be declared to have a constant value. This can be usefull for structuring data or for creating flags.


    <key name="databasetype" entityType="databasetype" constant="oracle"> 

If not declared constant the key will get its value from the evaluation of the value declarations.
Some value declarations produce tables of values.
If so these will be mapped to the keys by giving the first value to the first key, the second value to the second key and so forth.
This behavior can be configured by setting the column attribute on each key, which wil map each key to the column with the declared name.

So the table:

Name Available Used
MyTablespace 10 1

and the keys:

		<key name="tablespace" entityType="tablespace"> 
			<key name="allocated"/>
			<key name="used"/>			
		</key>

Would produce:

	instance:myInstance
		|--tablespace=>tablespace:myTablespace@instance:myInstance
		|		|-allocated=>allocated:10G@tablespace:myTablespace@instance:myInstance
		|		|-used=>used:1G@tablespace:myTablespace@instance:myInstance

Installable properties

Parameters

    <property>
        .....
        <parameters>
            <parameter name="used_alarm_threshold" default="95" type="int"/>
            <parameter name="used_warning_threshold" default="90" type="int"/>
        </parameters>

← Javascript property / Management →

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment