Sunday, May 13, 2012

Hyperic plugin software factory

After many errors and botch-ups, I am persuaded that the best way to develop a plugin is:

a C:\pierre\workspace\HypericAutomation\plugins where to keep in SVN the plugin xml

a C:\pierre\workspace\HypericAutomation\scripts with:

copyAllPlugins.bat:

copy ..\plugins\*-plugin.xml C:\pierre\hypericagent\agent-4.6.5-EE\bundles\agent-4.6.5\pdk\plugins\
copy ..\plugins\*-plugin.xml C:\pierre\hypericserver\server-4.6.5-EE\hq-engine\hq-server\webapps\ROOT\WEB-INF\hq-plugins

stopall.bat

cd C:\pierre\hypericagent\agent-4.6.5-EE\bin
call C:\pierre\hypericagent\agent-4.6.5-EE\bin\hq-agent.bat stop
cd C:\pierre\hypericserver\server-4.6.5-EE\bin
call C:\pierre\hypericserver\server-4.6.5-EE\bin\hq-server.bat stop


startall.bat

cd C:\pierre\hypericagent\agent-4.6.5-EE\bin
call C:\pierre\hypericagent\agent-4.6.5-EE\bin\hq-agent.bat start
cd C:\pierre\hypericserver\server-4.6.5-EE\bin
call C:\pierre\hypericserver\server-4.6.5-EE\bin\hq-server.bat start


and the sequence is:

edit the plugin
stopapp
copyAllPlugins
startall


this because I have the impression that the agent plugin get overwritten when you restart the server


Also, make sure you shutdown and restart your monitored applications whenever your IP address is changed (if you are on DHCP) !

No comments: