I am not aware of any such capability but this would make for a good feature request. RHQ auto imports storage nodes and their host platforms. There have been some discussions about how we might generalize this functionality to make it available to other resource types. Feel free to write a feature request at https://bugzilla.redhat.com/enter_bug.cgi?product=RHQ%20Project.
I kind of figured there was no simple way to do it at the moment - it would be great if for instance there were some things you could create alerts for at the RHQ Server or Agent level.
For instance "if discovery queue != 0 send an email with resource list". I might create an ER but it would be good to know what to actually ask for - would this be in the server or the agent for instance?
Thanks for the examples though. What I would want is to just alert when resources are in the queue - not autoimport them. The API is probably the way to go - but I am unsure if resources are actually in the inventory before they are imported, and hence you could not use the API to query them?
They are in the inventory.
You can e.g. query for them in the REST-api with the "New" state. See e.g. org.rhq.modules.integrationTests.restApi.ResourcesTest#testResourceQueryNewStatus