I currently have Nagios running on several servers with no issues, however the one plugin I would like to get working is the check_ide_smart plugin which checks the harddrive's S.M.A.R.T status and returns a pass/fail. This plugin however requires root level access and works if you do run it from root however as user nagios it does not work. There are several hits on this issue on google and everything from modiyfing sudoers to setting the suid and other options. I have tried most of these and I still get a permissions error. I retracted all previous attempts and would like to start over from scratch.
From the server in which I have a problem running this command as nagios here is the output both from root and nagios:
[root@mail ~]# /usr/lib/nagios/plugins/check_ide_smart -d /dev/sda1\Id= 1, Status=15 {PreFailure , OnLine }, Value=117, Threshold= 6, Passed
Id= 3, Status= 3 {PreFailure , OnLine }, Value=100, Threshold= 0, Passed
Id= 4, Status=50 {Advisory , OnLine }, Value=100, Threshold= 20, Passed
Id= 5, Status=51 {PreFailure , OnLine }, Value=100, Threshold= 36, Passed
Id= 7, Status=15 {PreFailure , OnLine }, Value= 80, Threshold= 30, Passed
Id= 9, Status=50 {Advisory , OnLine }, Value= 87, Threshold= 0, Passed
Id= 10, Status=19 {PreFailure , OnLine }, Value=100, Threshold= 97, Passed
Id= 12, Status=50 {Advisory , OnLine }, Value=100, Threshold= 20, Passed
Id=183, Status=50 {Advisory , OnLine }, Value=100, Threshold= 0, Passed
Id=184, Status=50 {Advisory , OnLine }, Value=100, Threshold= 99, Passed
Id=187, Status=50 {Advisory , OnLine }, Value=100, Threshold= 0, Passed
Id=188, Status=50 {Advisory , OnLine }, Value=100, Threshold= 0, Passed
Id=189, Status=58 {Advisory , OnLine }, Value=100, Threshold= 0, Passed
Id=190, Status=34 {Advisory , OnLine }, Value= 63, Threshold= 45, Passed
Id=194, Status=34 {Advisory , OnLine }, Value= 37, Threshold= 0, Passed
Id=195, Status=26 {Advisory , OnLine }, Value= 30, Threshold= 0, Passed
Id=197, Status=18 {Advisory , OnLine }, Value=100, Threshold= 0, Passed
Id=198, Status=16 {Advisory , OffLine}, Value=100, Threshold= 0, Passed
Id=199, Status=62 {Advisory , OnLine }, Value=200, Threshold= 0, Passed
Id=240, Status= 0 {Advisory , OffLine}, Value=100, Threshold= 0, Passed
Id=241, Status= 0 {Advisory , OffLine}, Value=100, Threshold= 0, Passed
Id=242, Status= 0 {Advisory , OffLine}, Value=100, Threshold= 0, Passed
OffLineStatus=130 {Completed}, AutoOffLine=Yes, OffLineTimeout=10 minutes
OffLineCapability=123 {Immediate Auto SuspendOnCmd}
SmartRevision=10, CheckSum=112, SmartCapability=3 {SaveOnStandBy AutoSave}
[nagios@mail root]$ /usr/lib/nagios/plugins/check_ide_smart -d /dev/sda1CRITICAL - SMART_ENABLE: Permission denied
CRITICAL - SMART_CMD_ENABLE
Any advice is appreciated... Thanks
