Hi,
I run check nrpe on centos every service is ok. but I got a yum service was return "CHECK_NRPE: Socket timeout after 30 seconds."
On another server with the same service check is fine. I have no idea on this issue.
Please advice.
Thank you.
nrpe error with yum service check only in my host
nrpe error with yum service check only in my host
You do not have the required permissions to view the files attached to this post.
Re: nrpe error with yum service check only in my host
What is the exact command that the check is running? What is returned if you run "/usr/local/nagios/libexec/check_services -p <service_name>" on the remote system?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: nrpe error with yum service check only in my host
Hi,
Please find the picture that I run nrpe command check.
Thank you.
Please find the picture that I run nrpe command check.
Thank you.
You do not have the required permissions to view the files attached to this post.
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: nrpe error with yum service check only in my host
@dimsum, What happens when you manually run the nrpe command from the nagios server?
Actually, I think I know what the problem is. The check_yum command is not defined in /usr/local/nagios/etc/nrpe.cfg on the remote server. Open that file and scroll all the way down till you see the command definitions:
Add a new one underneath:
Exit out of the file and restart the nrpe with the appropriate command:
or
Depending on your installation.
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H remote_server_ip -t 30 -c check_yumCode: Select all
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200
Code: Select all
command[check_yum]=/usr/local/nagios/libexec/check_services -p yumCode: Select all
service nrpe restartCode: Select all
service xinetd restartAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: nrpe error with yum service check only in my host
I try to add the command line into nrpe.conf then restart service I found the return is 7 what is mean?
Thank you.
Thank you.
You do not have the required permissions to view the files attached to this post.
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: nrpe error with yum service check only in my host
@dimsum, I believe it shows a number of processes currently running that contain the word "yum". Looks like its working.
Code: Select all
amt=$(ps aax | egrep "$patern" | grep -v egrep | grep -v "$PROGNAME" | wc -l | sed 's| ||g')
str="$patern: $amt"
if [ $amt -lt 1 ]; then
str="*** $patern: Nok ***"
exitstatus=$STATE_CRITICAL
fi
res="$res $str"As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.