{"record":{"id":"f7591bd6ae4bf8d8","repo":"pentaho/pentaho-kettle","slug":"jobsendnagiospassivecheck-error-targetservermissing","errorCode":null,"errorMessage":"JobSendNagiosPassiveCheck.Error.TargetServerMissing","messagePattern":"JobSendNagiosPassiveCheck\\.Error\\.TargetServerMissing","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/sendnagiospassivecheck/JobEntrySendNagiosPassiveCheck.java","lineNumber":465,"sourceCode":"    Result result = previousResult;\n    result.setNrErrors( 1 );\n    result.setResult( false );\n\n    // Target\n    String realServername = environmentSubstitute( serverName );\n    String realPassword = Utils.resolvePassword( variables, password );\n    int realPort = Const.toInt( environmentSubstitute( port ), DEFAULT_PORT );\n    int realResponseTimeOut = Const.toInt( environmentSubstitute( responseTimeOut ), DEFAULT_RESPONSE_TIME_OUT );\n    int realConnectionTimeOut =\n      Const.toInt( environmentSubstitute( connectionTimeOut ), DEFAULT_CONNECTION_TIME_OUT );\n\n    // Sender\n    String realSenderServerName = environmentSubstitute( senderServerName );\n    String realSenderServiceName = environmentSubstitute( senderServiceName );\n\n    try {\n      if ( Utils.isEmpty( realServername ) ) {\n        throw new KettleException( BaseMessages.getString(\n          PKG, \"JobSendNagiosPassiveCheck.Error.TargetServerMissing\" ) );\n      }\n\n      String realMessageString = environmentSubstitute( message );\n\n      if ( Utils.isEmpty( realMessageString ) ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"JobSendNagiosPassiveCheck.Error.MessageMissing\" ) );\n      }\n\n      Level level = Level.UNKNOWN;\n      switch ( getLevel() ) {\n        case LEVEL_TYPE_OK:\n          level = Level.OK;\n          break;\n        case LEVEL_TYPE_CRITICAL:\n          level = Level.CRITICAL;\n          break;\n        case LEVEL_TYPE_WARNING:","sourceCodeStart":447,"sourceCodeEnd":483,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/sendnagiospassivecheck/JobEntrySendNagiosPassiveCheck.java#L447-L483","documentation":"This KettleException is thrown in execute() when the Nagios target server name (after environment substitution) is empty. The job entry cannot send a passive check without knowing which Nagios server to send it to. The message text comes from the localized message key JobSendNagiosPassiveCheck.Error.TargetServerMissing.","triggerScenarios":"Executing the SendNagiosPassiveCheck job entry when the 'Server name' field is blank, or it contains only a variable/parameter that resolves to empty (e.g. ${NAGIOS_HOST} unset at runtime).","commonSituations":"Job copied from another environment where the environment variable defining the host no longer exists; parameter not passed on the command line or by the scheduler; field simply left blank in the dialog.","solutions":["Set the server name field in the job entry dialog to the Nagios server host","If it uses a variable, define that variable in kettle.properties, the job's 'Set Variables', or pass it as a named parameter at runtime","Add a preceding 'Check if file/connection' style validation or abort path that verifies the variable is set before this entry runs"],"exampleFix":"// before (kettle.properties missing the value)\n# NAGIOS_HOST not set -> ${NAGIOS_HOST} resolves to empty\n// after\nNAGIOS_HOST=nagios.example.com","handlingStrategy":"validation","validationCode":"// before executing the job\nString host = job.getVariable(\"NAGIOS_HOST\");\nif (host == null || host.trim().isEmpty()) {\n  throw new IllegalStateException(\"NAGIOS_HOST must be set before running the Nagios passive check job\");\n}","typeGuard":"boolean isNonEmpty(String s) { return s != null && !s.trim().isEmpty(); }","tryCatchPattern":"try {\n  result = jobEntry.execute(result, nr);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"TargetServerMissing\")) {\n    logError(\"Configure the Nagios server name or define its variable\");\n  }\n}","preventionTips":["Define all host variables in kettle.properties or via Set Variables early in the job","Pass required named parameters in Kitchen/Scheduler launches","Use a validation job entry before Nagios sends","Avoid blank server fields when copying jobs between environments"],"tags":["pdi","nagios","configuration","validation"],"backgroundTag":"missing-required-config-field","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}