No output returned from plugin status
Re: No output returned from plugin status
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
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
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
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
Was one of these from when you did not get the correct output from nagios?
Re: No output returned from plugin status
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
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
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 someipRe: No output returned from plugin status
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
Sorry I misunderstood, what if you make it go CRITICALelinagios 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.
then run
Code: Select all
/usr/local/nagios/libexec/check_cmd.sh someip
echo $?Re: No output returned from plugin status
[nagios@nagiosserver ~]$ /usr/local/nagios/libexec/check_cmd.sh serverip
test-error
[nagios@nagiosserver ~]$ echo $?
2
test-error
[nagios@nagiosserver ~]$ echo $?
2
Re: No output returned from plugin status
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.
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.