Examples of AlertType


Examples of com.dianping.cat.report.task.alert.AlertType

    return false;
  }

  private String generateTypeStr(String type) {
    AlertType typeByName = AlertType.getTypeByName(type);

    switch (typeByName) {
    case Business:
      return "业务告警";
    case Network:
View Full Code Here

Examples of com.seyren.core.domain.AlertType

        String until = Strings.emptyToNull(getString(dbo, "until"));
        BigDecimal warn = getBigDecimal(dbo, "warn");
        BigDecimal error = getBigDecimal(dbo, "error");
        boolean enabled = getBoolean(dbo, "enabled");
        boolean live = getOptionalBoolean(dbo, "live", false);
        AlertType state = AlertType.valueOf(getString(dbo, "state"));
        DateTime lastCheck = getDateTime(dbo, "lastCheck");
        List<Subscription> subscriptions = new ArrayList<Subscription>();
        BasicDBList list = getBasicDBList(dbo, "subscriptions");
        for (Object o : list) {
            subscriptions.add(subscriptionFrom((DBObject) o));
View Full Code Here

Examples of com.seyren.core.domain.AlertType

        String checkId = getString(dbo, "checkId");
        BigDecimal value = getBigDecimal(dbo, "value");
        String target = getString(dbo, "target");
        BigDecimal warn = getBigDecimal(dbo, "warn");
        BigDecimal error = getBigDecimal(dbo, "error");
        AlertType fromType = AlertType.valueOf(getString(dbo, "fromType"));
        AlertType toType = AlertType.valueOf(getString(dbo, "toType"));
        DateTime timestamp = getDateTime(dbo, "timestamp");
       
        return new Alert()
                .withId(id)
                .withCheckId(checkId)
View Full Code Here

Examples of com.seyren.core.domain.AlertType

           
            DateTime now = new DateTime();
            BigDecimal warn = check.getWarn();
            BigDecimal error = check.getError();
           
            AlertType worstState = AlertType.UNKNOWN;
           
            List<Alert> interestingAlerts = new ArrayList<Alert>();
           
            for (Entry<String, Optional<BigDecimal>> entry : targetValues.entrySet()) {
               
                String target = entry.getKey();
                Optional<BigDecimal> value = entry.getValue();
               
                if (!value.isPresent()) {
                    LOGGER.warn("No value present for {}", target);
                    continue;
                }
               
                BigDecimal currentValue = value.get();
               
                Alert lastAlert = alertsStore.getLastAlertForTargetOfCheck(target, check.getId());
               
                AlertType lastState;
               
                if (lastAlert == null) {
                    lastState = AlertType.OK;
                } else {
                    lastState = lastAlert.getToType();
                }
               
                AlertType currentState = valueChecker.checkValue(currentValue, warn, error);
               
                if (currentState.isWorseThan(worstState)) {
                    worstState = currentState;
                }
               
                if (isStillOk(lastState, currentState)) {
                    continue;
View Full Code Here

Examples of org.apache.cloudstack.alert.AlertService.AlertType

        String msgSubject = null;
        String msgContent = null;
        String totalStr;
        String usedStr;
        String pctStr = formatPercent(usedCapacity/totalCapacity);
        AlertType alertType = null;
        Long podId = pod == null ? null : pod.getId();
        Long clusterId = cluster == null ? null : cluster.getId();

        switch (capacityType) {
View Full Code Here

Examples of org.apache.cloudstack.alert.AlertService.AlertType

    // ///////////// API Implementation///////////////////
    // ///////////////////////////////////////////////////

    @Override
    public void execute() {
        AlertType alertType = AlertService.AlertType.generateAlert(getType(), getName());
        if (_alertSvc.generateAlert(alertType, getZoneId(), getPodId(), getDescription())) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to generate an alert");
View Full Code Here

Examples of org.apache.cloudstack.alert.AlertService.AlertType



    @Override
    public void execute() {
        AlertType alertType = AlertService.AlertType.generateAlert(getType(), getName());
        if (_alertSvc.generateAlert(alertType, getZoneId(), getPodId(), getDescription())) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to generate an alert");
View Full Code Here

Examples of org.apache.cloudstack.alert.AlertService.AlertType

        String msgSubject = null;
        String msgContent = null;
        String totalStr;
        String usedStr;
        String pctStr = formatPercent(usedCapacity/totalCapacity);
        AlertType alertType = null;
        Long podId = pod == null ? null : pod.getId();
        Long clusterId = cluster == null ? null : cluster.getId();

        switch (capacityType) {
View Full Code Here

Examples of org.apache.tuscany.sca.demos.aggregator.types.AlertType

        // Aggregate entries from feed1 and feed2
        try {       
            AlertsType alerts = this.alerts.getAllNewAlerts("");
           
            for( Object alertObject : alerts.getAlert() ){        
                AlertType alert = ((AlertType)alertObject);
                Entry entry = factory.newEntry();
                entry.setTitle(alert.getTitle());
                //entry.(alert.getSummary());                   
                entry.addLink(alert.getAddress());
                entry.setPublished(dateFormatter.parse(alert.getDate()));
                       
                feed.addEntry(entry);
            }
        } catch(Exception ex) {
            System.err.println("Exception " + ex.toString());
View Full Code Here

Examples of org.apache.tuscany.sca.demos.aggregator.types.AlertType

        // Aggregate entries from feed1 and feed2
        try {       
            AlertsType alerts = this.alerts.getAllNewAlerts("");
           
            for( Object alertObject : alerts.getAlert() ){        
                AlertType alert = ((AlertType)alertObject);
                Entry entry = factory.newEntry();
                entry.setTitle(alert.getTitle());
                //entry.(alert.getSummary());                   
                entry.addLink(alert.getAddress());
                entry.setPublished(dateFormatter.parse(alert.getDate()));
                       
                feed.addEntry(entry);
            }
        } catch(Exception ex) {
            System.err.println("Exception " + ex.toString());
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.