How to integrate an appserver from command-line
This can be done for JavaEE websphere, tomcat, jboss or weblogic 5.8.x agents and it is recommended to reading the JavaEE Systems Installation and Configuration Guide, Integrating Agents from the Command-Line
Here is an example of how this would be done.
1. Get a list of available JavaEEDM run fglcmd -cmd JavaEEDM:list
In the below example, this lists 2 agents. The first one is active but not up-to-date so you could not perform remote integration, and the second one (admsup-wl92) is active and up-to-date.
fglcmd -cmd JavaEEDM:list
admsup-jboss:
ID Active? gar up-to-date? Agent Name:
8 Y N JavaEEDeploymentManager_on_admsup-jboss
admsup-wl92:
ID Active? gar up-to-date? Agent Name:
5 Y Y JavaEEDeploymentManager_on_admsup-wl92
2. Type the following command to request a list of possible integrations from a specific JavaEEDeploymentManager instance:
fglcmd -cmd JavaEEDM:query -agentId #
If I wanted to integrate from the JavaEEDM agent running on admsup-wl92 for example :
fglcmd -cmd JavaEEDM:query -agentId 5
About to invoke ReportSupportedOperations([kBagnsY2SMP4WLt]) on agent JavaEEDeploymentManager_on_admsup-wl92
Invoked, waiting for results
… ## there’s some misc output noise here
2012-03-22 10:21:55.376 [kBagnsY2SMP4WLt] Operations supported for callback IntegrateAppServer: 14
ServerType Integration Parameters
---------- ----------- ----------
tomcat CatalinaScripts CATALINA_HOME, [QuestAgentOpts], [QuestPreinstOpts]
websphere DomainManagerScripts PathToProfile, PathToCore, [QuestAgentOpts],[QuestPreinstOpts]
websphere NodeScripts PathToProfile, PathToCore, [QuestAgentOpts],[QuestPreinstOpts]
websphere StandaloneServerScripts PathToProfile, PathToCore, [QuestAgentOpts],[QuestPreinstOpts]
websphere DomainManagerService ServiceName, [QuestAgentOpts], [QuestPreinstOpts]
websphere AdminAgentScripts PathToAdminAgentProfile, PathToCore, [QuestAgentOpts],[QuestPreinstOpts]
websphere NodeagentService ServiceName, [QuestAgentOpts], [QuestPreinstOpts]
websphere ServerService ServiceName, [QuestAgentOpts], [QuestPreinstOpts]
jboss ServerRunScript JBOSS_HOME, [QuestAgentOpts], [QuestPreinstOpts]
weblogic startWLS WL_HOME, [QuestAgentOpts], [QuestPreinstOpts]
weblogic All-WL_HOME-Scripts WL_HOME, [QuestAgentOpts], [QuestPreinstOpts]
weblogic startManagedWebLogic WL_HOME, [QuestAgentOpts], [QuestPreinstOpts]
weblogic startNodeManager WL_HOME, [QuestAgentOpts], [QuestPreinstOpts]
weblogic startWebLogic DOMAIN_HOME, [QuestAgentOpts], [QuestPreinstOpts]
[] indicates optional parameter
3. Once you have the usage, you would run the JavaEEDM:integrate command with the proper usage to instrument your environment. Note: assume depending on the OS you may or may not need quotes and in some cases you might have to use URL encoding for special characters.
In this example, I am integrating a WebLogic Domain Startup Script
fglcmd.bat -cmd JavaEEDM:integrate -agentId 5 -params "ServerType=weblogic;Integration=startWebLogic;DOMAIN_HOME=C:\Oracle\Middleware\wlserver_10.3\samples\domains\wl_server"
About to invoke IntegrateAppServer(ServerType=weblogic;Integration=startWebLogic;DOMAIN_HOME=C:\Oracle\Middleware\wlserver_10.3\samples\domains\wl_server) on agent JavaEEDeploymentManager_on_admsup-wl92
Invoked, waiting for results
2012-03-23 07:33:37.297 [y4PoTBbCNeBix3H] Begin monitoring invocation progress
2012-03-23 07:33:37.297 [y4PoTBbCNeBix3H] Monitoring callbacks on agent: JavaEEDeploymentManager_on_admsup-wl92
2012-03-23 07:33:37.297 [y4PoTBbCNeBix3H] Monitoring callback: JavaEEDeploymentManager_on_admsup-wl92:IntegrateAppServer
2012-03-23 07:33:37.297 [y4PoTBbCNeBix3H] Invocation not yet reported
2012-03-23 07:33:38.297 [y4PoTBbCNeBix3H] Invocation not yet reported
2012-03-23 07:33:39.297 [y4PoTBbCNeBix3H] Invocation not yet reported
2012-03-23 07:33:40.297 [y4PoTBbCNeBix3H] Invocation not yet reported
2012-03-23 07:33:41.297 [y4PoTBbCNeBix3H] Invocation not yet reported
2012-03-23 07:33:42.297 [y4PoTBbCNeBix3H] Invocation not yet reported
2012-03-23 07:33:58.297 [y4PoTBbCNeBix3H.ACK] Invocation ACK at 2012-03-23 07:33:37.493 followed by 2
2012-03-23 07:33:58.297 [y4PoTBbCNeBix3H.2] Invocation COMPLETE at 2012-03-23 07:33:39.524 followed by 3 with message: startWebLogic:Initialized
2012-03-23 07:33:58.297 [y4PoTBbCNeBix3H.3] Invocation COMPLETE at 2012-03-23 07:33:40.555 followed by 4 with message: startWebLogic:Required parameters satisfied
2012-03-23 07:33:58.297 [y4PoTBbCNeBix3H.4] Invocation COMPLETE at 2012-03-23 07:33:41.603 followed by 5 with message: startWebLogic:All targets resolved
2012-03-23 07:33:58.297 [y4PoTBbCNeBix3H.5] Invocation COMPLETE at 2012-03-23 07:33:42.603 followed by 6 with message: startWebLogic:Pre-Integrate2012-03-23 07:33:58.297 [y4PoTBbCNeBix3H.6] Invocation COMPLETE at 2012-03-23 07:33:43.915 followed by 7 with message: startWebLogic:Target 1 of 3 patched: C:\Oracle\Middleware\wlserver_10.3\samples\domains\wl_server\bin\startWebLogic.sh
2012-03-23 07:33:58.297 [y4PoTBbCNeBix3H.7] Invocation COMPLETE at 2012-03-23 07:33:44.978 followed by 8 with message: startWebLogic:Target 2 of 3 patched: C:\Oracle\Middleware\wlserver_10.3\samples\domains\wl_server\bin\startWebLogic.cmd
2012-03-23 07:33:58.297 [y4PoTBbCNeBix3H.8] Invocation COMPLETE at 2012-03-23 07:33:45.978 followed by 9 with message: startWebLogic:Target 3 of 3 patched: C:\Oracle\Middleware\wlserver_10.3\samples\domains\wl_server\bin\startWebLogic.sh
2012-03-23 07:33:58.297 [y4PoTBbCNeBix3H.9] Invocation COMPLETE at 2012-03-23 07:33:46.978 followed by 10 with message: startWebLogic:Target 1 of 3 saved: C:\Oracle\Middleware\wlserver_10.3\samples\domains\wl_server\bin\startWebLogic.sh
2012-03-23 07:33:58.297 [y4PoTBbCNeBix3H.10] Invocation COMPLETE at 2012-03-23 07:33:47.994 followed by 11 with message: startWebLogic:Target 2 of 3 saved: C:\Oracle\Middleware\wlserver_10.3\samples\domains\wl_server\bin\startWebLogic.cmd
2012-03-23 07:33:58.297 [y4PoTBbCNeBix3H.11] Invocation COMPLETE at 2012-03-23 07:33:48.996 followed by 12 with message: startWebLogic:Target 3 of 3 saved: C:\Oracle\Middleware\wlserver_10.3\samples\domains\wl_server\bin\startWebLogic.sh
2012-03-23 07:33:58.297 [y4PoTBbCNeBix3H.12] Invocation COMPLETE at 2012-03-23 07:33:49.996 followed by 13 with message: startWebLogic:Integrate
2012-03-23 07:33:58.297 [y4PoTBbCNeBix3H.13] Invocation COMPLETE at 2012-03-23 07:33:50.996 followed by 14 with message: startWebLogic:Post-Integrate
2012-03-23 07:33:58.297 [y4PoTBbCNeBix3H.14] Invocation ENDED at 2012-03-23 07:33:51.996 followed by null
Results are in. The operation completed successfully
While you can integrate an agent from command-line, it does not store the changes within the FMS itself. It only uses the FMS to communicate to the JavaEEDM to integrate the appservers. In the 5.8.0 release you will not be able to review integration configuration or remove integration. This will have to be done on the host itself reviewing the startup scripts or services. We have filed several enhancement ids to consider this for a future release.
JEE-7682 – Agent Integrations done via fglcmd should be added to JavaEEDM agent ASPs; and will be viewable in the UI.
JEE-7683 – Provide a way via fglcmd to list all current agent integrations done by a particular JavaEEDM agent
JEE-7684 – Provide a way to remove agent integration through fglcmd cmdline
© 2021 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy