Examples of mergeMeasurementReport()


Examples of org.rhq.enterprise.server.measurement.MeasurementDataManagerLocal.mergeMeasurementReport()

        MeasurementScheduleRequest request = new MeasurementScheduleRequest(schedule);
        MeasurementReport report = new MeasurementReport();
        report.addData(new MeasurementDataNumeric(getTimestamp(60), request, 20.0)); // 20 < 60 but !(20 > 40)
        report.addData(new MeasurementDataNumeric(getTimestamp(30), request, 70.0)); // !(70 < 60) but 70 > 40
        MeasurementDataManagerLocal dataManager = LookupUtil.getMeasurementDataManager();
        dataManager.mergeMeasurementReport(report);

        // wait for our JMS messages to process and see if we get any alerts
        Thread.sleep(5000);

        // make sure no alert was triggered
View Full Code Here

Examples of org.rhq.enterprise.server.measurement.MeasurementDataManagerLocal.mergeMeasurementReport()

        // simulate another measurement report coming from the agent - one values that fits in our range, so 1 alert is fired
        request = new MeasurementScheduleRequest(schedule);
        report = new MeasurementReport();
        report.addData(new MeasurementDataNumeric(getTimestamp(15), request, 50.0)); // 50 < 60 AND 50 > 40
        dataManager.mergeMeasurementReport(report);

        // wait for our JMS messages to process and see if we get any alerts
        Thread.sleep(5000);

        // make sure one alert was triggered
View Full Code Here

Examples of org.rhq.enterprise.server.measurement.MeasurementDataManagerLocal.mergeMeasurementReport()

        // simulate a measurement report coming from the agent - one value that is inside our range, so no alerts are fired
        MeasurementScheduleRequest request = new MeasurementScheduleRequest(schedule);
        MeasurementReport report = new MeasurementReport();
        report.addData(new MeasurementDataNumeric(getTimestamp(60), request, 50.0)); // 50 is inside the range 40...60
        MeasurementDataManagerLocal dataManager = LookupUtil.getMeasurementDataManager();
        dataManager.mergeMeasurementReport(report);

        // wait for our JMS messages to process and see if we get any alerts
        Thread.sleep(5000);

        // make sure no alert was triggered
View Full Code Here

Examples of org.rhq.enterprise.server.measurement.MeasurementDataManagerLocal.mergeMeasurementReport()

        // simulate another measurement report coming from the agent - one value that is outside the range, so 1 alert is fired
        request = new MeasurementScheduleRequest(schedule);
        report = new MeasurementReport();
        report.addData(new MeasurementDataNumeric(getTimestamp(15), request, 20.0)); // 20 is outside 40...60
        dataManager.mergeMeasurementReport(report);

        // wait for our JMS messages to process and see if we get any alerts
        Thread.sleep(5000);

        // make sure one alert was triggered
View Full Code Here

Examples of org.rhq.enterprise.server.measurement.MeasurementDataManagerLocal.mergeMeasurementReport()

        // with a single metric that makes a condition trigger but does not fire an alert
        MeasurementScheduleRequest request = new MeasurementScheduleRequest(schedule);
        MeasurementReport report = new MeasurementReport();
        report.addData(new MeasurementDataNumeric(getTimestamp(60), request, 20.0)); // 20 < 60 but !(20 > 40)
        MeasurementDataManagerLocal dataManager = LookupUtil.getMeasurementDataManager();
        dataManager.mergeMeasurementReport(report);

        // wait for our JMS messages to process and see if we get any alerts
        Thread.sleep(5000);

        PageList<Alert> alerts = getAlerts(resourceWithSchedules.getId());
View Full Code Here

Examples of org.rhq.enterprise.server.measurement.MeasurementDataManagerLocal.mergeMeasurementReport()

        // simulate a measurement report coming from the agent - one values that fits in our range, so 1 alert is fired
        MeasurementScheduleRequest request = new MeasurementScheduleRequest(schedule);
        MeasurementReport report = new MeasurementReport();
        report.addData(new MeasurementDataNumeric(getTimestamp(15), request, 50.0)); // 50 < 60 AND 50 > 40
        MeasurementDataManagerLocal dataManager = LookupUtil.getMeasurementDataManager();
        dataManager.mergeMeasurementReport(report);

        // wait for our JMS messages to process and see if we get any alerts
        Thread.sleep(5000);

        // make sure one alert was triggered
View Full Code Here

Examples of org.rhq.enterprise.server.measurement.MeasurementDataManagerLocal.mergeMeasurementReport()

        // simulate a measurement report coming from the agent - one values that changes value, so 1 alert is fired
        MeasurementScheduleRequest request = new MeasurementScheduleRequest(schedule);
        MeasurementReport report = new MeasurementReport();
        report.addData(new MeasurementDataTrait(getTimestamp(15), request, "Foo"));
        MeasurementDataManagerLocal dataManager = LookupUtil.getMeasurementDataManager();
        dataManager.mergeMeasurementReport(report);

        final Alert[] alertHolder = new Alert[1];

        // wait for our JMS messages to process and see if we get any alerts
        timedAssertion(new AssertUtils.BooleanCondition() {
View Full Code Here

Examples of org.rhq.enterprise.server.measurement.MeasurementDataManagerLocal.mergeMeasurementReport()

        //first, send 2 matches
        MeasurementDataManagerLocal measurementDataManager = LookupUtil.getMeasurementDataManager();
        MeasurementScheduleRequest request = new MeasurementScheduleRequest(schedule);
        MeasurementReport report = new MeasurementReport();
        report.addData(new MeasurementDataNumeric(getTimestamp(25), request, 0d));
        measurementDataManager.mergeMeasurementReport(report);

        Thread.sleep(3000);

        request = new MeasurementScheduleRequest(schedule);
        report = new MeasurementReport();
View Full Code Here

Examples of org.rhq.enterprise.server.measurement.MeasurementDataManagerLocal.mergeMeasurementReport()

        Thread.sleep(3000);

        request = new MeasurementScheduleRequest(schedule);
        report = new MeasurementReport();
        report.addData(new MeasurementDataNumeric(getTimestamp(20), request, 0d));
        measurementDataManager.mergeMeasurementReport(report);

        Thread.sleep(3000);

        //now reload the caches
        reloadAllAlertConditionCaches();
View Full Code Here

Examples of org.rhq.enterprise.server.measurement.MeasurementDataManagerLocal.mergeMeasurementReport()

        //send a non-match, followed by a match
        request = new MeasurementScheduleRequest(schedule);
        report = new MeasurementReport();
        report.addData(new MeasurementDataNumeric(getTimestamp(15), request, 1d));
        measurementDataManager.mergeMeasurementReport(report);

        Thread.sleep(3000);

        request = new MeasurementScheduleRequest(schedule);
        report = new MeasurementReport();
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.