Page 1 of 1

Plugin not returning "Status Information"

Posted: Fri Sep 02, 2016 12:10 pm
by caterpillartce
Hello,

I have an otherwise working fine plugin, the only issue is the "Status Information" field is blank for the service. If I run the script or go into Service Status Detail, I can see the expected output message (see attached file 2), but for some reason that message is not showing up as "Status Information" (see attached file 1).

Anybody knows why?

Thanks!

Jessica Zhang

Re: Plugin not returning "Status Information"

Posted: Tue Sep 06, 2016 9:17 am
by rkennedy
The status information is expecting the output on the first line and displaying that, what all is your plugin echoing out? Could you post it for us to look at?

Re: Plugin not returning "Status Information"

Posted: Tue Sep 06, 2016 9:44 am
by caterpillartce
Basically I was trying to determine if a process is a child process to another process on Windows. The two processes names are the input parameters/argument and return message is based on the result. Please see attached perl script. Thanks!

Re: Plugin not returning "Status Information"

Posted: Tue Sep 06, 2016 2:54 pm
by Box293
Line 14 of your script is this:

Code: Select all

    print $_ . "\n";
Which means it's printing the output first, and then on line 74 it's exiting and printing:

Code: Select all

pexit"OK - everything good";
You should put the $_ into a variable at line 14 and then pexit with the variable after the OK / warning / critical message.