Just letting everybody know that I rebuilt the machine and it all appears to be working, including email alerts (a I just got one :-))
I have no idea what the problem was, as I followed the same instructions I did last time. but as it is so straightforward to install nagios, I thought I'd simply backup my cfg files and start again! Thanks to everybody for their help ... Kind regards, Paul Broadwith MBCS Blue Ivy Ltd - Microsoft Small Business Specialist, UK Partner Qualified for 2007 Tel.: 0800 612 0601 Windows Messenger: [EMAIL PROTECTED] Web: http://www.blueivy.co.uk Blog: http://blog.blueivy.co.uk -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Broadwith Sent: 19 July 2007 21:51 To: Arno Lehmann; nagios-users@lists.sourceforge.net Subject: Re: [Nagios-users] Permission Denied on check_nt Hi Arno, I ran an strace on the PID and got the following for the check_nt: === open("/usr/lib/nagios/plugins/check_nt", O_RDONLY|O_LARGEFILE) = 8 fstat64(8, {st_dev=makedev(253, 0), st_ino=14649129, st_mode=S_IFREG|0755, st_nlink=1, st_uid=100, st_gid=500, st_blksize=4096, st_blocks=96 , st_size=43751, st_atime=2007/07/19-21:41:26, st_mtime=2007/06/25-15:34:01, st_ctime=2007/07/19-19:28:46}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f26000 read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\2\0\3\0\1\0\0\0\260\214"..., 4096) = 4096 close(8) = 0 munmap(0xb7f26000, 4096) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7f20918) = 10991 --- SIGCHLD (Child exited) @ 0 (0) --- waitpid(10991, NULL, 0) = 10991 === >From the little I can understand from that, fstat64 is returning 0 when looking it up it should return a 12 element array. HOWEVER this does work: === open("/usr/lib/nagios/plugins/check_ping", O_RDONLY|O_LARGEFILE) = 8 fstat64(8, {st_dev=makedev(253, 0), st_ino=14649058, st_mode=S_IFREG|0755, st_nlink=1, st_uid=100, st_gid=500, st_blksize=4096, st_blocks=96 , st_size=44718, st_atime=2007/07/19-21:41:31, st_mtime=2007/06/25-15:34:01, st_ctime=2007/07/19-19:28:46}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f26000 read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\2\0\3\0\1\0\0\0\260\220"..., 4096) = 4096 close(8) = 0 munmap(0xb7f26000, 4096) = 0 === And it's fstat also returns 0, so I'm confused. I've added a check_smtp for this server and it also fails, along with a check_http. This also fails for the local server and not just the remote one which does indicate permissions. However I've checked the permissions for check_disk (which works) and check_smtp and they are both identical: === open("/usr/lib/nagios/plugins/check_smtp", O_RDONLY|O_LARGEFILE) = 8 fstat64(8, {st_dev=makedev(253, 0), st_ino=14649103, st_mode=S_IFREG|0755, st_nlink=1, st_uid=100, st_gid=500, st_blksize=4096, st_blocks=12 8, st_size=56930, st_atime=2007/07/19-21:41:22, st_mtime=2007/06/25-15:34:01, st_ctime=2007/07/19-19:28:46}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f26000 read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\2\0\3\0\1\0\0\0 \222\4"..., 4096) = 4096 close(8) = 0 munmap(0xb7f26000, 4096) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7f20918) = 11059 --- SIGCHLD (Child exited) @ 0 (0) --- futex(0x4a7b75b8, FUTEX_WAKE, 1) = 1 waitpid(11059, NULL, 0) = 11059 === Nagios was instralled on CentOS using yum. The packages came from the RPMForge. Kind regards, Paul Broadwith MBCS Blue Ivy Ltd - Microsoft Small Business Specialist, UK Partner Qualified for 2007 Tel.: 0800 612 0601 Windows Messenger: [EMAIL PROTECTED] Web: http://www.blueivy.co.uk Blog: http://blog.blueivy.co.uk -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Arno Lehmann Sent: 19 July 2007 20:15 To: nagios-users@lists.sourceforge.net Subject: Re: [Nagios-users] Permission Denied on check_nt Hello, 19.07.2007 20:43,, Paul Broadwith wrote:: ... > The permissions on the 'plugins' directory and all of the plugins were > root.root, but are now as follows: ... > Happy to let somebody have a look around the server via SSH if they > wish. Short of rebuilding the server I'm not sure what to do myself! Oh damn... be careful with this sort of offer! At least chose someone with a known and confirmed name, set up a contract, get that signed by your management, so that you know whom to strangle when things go wrong :-) > As an aside I couldn't get Nagios running at first because it couldn't > write the .pid file in /var/run. I changed the location of the .pid file > to the /var/log/nagios and it worked fine. That also seemed to be > permissions based even though I had given Nagios full access to the > /var/run directory. This looks like you, during testing perhaps, ran nagios as root. Some files created were left behind, still owned by root, so that Nagios can not recreate or modify them. Now, I don't know where Nagios uses temporary files, pid files, sockets for interprocess communication, or whatever, but I would start using strace now on the running nagios processes, and check the permissions of all files (and directories) Nagios accesses... Arno -- Arno Lehmann IT-Service Lehmann www.its-lehmann.de ------------------------------------------------------------------------ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null ------------------------------------------------------------------------ ---------------------------------------------------------------------- Blue Ivy Limited is a limited company registered in Scotland. Registered company number: SC 221649. Registered VAT number: GB 774 8460 88. Registered Office: 67 Kelburn Street, Barrhead, Glasgow, G78 1LD This message and any associated files is intended only for the use of recipient and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not recipient you are hereby notified that any dissemination, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify [EMAIL PROTECTED] immediately by replying to the message and then deleting it from your computer. Any views or opinions presented are solely those of the author [EMAIL PROTECTED] and do not necessarily represent those of the company. ------------------------------------------------------------------------ ---------------------------------------------------------------------- ------------------------------------------------------------------------ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null