Examples of prettyPrintAlertConditions()


Examples of org.rhq.enterprise.server.alert.AlertManagerBean.prettyPrintAlertConditions()

            String.format("%2.1fB", 22.2d));
    }

    private String getPrettyAlertConditionString(AlertCondition condition) {
        AlertManagerBean pojo = new AlertManagerBean();
        String s = extractCondition(pojo.prettyPrintAlertConditions(createAlert(condition), false));
        System.out.println("long===>" + s);
        return s;
    }

    private String getShortPrettyAlertConditionString(AlertCondition condition) {
View Full Code Here

Examples of org.rhq.enterprise.server.alert.AlertManagerBean.prettyPrintAlertConditions()

        return s;
    }

    private String getShortPrettyAlertConditionString(AlertCondition condition) {
        AlertManagerBean pojo = new AlertManagerBean();
        String s = extractCondition(pojo.prettyPrintAlertConditions(createAlert(condition), true));
        System.out.println("short-->" + s);
        return s;
    }

    private MeasurementDefinition createDynamicMeasurementDefinition() {
View Full Code Here

Examples of org.rhq.enterprise.server.alert.AlertManagerLocal.prettyPrintAlertConditions()

            AlertManagerLocal alertManager = LookupUtil.getAlertManager();

            Object[] args = new Object[3];
            args[0] = alert;
            args[1] = alertManager.prettyPrintAlertURL(alert);
            args[2] = alertManager.prettyPrintAlertConditions(alert, false);
            result = ((Invocable) engine).invokeFunction("sendAlert", args);

            if (result == null) {
                return SenderResult.getSimpleFailure("Script ]" + scriptName + "] returned null, so success is unknown");
            }
View Full Code Here

Examples of org.rhq.enterprise.server.alert.AlertManagerLocal.prettyPrintAlertConditions()

            b.append(alert.getId()).append(":'"); // Alert id
            b.append(alert.getAlertDefinition().getResource().getName());
            b.append("' (");
            b.append(alert.getAlertDefinition().getResource().getId());
            b.append("): ");
            b.append(alertManager.prettyPrintAlertConditions(alert, true));
            b.append("-by " + this.alertParameters.getSimpleValue("twittedBy", "@RHQ")); // TODO not for production :-)
            // TODO use some alert url shortening service

            String msg = b.toString();
            if (msg.length() > 140)
View Full Code Here

Examples of org.rhq.enterprise.server.alert.AlertManagerLocal.prettyPrintAlertConditions()

            b.append(". Cause is ");

            // Switch locale to english, as the voice synthesizer expects this for now
            Locale currentLocale = Locale.getDefault();
            Locale.setDefault(Locale.ENGLISH);
            b.append(alertManager.prettyPrintAlertConditions(alert, false));
            Locale.setDefault(currentLocale);

            boolean willBeDisabled = alertManager.willDefinitionBeDisabled(alert);

            if (willBeDisabled)
View Full Code Here

Examples of org.rhq.enterprise.server.alert.AlertManagerLocal.prettyPrintAlertConditions()

        b.append(" (on ");
        b.append(alert.getAlertDefinition().getResource().getName());
        b.append("):  ");
        b.append(alertManager.prettyPrintAlertURL(alert));
        b.append("\n");
        b.append(alertManager.prettyPrintAlertConditions(alert, false));

        return b.toString();
    }
}
View Full Code Here

Examples of org.rhq.enterprise.server.alert.AlertManagerLocal.prettyPrintAlertConditions()

        AlertManagerLocal alertManager = LookupUtil.getAlertManager();
        ResourceManagerLocal resourceManager = LookupUtil.getResourceManager();

        List lineage = resourceManager.getResourceLineage(alert.getAlertDefinition().getResource().getId());
        String platformName = ((Resource)lineage.get(0)).getName();
        String conditions = alertManager.prettyPrintAlertConditions(alert, false).replace('\n', ' ');
        String alertURL = alertManager.prettyPrintAlertURL(alert);
        StringBuilder message = new StringBuilder();
        message.append("ALERT,");
        message.append(alert.getAlertDefinition().getPriority().getName());
        message.append(',');
View Full Code Here

Examples of org.rhq.enterprise.server.alert.AlertManagerLocal.prettyPrintAlertConditions()

        case ALERT_DEF_PRIO:
            return alert.getAlertDefinition().getPriority().getName();
        case ALERT_URL:
            return mgr.prettyPrintAlertURL(alert);
        case ALERT_CONDITIONS:
            return mgr.prettyPrintAlertConditions(alert, false);

        default:
            return NOT_YET_IMPLEMENTED;
        }
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.