Go to FMS install dir - FMS_HOME/state/cartridge.exploded/ApplicationServers-Common-5.9.4/Add_Default_Service-
That is the script to run, but its designed for Cart install/upgrade. So modify that script, there is a If () else() block...take out the else block completely. take out the if and the closing bracket...and the result groovy can be run on the box from FMS console under Tooling|Script Console to recreate this service.
Below is the modified script
/*
* Copyright 2011 Quest Software, Inc.
* ALL RIGHTS RESERVED.
*
* This software is the confidential and proprietary information of
* Quest Software Inc. ("Confidential Information"). You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered
* into with Quest Software Inc.
*
* QUEST SOFTWARE INC. MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT
* THE SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
* NON-INFRINGEMENT. QUEST SOFTWARE SHALL NOT BE LIABLE FOR ANY
* DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
*/
import com.quest.nitro.model.topology.TopologyObject;
import com.quest.nitro.service.sl.interfaces.topology.TopologyTypeNotFoundException;
import com.quest.nitro.service.sl.interfaces.query.errors.QueryUnknownTypeException;
import org.apache.log4j.Logger;
def LOG = Logger.getLogger('JavaCommon-addJavaDefaultService');
try {
topSvc = server.get('TopologyService');
def shells = [];
cat = topSvc.getType('FSMCategory');
svc = topSvc.getType('FSMChildService');
dmc = topSvc.getType('FSMDynamicManagedComponent');
TopologyObject sysCategory = topSvc.getObjectShell(cat);
sysCategory.set('name', 'Application Servers');
//sysCategory.set('desc', 'The default category for Java EE, JMX, and .NET systems.');
shells.add(sysCategory);
TopologyObject all = topSvc.getObjectShell(svc);
all.set('name', 'All Java Systems');
all.set('parentService', sysCategory);
all.set('drilldown', 'system:custom_application_customapps20monitor.CustomApplicationMonitor');
all.set('desc', 'A default service that contains all Java EE and JMX systems.');
sysCategory.get('definition').add(all);
shells.add(all);
systems = topSvc.getObjectShell(dmc);
systems.set('name', 'All Systems');
systems.set('container', all);
systems.set('baseQuery', "/modules[fqId='system:java_common']/queries[fqId='system:java_common.getJavaSystems']");
systems.set('componentQuery', "!JavaDomain");
all.get('definition').add(systems);
shells.add(systems);
topSvc.mergeData(shells);
LOG.info("Install: Created child service 'All Java Systems'.");
}
catch (Exception e) {
LOG.warn('Error creating All Java Systems service: ', e);
}
}
return;