code: @Override
      public final void configureThresholdEvaluatorBuilder(final ThresholdsEvaluatorBuilder thrb, final ICommandLine cl) throws BadThresholdException {
          thrb.withLegacyThreshold("time", null, cl.getOptionValue("warning"), cl.getOptionValue("critical"));
          if (cl.hasOption("regex")) {
              if (cl.hasOption("invert-regex")) {
                  // invert-regex: CRITICAL value if regex is found (true = 1)
                  thrb.withLegacyThreshold("invert-regex", null, null, "1");
              } else {
                  // WARNING if regex not found (false = 0)
                  thrb.withLegacyThreshold("regex", null, null, "0");
              }
          }
          if (cl.hasOption("expect")) {
              // WARNING if expected string not found (false = 0)
              thrb.withLegacyThreshold("expect", null, "0", null);
          }
          if (cl.hasOption("string")) {
              // WARNING if expected string not found (false = 0)
              thrb.withLegacyThreshold("string", null, "0", null);
          }
          if (cl.hasOption("onredirect")) {
              String redirect = cl.getOptionValue("onredirect").toUpperCase();
              if ("OK".equals(redirect)) {
                  thrb.withLegacyThreshold("onredirect", "1:", null, null);
              } else if ("CRITICAL".equals(redirect)) {
                  thrb.withLegacyThreshold("onredirect", null, null, "1:");
              } else if ("WARNING".equals(redirect)) {
                  thrb.withLegacyThreshold("onredirect", null, "1:", null);
              }
          }
          if (cl.hasOption("certificate")) {
              String ok = cl.getOptionValue("certificate");
              thrb.withLegacyThreshold("certificate", ok, null, null);
          }
      }
docs: Configures the threshold evaluator. This plugin supports both the legacy
  threshold format and the new format specification.
  
  @param thrb
  - the evaluator to be configured
  @param cl
  - the received command line
  @throws BadThresholdException
  - if the threshold can't be parsed