Add the IP address of the nagios server to nrpe.cfg, for my case my configuration file is located in
/usr/local/nagios/etc/nrpe.cfg, if your cfg file is located else where use this command to find
find / -name nrpe.cfg
Search for the parameter
# (i.e. 192.168.1.0/24) are also supported. Hostname wildcards are not currentl$ # supported. # # Note: The daemon only does rudimentary checking of the client's IP # address. I would highly recommend adding entries in your /etc/hosts.allow # file to allow only the specified host to connect to the port # you are running this daemon on. # # NOTE: This option is ignored if NRPE is running under either inetd or xinetd allowed_hosts=127.0.0.1 192.168.0.140
append the nagios server ip address.