This is my first post here, please help me.
I want to monitor a few redhat servers which are behind a squid proxy server. I have done the below configuration:
RedHat Node behind proxy server configuration:- I have installed nrpe and also copied check_disk, check_cpu and check_mem plugins under /usr/lib64/nagios/plugins.
I also added the below lines in /etc/nagios/nrpe.cfg file.
allowed_hosts=127.0.0.1,Squid_Proxy_server_IP command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$ command[check_cpu]=/usr/lib64/nagios/plugins/check_cpu -w $ARG1$ -c $ARG2$ command[check_mem]=/usr/lib64/nagios/plugins/check_mem -w $ARG1$ -c $ARG2$ -W $ARG3$ -C $ARG4$ Squid Proxy Server Configuration:- I have also installed nrpe in squid proxy server and copied check_disk, check_cpu, check_mem, check_nrpe and check_ping plugins under /usr/lib64/nagios/plugins. I also added the below lines in /etc/nagios/nrpe.cfg file.
allowed_hosts=127.0.0.1,Nagios_server_IP command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$ command[check_cpu]=/usr/lib64/nagios/plugins/check_cpu -w $ARG1$ -c $ARG2$ command[check_mem]=/usr/lib64/nagios/plugins/check_mem -w $ARG1$ -c $ARG2$ -W $ARG3$ -C $ARG4$ command[check_proxy]=/usr/lib64/nagios/plugins/check_nrpe -t 60 -H $ARG1$ -c $ARG2$ -a $ARG3$ $ARG4$ command[check_ping]=/usr/lib64/nagios/plugins/check_ping -H $ARG1$ -w 3000.0,80% -c 5000.0,100% -p 5 If I run the below command from squid proxy server to RedHat server, I can get a correct output.
/usr/local/nagios/libexec/check_nrpe -H RedHat_IP -c check_disk -a 20% 10% /app Also If I run the below command from nagios server to squid proxy server, I can get a correct output.
/usr/local/nagios/libexec/check_nrpe -H Proxy_server_IP -c check_disk -a 20% 10% /app But if I run the below command to check the RedHat server status directly from nagios server via Proxy server I get "Error: Unable to read the output".
./check_nrpe -H Proxy_node_IP -c check_proxy -a RedHat_IP_behind_Proxy check_disk "20% 10% /app" Please help me as it has become quite critical for our environment.
check_nrpe -H Proxy_node_IP (localhost) -c check_proxy -a RedHat_IP_behind_Proxy check_disk "20% 10% /app"from the squid server, and not the nagios server. Hopefully you'll get some more useful feedback on what's failing instead of the generic "unable to read output".