No output returned from plugin status

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
elinagios
Posts: 146
Joined: Thu Feb 16, 2017 3:45 am

Re: No output returned from plugin status

Post by elinagios »

Do you mean somewhere in nagios logs or in that script specified logs?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: No output returned from plugin status

Post by scottwilkerson »

your script is logging items here

Code: Select all

LOG_FILE="/home/nagios/monitoring.$(date "+%Y%m%d").log"
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
elinagios
Posts: 146
Joined: Thu Feb 16, 2017 3:45 am

Re: No output returned from plugin status

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: No output returned from plugin status

Post by scottwilkerson »

Was one of these from when you did not get the correct output from nagios?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
elinagios
Posts: 146
Joined: Thu Feb 16, 2017 3:45 am

Re: No output returned from plugin status

Post 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"
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: No output returned from plugin status

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
elinagios
Posts: 146
Joined: Thu Feb 16, 2017 3:45 am

Re: No output returned from plugin status

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: No output returned from plugin status

Post 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 $?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
elinagios
Posts: 146
Joined: Thu Feb 16, 2017 3:45 am

Re: No output returned from plugin status

Post by elinagios »

[nagios@nagiosserver ~]$ /usr/local/nagios/libexec/check_cmd.sh serverip
test-error
[nagios@nagiosserver ~]$ echo $?
2
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: No output returned from plugin status

Post 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.
Locked