Package org.rhq.plugins.apache

Examples of org.rhq.plugins.apache.ApacheServerDiscoveryComponent


        this.snmpPort = snmpPort;
        this.pingUrl = pingUrl;
    }

    public void init() throws Exception {
        ApacheServerDiscoveryComponent discoveryComponent = new ApacheServerDiscoveryComponent();

        SystemInfo systemInfo = SystemInfoFactory.createSystemInfo();

        ResourceDiscoveryContext<PlatformComponent> discoveryContext = new ResourceDiscoveryContext<PlatformComponent>(
            apacheServerResourceType, null, null, systemInfo, scanProcesses(systemInfo), null,
            PluginContainerDeployment.AGENT);

        Configuration config = discoveryContext.getDefaultPluginConfiguration();
        config.put(new PropertySimple(ApacheServerComponent.PLUGIN_CONFIG_PROP_SERVER_ROOT, serverRootPath));
        config.put(new PropertySimple(ApacheServerComponent.PLUGIN_CONFIG_PROP_EXECUTABLE_PATH, exePath));
        config.put(new PropertySimple(ApacheServerComponent.PLUGIN_CONFIG_PROP_HTTPD_CONF, httpdConfPath));
        config.put(new PropertySimple(ApacheServerComponent.PLUGIN_CONFIG_PROP_SNMP_AGENT_HOST, snmpHost));
        config.put(new PropertySimple(ApacheServerComponent.PLUGIN_CONFIG_PROP_SNMP_AGENT_PORT, snmpPort));
        config.put(new PropertySimple(ApacheServerComponent.PLUGIN_CONFIG_PROP_URL, pingUrl));

        DiscoveredResourceDetails result = discoveryComponent.discoverResource(config, discoveryContext);

        serverComponent = new ApacheServerComponent();

        Resource resource = new Resource(result.getResourceKey(), null, apacheServerResourceType);
        resource.setPluginConfiguration(config);
View Full Code Here

TOP

Related Classes of org.rhq.plugins.apache.ApacheServerDiscoveryComponent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.