pentaho/pentaho-kettle · error · KettleException

JobSendNagiosPassiveCheck.Error.MessageMissing

Error message

JobSendNagiosPassiveCheck.Error.MessageMissing

What it means

This KettleException is thrown in execute() when the message to send to Nagios (after environment substitution) is empty. A passive check must carry a message payload, so the entry aborts with the localized text of JobSendNagiosPassiveCheck.Error.MessageMissing.

Solutions

  1. Provide a static or templated message in the entry's Message field
  2. If the message comes from variables, ensure those variables are set by a prior entry (e.g. 'Set Variables' or Get Variables from result rows)
  3. Guard the flow: only run this entry when the upstream step produced data (use evaluation of the previous result in the job hop)

Example fix

// before
// Message field: ${RESULT_MSG}  (variable never set)
// after
// Set Variables entry earlier in the job sets RESULT_MSG,
// or default: Message field: Check completed ${Internal.Job.Name}
Defensive patterns

Strategy: validation

Validate before calling

// before the Nagios entry
String msg = job.getVariable("RESULT_MSG");
if (msg == null || msg.trim().isEmpty()) {
  msg = "default check message"; // or abort earlier
  job.setVariable("RESULT_MSG", msg);
}

Type guard

boolean isNonEmpty(String s) { return s != null && !s.trim().isEmpty(); }

Try / catch

try {
  result = jobEntry.execute(result, nr);
} catch (KettleException e) {
  if (e.getMessage().contains("MessageMissing")) {
    logError("Nagios message was empty; check upstream variable assignment");
  }
}

Prevention

When it happens

Trigger: Executing the entry when the 'Message' field is blank, or contains only variables that resolve to empty at runtime (e.g. ${MESSAGE} from an unset variable or an empty previous-result field).

Common situations: Message built from a variable populated by a previous job entry that produced no output; variable renamed upstream; field left empty in the job entry dialog.

Understand the failure class

Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/d5721dd467853fec. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entries/sendnagiospassivecheck/JobEntrySendNagiosPassiveCheck.java:472

    int realPort = Const.toInt( environmentSubstitute( port ), DEFAULT_PORT );
    int realResponseTimeOut = Const.toInt( environmentSubstitute( responseTimeOut ), DEFAULT_RESPONSE_TIME_OUT );
    int realConnectionTimeOut =
      Const.toInt( environmentSubstitute( connectionTimeOut ), DEFAULT_CONNECTION_TIME_OUT );

    // Sender
    String realSenderServerName = environmentSubstitute( senderServerName );
    String realSenderServiceName = environmentSubstitute( senderServiceName );

    try {
      if ( Utils.isEmpty( realServername ) ) {
        throw new KettleException( BaseMessages.getString(
          PKG, "JobSendNagiosPassiveCheck.Error.TargetServerMissing" ) );
      }

      String realMessageString = environmentSubstitute( message );

      if ( Utils.isEmpty( realMessageString ) ) {
        throw new KettleException( BaseMessages.getString( PKG, "JobSendNagiosPassiveCheck.Error.MessageMissing" ) );
      }

      Level level = Level.UNKNOWN;
      switch ( getLevel() ) {
        case LEVEL_TYPE_OK:
          level = Level.OK;
          break;
        case LEVEL_TYPE_CRITICAL:
          level = Level.CRITICAL;
          break;
        case LEVEL_TYPE_WARNING:
          level = Level.WARNING;
          break;
        default:
          break;
      }
      Encryption encr = Encryption.NONE;
      switch ( getEncryptionMode() ) {

View on GitHub (pinned to f3058517a1)