vCenter

 View Only
  • 1.  Adding alerts to resource using HQ UI plugin

    Posted Aug 14, 2008 11:45 AM
    Hi

    I am trying to add an alert to a resource (platform,server and service) within one of my groovy hq UI controllers. I can find the resources I am interrested in by using the groovy APIs but I have not been able to figure out how to add a alert to a resource once I have found it!

    Can anyone please point me in the right direction to be able to add alerts to a resource using HQ UI plugin?

    Thanks


  • 2.  RE: Adding alerts to resource using HQ UI plugin

    Posted Aug 14, 2008 07:03 PM
    Did you check the pointers in the doc? http://support.hyperic.com/display/hypcomm/HQU+API+Summary

    Also, one HQU plugin that comes to mind is the OpenNMS one that I think covers what you are looking for:

    http://support.hyperic.com/display/hypcomm/HQU+OpenNMS

    You can find other examples there on the HyperFORGE too. http://support.hyperic.com/display/hypcomm/HQU+Forge ... and of course, we'd love to see your script as a contribution when you are done with it! :)


  • 3.  RE: Adding alerts to resource using HQ UI plugin

    Posted Aug 15, 2008 09:24 AM
    Thanks for the reply!

    Yes, I did check out the documentation and all the available Groovy APIs. The closest API to my needs was the AlertHelper API but it did not have any methods to add alerts, only to find them.

    I also did look at all the example plugins (including openNMS, which primarily exports platforms to openNMS and sends alerts to openNMS, I did not notice any code that defines a new alert).

    Unfortunately none of the examples had any code defining a new alert and adding it to a resource! I have started to look at the backend API, and have grepped through it for some time, but have not been able to find methods that would allow me to add an alert to a resource.

    Can anyone point me in the right direction in the backend APIs?

    When I'm done I will definitely add the new plugin to the hyperforge!


  • 4.  RE: Adding alerts to resource using HQ UI plugin

    Posted Aug 15, 2008 09:47 PM
    So here is the straight p00p:

    There are no helper APIs for this. What you'll need to do is to check out the HQ source and look at the Alert Definition Manager code. Then you'll need to use Groovy to call the internal HQ calls. Supposedly there are examples in the HQU developers guide which is here: http://support.hyperic.com/download/attachments/11468844/HQU+Manual.pdf?version=1

    Full disclosure - didn't search for the specific examples but thats where I was pointed...