Plugin not returning "Status Information"

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
caterpillartce
Posts: 117
Joined: Mon Jul 11, 2016 11:22 am

Plugin not returning "Status Information"

Post 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
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Plugin not returning "Status Information"

Post 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?
Former Nagios Employee
caterpillartce
Posts: 117
Joined: Mon Jul 11, 2016 11:22 am

Re: Plugin not returning "Status Information"

Post 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!
You do not have the required permissions to view the files attached to this post.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Plugin not returning "Status Information"

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked