Skip to main content

Hi everyone,

I have a perl script that runs fine from the commandline, gives back the error level and the text. Runs under the Centreon user as well, but it keeps giving me the message ‘ No output returned from plugin’.

The return code used is this:
 

      if( $currentlyBuilding eq 'false' ) {

        if( int($lsbThresholdCrit) <= int($tsec) && int($lsbThresholdCrit) != "0" ) {
          $retStr = "Build has been broken for " . $tsec ." seconds; first failed build number: " . $firstFailedBuildId . " (" . $firstFailedBuildURL . ")";
          $exitCode = 2;
        } elsif( int($lsbThresholdWarn) <= int($tsec) && int($lsbThresholdWarn) != "0" ) {
          $retStr = "Build has been broken for " . $tsec ." seconds; first failed build number: " . $firstFailedBuildId . " (" . $firstFailedBuildURL . ")";
          $exitCode = 1;
        } else {
          $retStr .= ", build has been broken for " . $tsec ." seconds; first failed build number: " . $firstFailedBuildId . " (" . $firstFailedBuildURL . ")";
        }
      } # END if(!$currentlyBuilding)

    } else {
      $retStr = "Failed retrieving status for first broken build via API (API status line: $res3->{status_line})";
      $exitCode = 3;
    }

 

I’m clearly missing a point but as it runs fine from the commandline and after all kinds of combinations I’m now at the point where I start pulling my hair out, so any help pointing me in the right direction would be greatly appreciated.

Hello :) 

If I understand correctly, are you trying to execute a custom script (in this case a perl script) in Centreon? You can refer to the documentation dedicated to this error. If this doesn't solve the problem you are encountering between a script that is executed on the command line and not in the Centreon interface, there could be an execution right problem, i.e. the script is not executable for the `centreon-engine` user. Try giving the correct access rights to the script for the c`centreon-engine` user.

Best regards.


Reply