how can I define the availability check interval in an agent plugin, so that it is set during installation and does not need to be changed using the GUI?
On the RHQ Homepage under Design - Availability Checking it mentions the following:
Previously an availability check was performed on all resources with a 5 minute interval, and all resources were checked in one pass. Now, availability checking is performed based on the Availability metric schedule.
and a few lines below:
All non-platform resources now have a built-in Availability metric. The new Availability metric schedule will be added automatically to all types in updated plugins.
But how can I set the Availability metric schedule in the plugin descriptor or in the plugin code?
In your plugin, define rhq.availability as a metric, and the default interval.
testing/src/test/resources/META-INF/rhq-plugin.xml: <metric property="rhq.availability" defaultInterval="60000" defaultOn="true" category="availability"/>
You can also override the setting on the server using the Metrics Template screen under Admin.