Page 2 of 2
Re: NRPE give error on web interface but CLI will return res
Posted: Wed Nov 18, 2015 2:14 pm
by wleming
From running:
Code: Select all
XXXX@support:~$ grep nag /etc/passwd
I get
Code: Select all
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
nagios:x:1001:1001::/home/nagios:/bin/bash
So by your question and my result it is safe to assume that a nagios user has not been created.
Re: NRPE give error on web interface but CLI will return res
Posted: Wed Nov 18, 2015 2:47 pm
by tgriep
The 255 error is returned when the check_nrpe command cannot connect to a host on the local network.
In your check_nrpe command, you are using $HOSTNAME$ and the description for $HOSTNAME$ is
Short name for the host (i.e. "biglinuxbox"). This value is taken from the host_name directive in the host definition.
So if your server cannot resolve the hostname in DNS, that could be causing the error. Make sure the hostname can be resolved on the system.
Or if you want to use the IP address that is defined in the host.cfg file, you would have to edit the check_nrpe command in your commands.cfg file and change this line from
Code: Select all
command_line $USER1$/check_nrpe -H $HOSTNAME$ -c $ARG1$
to
Code: Select all
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
Restart nagios and that should work for you.
Re: NRPE give error on web interface but CLI will return res
Posted: Fri Nov 20, 2015 8:29 am
by wleming
That worked!
Thank you so much for the explanation here! Know after reading everything it makes sense.
Thank you very much again.
Re: NRPE give error on web interface but CLI will return res
Posted: Fri Nov 20, 2015 10:55 am
by rkennedy
Glad to see this worked! I will now close this thread out, but feel free to open another if you ever need assistance in the future!