I recently installed the nagios, nagios-common, nagios-plugins, and a few of the nagios-plugins-* packages for EL6 from EPEL. I've run into a problem where nagios can't find the plugins at all. It gives me an error 127 when trying to find them, which from the nagios documentation means it thinks the plugins aren't installed. After a bit of debugging, it appears nagios is looking for the plugins to be installed in /usr/lib/nagios/plugins whereas the nagios packages in EPEL install them all in /usr/lib64/nagios/plugins. Creating a symlink from /usr/lib64/nagios to /usr/lib/nagios resolves that issue, but it doesn't seem to me that I should have to do that.
Once I resolved the "not found" problem, nagios moved onto a permissions issue. Calling any plugin results in a 126 error code. I've tried 'chown -R nagios:nagios /usr/lib64/nagios'. This results in a lot of complaints that plugins need to be owned by root or should be setuid root. The permissions on the plugins and all of the directories above seem like the nagios user should be able to run the scripts (i.e. everything has o+rx at least).
Any ideas? Thanks.
Tim
Once upon a time, Tim Wojtulewicz timwoj@ieee.org said:
I recently installed the nagios, nagios-common, nagios-plugins, and a few of the nagios-plugins-* packages for EL6 from EPEL. I've run into a problem where nagios can't find the plugins at all. It gives me an error 127 when trying to find them, which from the nagios documentation means it thinks the plugins aren't installed. After a bit of debugging, it appears nagios is looking for the plugins to be installed in /usr/lib/nagios/plugins whereas the nagios packages in EPEL install them all in /usr/lib64/nagios/plugins. Creating a symlink from /usr/lib64/nagios to /usr/lib/nagios resolves that issue, but it doesn't seem to me that I should have to do that.
Check your resource file, /etc/nagios/private/resource.cfg. The default (as included in the EPEL RPM) has $USER1$=/usr/lib64/nagios/plugins, and then your commands should all be $USER1$/check_foo.
Once I resolved the "not found" problem, nagios moved onto a permissions issue. Calling any plugin results in a 126 error code. I've tried 'chown -R nagios:nagios /usr/lib64/nagios'. This results in a lot of complaints that plugins need to be owned by root or should be setuid root. The permissions on the plugins and all of the directories above seem like the nagios user should be able to run the scripts (i.e. everything has o+rx at least).
You've just blown away all the RPM-provided settings (which will break things). I would remove all your Nagios RPMs and re-install them to get the correct permissions (if you know what you are doing, you can reset ownership/permissions using the output of "rpm -Va nagios*").
The out-of-the-box RPM-provided config/settings work just fine, so there's most likely a problem with the way you've configured Nagios.
I can revert the VM back to just after it installed, but it was doing the same before I made any changes. I'll look into the $USER$ variable. We're using check_mk as well, so perhaps that's attempting to call the wrong version. I hadn't looked into that yet.
On Thu, Apr 18, 2013 at 11:26 AM, Chris Adams cmadams@hiwaay.net wrote:
Once upon a time, Tim Wojtulewicz timwoj@ieee.org said:
I recently installed the nagios, nagios-common, nagios-plugins, and a few of the nagios-plugins-* packages for EL6 from EPEL. I've run into a problem where nagios can't find the plugins at all. It gives me an error 127 when trying to find them, which from the nagios documentation means
it
thinks the plugins aren't installed. After a bit of debugging, it
appears
nagios is looking for the plugins to be installed in /usr/lib/nagios/plugins whereas the nagios packages in EPEL install them all in /usr/lib64/nagios/plugins. Creating a symlink from /usr/lib64/nagios to /usr/lib/nagios resolves that issue, but it doesn't seem to me that I should have to do that.
Check your resource file, /etc/nagios/private/resource.cfg. The default (as included in the EPEL RPM) has $USER1$=/usr/lib64/nagios/plugins, and then your commands should all be $USER1$/check_foo.
Once I resolved the "not found" problem, nagios moved onto a permissions issue. Calling any plugin results in a 126 error code. I've tried
'chown
-R nagios:nagios /usr/lib64/nagios'. This results in a lot of complaints that plugins need to be owned by root or should be setuid root. The permissions on the plugins and all of the directories above seem like the nagios user should be able to run the scripts (i.e. everything has o+rx
at
least).
You've just blown away all the RPM-provided settings (which will break things). I would remove all your Nagios RPMs and re-install them to get the correct permissions (if you know what you are doing, you can reset ownership/permissions using the output of "rpm -Va nagios*").
The out-of-the-box RPM-provided config/settings work just fine, so there's most likely a problem with the way you've configured Nagios. -- Chris Adams cmadams@hiwaay.net Systems and Network Administrator - HiWAAY Internet Services I don't speak for anybody but myself - that's enough trouble.
epel-devel-list mailing list epel-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/epel-devel-list
On 2013-04-18 19:11, Tim Wojtulewicz wrote:
I recently installed the nagios, nagios-common, nagios-plugins, and a few of the nagios-plugins-* packages for EL6 from EPEL. I've run into a problem where nagios can't find the plugins at all. It gives me an error 127 when trying to find them, which from the nagios documentation means it thinks the plugins aren't installed. After a bit of debugging, it appears nagios is looking for the plugins to be installed in /usr/lib/nagios/plugins whereas the nagios packages in EPEL install them all in /usr/lib64/nagios/plugins. Creating a symlink from /usr/lib64/nagios to /usr/lib/nagios resolves that issue, but it doesn't seem to me that I should have to do that.
Once I resolved the "not found" problem, nagios moved onto a permissions issue. Calling any plugin results in a 126 error code. I've tried 'chown -R nagios:nagios /usr/lib64/nagios'. This results in a lot of complaints that plugins need to be owned by root or should be setuid root. The permissions on the plugins and all of the directories above seem like the nagios user should be able to run the scripts (i.e. everything has o+rx at least).
Any ideas? Thanks.
Please post the output of the following command:
rpm -q nagios nagios-common nagios-plugins
jpo
On Apr 18, 2013, at 12:06 PM, Jose Pedro Oliveira jpo@di.uminho.pt wrote:
On 2013-04-18 19:11, Tim Wojtulewicz wrote:
I recently installed the nagios, nagios-common, nagios-plugins, and a few of the nagios-plugins-* packages for EL6 from EPEL. I've run into a problem where nagios can't find the plugins at all. It gives me an error 127 when trying to find them, which from the nagios documentation means it thinks the plugins aren't installed. After a bit of debugging, it appears nagios is looking for the plugins to be installed in /usr/lib/nagios/plugins whereas the nagios packages in EPEL install them all in /usr/lib64/nagios/plugins. Creating a symlink from /usr/lib64/nagios to /usr/lib/nagios resolves that issue, but it doesn't seem to me that I should have to do that.
Once I resolved the "not found" problem, nagios moved onto a permissions issue. Calling any plugin results in a 126 error code. I've tried 'chown -R nagios:nagios /usr/lib64/nagios'. This results in a lot of complaints that plugins need to be owned by root or should be setuid root. The permissions on the plugins and all of the directories above seem like the nagios user should be able to run the scripts (i.e. everything has o+rx at least).
Any ideas? Thanks.
Please post the output of the following command:
rpm -q nagios nagios-common nagios-plugins
Apologies for the noise. This ended up being an issue with my build of check_mk using a hard-coded directory for the nagios plugins, point at /usr/lib/nagios. I'll work with that group as to whether their setup scripts can handle reading user variables out of the nagios configuration.
Tim
epel-devel@lists.fedoraproject.org