Problem with check_nrpe and check_bind.sh plugins
Posted: Tue Dec 22, 2015 12:04 pm
Running xnagios 3.5.1 in a RHEL 6 environment with check_nrpe version 2.15. The nagios server is not getting updated stats when it polls the remote server. It will only get updated stats if I run the command from the remote server first. There are no error messages, the command runs but always pulls that same stats at each polling interval. I have confirmed this behavior from the command line. First I run check_nrpe:
As you can see the command completes but its not fresh data. If I got to the remote server and run the command below:
Then run it again from nagios it gets the updated info but as I mentioned it only does this if I run the command from the remote server fist.
As you can see its now a precise match. When I tail the logs this is all I can see on the remote server.
The above is from audit.log. There is nothing in /var/log/messages and nothing logged on the nagios server most likely because as far as its concerned it thinks the command completed OK. That said, I compared the same log output from our lab environement, which works and I see this:
So as this shows up as failed in the audit logs I suspect a permissions issue. Problem is I have checked everything against the working environment and I can find no problems with permissions. I have all my users in the same groups with the same perms. I have even disabled SELinux to no avail. Note that nagios also uses check_nrpe with no issues to this same server using check_disk and check_ntp and always gets updated values. It only seems to be this check_bind.sh plugin that it does not like. Any ideas?
Code: Select all
/usr/lib64/nagios/plugins/check_nrpe -n -H <ip address> -c check_bind1
Bind9 is running. 2 successfull requests, 56 referrals, 18 nxdomains since last check. | 'success'=2 'referral'=56 'nxrrset'=29 'nxdomain'=18 'recursion'=0 'failure'=3878 'duplicate'=502 'dropped'=0
Code: Select all
/usr/lib64/nagios/plugins/check_bind.sh
Bind9 is running. 1 successfull requests, 74 referrals, 23 nxdomains since last check. | 'success'=1 'referral'=74 'nxrrset'=41 'nxdomain'=23 'recursion'=0 'failure'=27347 'duplicate'=3780 'dropped'=0
Code: Select all
/usr/lib64/nagios/plugins/check_nrpe -n -H <ip address> -c check_bind1
Bind9 is running. 1 successfull requests, 74 referrals, 23 nxdomains since last check. | 'success'=1 'referral'=74 'nxrrset'=41 'nxdomain'=23 'recursion'=0 'failure'=27347 'duplicate'=3780 'dropped'=0
Code: Select all
type=USER_CMD msg=audit(1450797217.241:983642): user pid=14367 uid=495 auid=509 ses=75956 subj=unconfined_u:system_r:nagios_unconfined_plugin_t:s0 msg='cwd="/" cmd=2F7573722F7362696E2F726E6463207374617473 terminal=? res=failed'Code: Select all
type=USER_CMD msg=audit(1450798945.718:376025): user pid=15094 uid=501 auid=500 ses=3501 subj=unconfined_u:system_r:nagios_unconfined_plugin_t:s0 msg='cwd="/" cmd=2F7573722F7362696E2F726E6463207374617473 terminal=? res=success'