Package com.adahas.tools.jmxeval.response

Examples of com.adahas.tools.jmxeval.response.Status


   * @see Element#process(Context)
   */
  @Override
  public void process(final Context context) throws EvalException {
   
    Status status;
   
    final Object attributeValue = context.getVar(var);
    if (attributeValue == null) {
      status = Status.UNKNOWN;
    } else {
View Full Code Here


   * @return Status of the check
   */
  protected Status getStatus(final Object value, final String criticalLevel,
      final String warningLevel, final Mode mode) {
   
    Status resultStatus;
   
    if (mode.equals(Mode.REGEX)) {
      resultStatus = getStatusInRegExMode(value, criticalLevel, warningLevel);
    } else {
      resultStatus = getStatusInDefaultMode(value, criticalLevel, warningLevel);
View Full Code Here

   * @param warningLevel Warning value level
   * @return Status of the check
   */
  @SuppressWarnings("PMD.DataflowAnomalyAnalysis")
  protected Status getStatusInRegExMode(final Object value, final String criticalLevel, final String warningLevel) {
    Status resultStatus = null;
   
    if (criticalLevel != null) {
      // critical level
      final Pattern pattern = Pattern.compile(criticalLevel);
      final Matcher matcher = pattern.matcher(value.toString());
View Full Code Here

   * @param warningLevel Warning value level
   * @return Status of the check
   */
  @SuppressWarnings("PMD.DataflowAnomalyAnalysis")
  protected Status getStatusInDefaultMode(final Object value, final String criticalLevel, final String warningLevel) {
    Status resultStatus = Status.OK;
   
    // if
    // - either levels are null, try an exact match
    // - if neither are null and not a number,
    if (criticalLevel == null || warningLevel == null || !(value instanceof Number)) {
View Full Code Here

   * @param warningLevel Warning value level
   * @return Status of the check
   */
  @SuppressWarnings("PMD.DataflowAnomalyAnalysis")
  protected Status getStatusByRangeCheck(final Object value, final String criticalLevel, final String warningLevel) {
    Status resultStatus = Status.OK;
   
    // range check for numerics
    final Double doubleValue = ((Number) value).doubleValue();
    NagiosRange critical = new NagiosRange(criticalLevel);
    NagiosRange warning  = new NagiosRange(warningLevel);
View Full Code Here

TOP

Related Classes of com.adahas.tools.jmxeval.response.Status

Copyright © 2018 www.massapicom. 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.