Package org.rhq.plugins.www.snmp

Examples of org.rhq.plugins.www.snmp.SNMPSession.ping()


        boolean configured = false;

        try {

            SNMPSession snmpSession = getSNMPSession();
            if (!snmpSession.ping()) {
                LOG.warn("Failed to connect to SNMP agent at "
                    + snmpSession
                    + "\n"
                    + ". Make sure\n1) the managed Apache server has been instrumented with the JON SNMP module,\n"
                    + "2) the Apache server is running, and\n"
View Full Code Here


        else
            getSNMPValues(report, schedules);
    }
    private void getSNMPValues(MeasurementReport report, Set<MeasurementScheduleRequest> schedules) throws Exception {
        SNMPSession snmpSession = getSNMPSession();
        boolean snmpPresent = snmpSession.ping();

        for (MeasurementScheduleRequest schedule : schedules) {
            String metricName = schedule.getName();
            if (metricName.equals(SERVER_BUILT_TRAIT)) {
                MeasurementDataTrait trait = new MeasurementDataTrait(schedule, this.binaryInfo.getBuilt());
View Full Code Here

                //ok, so the vhost is present. Now let's just ping the SNMP module to see
                //if it is reachable and base our availability on that...
                SNMPSession snmpSession = resourceContext.getParentResourceComponent().getSNMPSession();

                return snmpSession.ping() ? UP : DOWN;
            } catch (Exception e) {
                LOG.debug("Determining the availability of the vhost [" + resourceContext.getResourceKey()
                    + "] using SNMP failed.", e);
                return DOWN;
            }
View Full Code Here

            getSNMPValues(report, schedules);
    }
    private void getSNMPValues(MeasurementReport report, Set<MeasurementScheduleRequest> schedules) throws Exception {
        SNMPSession snmpSession = this.resourceContext.getParentResourceComponent().getSNMPSession();
        int primaryIndex = getWwwServiceIndex();
        boolean ping = snmpSession.ping();
        boolean snmpMetricsSupported = primaryIndex >= 0 && ping;

        if (LOG.isDebugEnabled()) {
            if (snmpMetricsSupported) {
                LOG.debug("SNMP metrics collection supported for VirtualHost service #" + primaryIndex);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.