private String message(double value) {
    switch (state(value)) {
      case OK:
        return getOk().getText();
      case WARNING:
        return getWarning().getText();
      case CRITICAL:
        return getCritical().getText();
      case UNKNOWN:
        return "Unknown";
      case SKIPPED:
        return "Skipped";
      default:
        throw new IllegalStateException("Invalid alert state: " + state(value));
    }
  }
Sets the label that identifies the units that the threshold values are in.
For example, this could be "s" for seconds or GB for "Gigabytes".

@param units
         the units, or {@code null} for none.
ambari-server/src/main/java/org/apache/ambari/server/state/alert/Reporting.java