Page 2 of 3

Re: No output returned from plugin status

Posted: Fri Jun 12, 2020 12:43 am
by elinagios
Do you mean somewhere in nagios logs or in that script specified logs?

Re: No output returned from plugin status

Posted: Fri Jun 12, 2020 6:42 am
by scottwilkerson
your script is logging items here

Code: Select all

LOG_FILE="/home/nagios/monitoring.$(date "+%Y%m%d").log"

Re: No output returned from plugin status

Posted: Mon Jun 15, 2020 3:07 am
by elinagios
So i changed the state file content from OK -> test-error and in the logfile:
2020-06-15 11:00:31 - returning status code 0, message:OK
2020-06-15 11:02:29 - returning status code 0, message:OK
2020-06-15 11:04:28 - returning status code 0, message:OK
2020-06-15 11:04:55 - returning status code 2, message: test-error

Re: No output returned from plugin status

Posted: Mon Jun 15, 2020 10:40 am
by scottwilkerson
Was one of these from when you did not get the correct output from nagios?

Re: No output returned from plugin status

Posted: Tue Jun 16, 2020 1:08 am
by elinagios
Yes, nagios reckognizes it's an critical event, changes status from OK to critical but status information is "no output returned from plugin"

Re: No output returned from plugin status

Posted: Tue Jun 16, 2020 8:23 am
by scottwilkerson
This really is a puzzle, I see no reason for this.

What do you get if you set it to OK and run if from the CLI

Code: Select all

[nagios@mynagios ~]$ /usr/local/nagios/libexec/check_cmd.sh someip

Re: No output returned from plugin status

Posted: Wed Jun 17, 2020 2:53 am
by elinagios
From cli i get Server is OK. Same i get from nagios web interface, status information field. OK status information is always shows correctly.

Re: No output returned from plugin status

Posted: Wed Jun 17, 2020 6:51 am
by scottwilkerson
elinagios wrote:From cli i get Server is OK. Same i get from nagios web interface, status information field. OK status information is always shows correctly.
Sorry I misunderstood, what if you make it go CRITICAL
then run

Code: Select all

/usr/local/nagios/libexec/check_cmd.sh someip
echo $?

Re: No output returned from plugin status

Posted: Wed Jun 17, 2020 7:54 am
by elinagios
[nagios@nagiosserver ~]$ /usr/local/nagios/libexec/check_cmd.sh serverip
test-error
[nagios@nagiosserver ~]$ echo $?
2

Re: No output returned from plugin status

Posted: Wed Jun 17, 2020 5:08 pm
by ssax
I labbed this up with the same scripts and it's working properly.

Please send me a copy of your profile, you can download it from Admin > System Profile > Download Profile button. I want to see if there is something else going on.