While connecting to remote server from Nagios server using NRPE, Some times we faced this issue “CHECK_NRPE: Error – Could not complete SSL handshake.” If you see this error, don’t panic. This issue can be solve easily within minute.
Issue/Error:
Getting error “
# /usr/lib64/nagios/plugins/check_nrpe -H 192.168.10.45 CHECK_NRPE: Error - Could not complete SSL handshake.
Solution:
This issue generally comes when NRPE server is not allowing to access service from Nagios server. You need to add nagios server ip in nrpe configuration file.
Step 1:
Edit NRPE configuration file /etc/nagios/nrpe.cfg and search for allowed_hosts configuration variable.
Step 2:
Add your nagios servers ip address in allowed_hosts. For multiple nagios servers add all ips with comma-delimited list. It also supports subnets (like: 192.168.10.0/24).
allowed_hosts=127.0.0.1, 192.168.10.3, 192.168.10.4
After making above changes restart nrpe service
# service nrpe restart
Step 3:
Finally verify changes again using check_nrpe command from nagios server
# /usr/lib64/nagios/plugins/check_nrpe -H 192.168.10.45 NRPE v2.14