Hello team,
could you please help in the following error output: (some other checks are working fine for the same client)
from Nagios server:
[root@nagios libexec]# ./check_nrpe -H 1.1.1.1 -t 220 -c check_comand -a arg1 5 10
NRPE: Unable to read output
check_command contain sudo and is working fine from client side with nagios user.
is there a way to debug and get verbose output from check_nrpe tool?
NRPE: Unable to read output
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: NRPE: Unable to read output
Hi,
A few things verify. Is the path to the plugin correctly defined correctly in the nrpe.cfg on the remote host?
Also, if this plugin requires sudo privileges to run, you'll need to modify the /etc/sudoers file to grant access. Step-by-step instructions can be found in the following guide.
NRPE - NRPE: Unable To Read Output
A few things verify. Is the path to the plugin correctly defined correctly in the nrpe.cfg on the remote host?
Also, if this plugin requires sudo privileges to run, you'll need to modify the /etc/sudoers file to grant access. Step-by-step instructions can be found in the following guide.
NRPE - NRPE: Unable To Read Output
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NRPE: Unable to read output
Hi,
every thing is set correctly but the script contain a line like:
VAR=`sudo docker exec --user="username" -ti container_id bash -c "/command_inside_contianer" | awk '{print $1}'`
so in local host it gives a correct output and the script is working fine.
it seems like nagios is unable to execute commands inside docker even though i have sudoer entry for nagios and nagios is in docker group. (knowing that the script is working fine from nagios user session also) only when call it from nagios check_nrpe it gives "unable to read outpur"
any idea?
is there any debugging tool for check_nrpe to see what's going on, like bash -x for shell script.?
thank you.
every thing is set correctly but the script contain a line like:
VAR=`sudo docker exec --user="username" -ti container_id bash -c "/command_inside_contianer" | awk '{print $1}'`
so in local host it gives a correct output and the script is working fine.
it seems like nagios is unable to execute commands inside docker even though i have sudoer entry for nagios and nagios is in docker group. (knowing that the script is working fine from nagios user session also) only when call it from nagios check_nrpe it gives "unable to read outpur"
any idea?
is there any debugging tool for check_nrpe to see what's going on, like bash -x for shell script.?
thank you.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: NRPE: Unable to read output
Hi @exp-user1,
When you are running the check locally, are you logged in as the nagios or root? Can you upload the nrpe configuration file for us to review (
/usr/local/nagios/etc/nrpe.cfg )? Thanks.
Also, please try test again using the full path in the command string?
When you are running the check locally, are you logged in as the nagios or root? Can you upload the nrpe configuration file for us to review (
/usr/local/nagios/etc/nrpe.cfg )? Thanks.
Also, please try test again using the full path in the command string?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NRPE: Unable to read output
thank you,
it's working now, the problem was in docker command itself.
Regards.
it's working now, the problem was in docker command itself.
Regards.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: NRPE: Unable to read output
Hello,
Super! Glad you were able to get it worked out.
I'll close this out. If you have any new questions, feel free to open another post.
Thank you for using the Nagiso Support Forum!
Super! Glad you were able to get it worked out.
I'll close this out. If you have any new questions, feel free to open another post.
Thank you for using the Nagiso Support Forum!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!