Re: [Nagios-users] check_disk and autofs
Alan McKay wrote: I guess that my expectation is that automounter would wait about 10 minutes before unmounting. I'm not sure why this should matter though. It's job is to mount when needed, and unmount when not needed. The problem is that it isn't needed when check_disk does its check, as it just parses the table of currently mounted partitions. If the disk isn't mounted and you run df -h, do you see the partition in the list? If not, that's the same problem, and I'm guessing you've got some other process accessing stuff on that automounted partition with infrequent intervals (so that check_disk happens to flip states between each check). If you do see it, then check_disk is probably doing something the regular old df isn't, and should be fixed. I guess that my expectation is that automounter would wait about 10 minutes before unmounting. Typical normal_check_interval is 5. Lots of assumptions on my part there about your configuration. I have not changed many defaults, certainly not that one. Here's a question : by what means does check_disk do it's checking? I guess it's using system calls? Which ones? strace be thy friend (or whatever tracer is available for the platform you're using). I can look into those calls to see if there is a cleaner way around this than writing a wrapper script. You can use a wrapper-script to just cd to the automounted path and then run check_disk. That should make it work, since the cd'ing into the path trigger the auto-mounter if necessary, or prevent it from un-mounting in the split second check_disk does its thing. -- Andreas Ericsson [EMAIL PROTECTED] OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ 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
Re: [Nagios-users] check_disk and autofs
On Thu, Nov 13, 2008 at 3:41 AM, Andreas Ericsson [EMAIL PROTECTED] wrote: The problem is that it isn't needed when check_disk does its check, as it just parses the table of currently mounted partitions. If the Aha! That's what I'm missing! OK, this would be the problem then. OK, I'll write a wrapper to take care of it - should be easy enough to do. Tusen tak, Andreas! -- I destroy my enemies when I make them my friends - Abraham Lincoln - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ 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
Re: [Nagios-users] check_disk and autofs
On Nov 12, 2008, at 1:24 PM, Alan McKay wrote: Hey folks, Hey =) Welcome. I'm basically calling check_disk with -w -c and -p options. e.g. check_disk -w 20 -c 10 -p /path/to/autofs/mountpoint/disk1 check_disk -w 20 -c 10 -p /path/to/autofs/mountpoint/disk2 I've also tried adding a trailing / to the end of the disk mount point. I went through the check_disk -h output and cannot find anything that might help. And most frustratingly, when I call check_disk manually from the BASH prompt, I always get the info I want - from the disk not the mount point! This is good and tells me that either the command{} definition isn't the same as your test or there are permission problems. Can you post the relevant service{} and command{} definitions? Can you post the permissions on the mountpoints? The nagios user should have rx access to those directories and above. Are you performing your test as the nagios/nrpe user on the remote machine or as root? You shouldn't test as root as there can be significant permission discrepancies compared to the nagios user. -- Marc - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ 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
Re: [Nagios-users] check_disk and autofs
OK, I checked the perms and they seem fine. [EMAIL PROTECTED] nagios]$ ls -ald /opt/corp/projects/BCM_CC drwxrwxrwx 8 otheruser othergroup 1024 2008-10-31 13:52 /opt/corp/projects/BCM_CC Note that otheruser is not nagios. othergroup is one that nagios is not a member of. [EMAIL PROTECTED] nagios]$ ls -ald /opt/corp/projects drwxr-xr-x 3 root root 0 2008-11-12 15:22 /opt/corp/projects Aha, but maybe this is it! Above was with the automounter running. I turned it off and checked again : [EMAIL PROTECTED] linux]# ls -ald /opt/corp/projects/ drwxr-x--- 2 root root 4096 2008-07-14 04:28 /opt/corp/projects/ So I chmodded it 0755 then turned it back on. [EMAIL PROTECTED] nagios]$ ls -ald /opt/corp drwxr-xr-x 4 root root 4096 2008-07-14 04:28 /opt/corp [EMAIL PROTECTED] nagios]$ ls -ald /opt drwxr-xr-x 4 root root 4096 2008-07-14 04:28 /opt Here is what I am doing on the Nagios server itself. Note that check_nfs_disk is the same as check_local_disk in the default config. I just copied it in case I needed to change anything. define service{ use local-service ; Name of service template to use host_name localhost service_description BCM CC Disk service_groups Disks contact_groups admins,LoadBuildAdmins check_command check_nfs_disk!20%!10%!/opt/corp/projects/BCM_CC/ } define command{ command_namecheck_nfs_disk command_line$USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$ } -- I destroy my enemies when I make them my friends - Abraham Lincoln - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ 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
Re: [Nagios-users] check_disk and autofs
Aha, but maybe this is it! Above was with the automounter running. I turned it off and checked again : [EMAIL PROTECTED] linux]# ls -ald /opt/corp/projects/ drwxr-x--- 2 root root 4096 2008-07-14 04:28 /opt/corp/projects/ So I chmodded it 0755 then turned it back on. Nope, in the web GUI it's still flipping back and forth between / and the actual disk I want -- I destroy my enemies when I make them my friends - Abraham Lincoln - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ 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
Re: [Nagios-users] check_disk and autofs
On Nov 12, 2008, at 2:39 PM, Alan McKay wrote: Aha, but maybe this is it! Above was with the automounter running. I turned it off and checked again : [EMAIL PROTECTED] linux]# ls -ald /opt/corp/projects/ drwxr-x--- 2 root root 4096 2008-07-14 04:28 /opt/corp/projects/ So I chmodded it 0755 then turned it back on. Nope, in the web GUI it's still flipping back and forth between / and the actual disk I want Please expand on this. What specifically is flipping back and forth? What is the service output when this is happening? flip-flop behavior is an indicator of accidentally having multiple nagios daemons running at the same time. -- Marc - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ 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
Re: [Nagios-users] check_disk and autofs
Please expand on this. What specifically is flipping back and forth? What is the service output when this is happening? flip-flop behavior is an indicator of accidentally having multiple nagios daemons running at the same time. Right now the screen just refreshed and it's reporting correctly in the web GUI : DISK OK - free space: /opt/corp/projects/BCM_CC 64697 MB (73% inode=99%): Just before the refresh, it had / listed instead of /opt/corp/projects/BCM_CC, and the stats for / as well. In the meantime I have not changed the configuration. I'm thinking that like Hugo said, it could be the response time of the automounter. Maybe I have to write a wrapper-script for check_disk that first cd's to the directory, then sleeps for 1 or 2 seconds, then calls check_disk. Anyone ever done that? Anything special I have to know to do it? -- I destroy my enemies when I make them my friends - Abraham Lincoln - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ 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
Re: [Nagios-users] check_disk and autofs
Right now the screen just refreshed and it's reporting correctly in the web GUI : DISK OK - free space: /opt/corp/projects/BCM_CC 64697 MB (73% inode=99%): There, one more refresh and : DISK OK - free space: / 63202 MB (91% inode=94%): -- I destroy my enemies when I make them my friends - Abraham Lincoln - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ 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
Re: [Nagios-users] check_disk and autofs
On Nov 12, 2008, at 3:06 PM, Alan McKay wrote: Please expand on this. What specifically is flipping back and forth? What is the service output when this is happening? flip-flop behavior is an indicator of accidentally having multiple nagios daemons running at the same time. Right now the screen just refreshed and it's reporting correctly in the web GUI : DISK OK - free space: /opt/corp/projects/BCM_CC 64697 MB (73% inode=99%): Just before the refresh, it had / listed instead of /opt/corp/projects/BCM_CC, and the stats for / as well. In the meantime I have not changed the configuration. I'm thinking that like Hugo said, it could be the response time of the automounter. Maybe I have to write a wrapper-script for check_disk that first cd's to the directory, then sleeps for 1 or 2 seconds, then calls check_disk. Anyone ever done that? Anything special I have to know to do it? A more likely, and elegant reason is that you have multiple nagios daemons running at the same time, one with the current config and one with a prior config that was set to check '/'. That's much easier to verify and fix first than trying to figure out some obscure problem with the automounter. Unless the automounter is unmounting it in the time between checks, I doubt that's going to be it. I would also never expect the mountpoint being checked to change in that event. check_disk just doesn't do that from my experience. -- Marc - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ 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
Re: [Nagios-users] check_disk and autofs
A more likely, and elegant reason is that you have multiple nagios daemons running at the same time, one with the current config and one with a prior config that was set to check '/'. Nope, doesn't appear to be Unless the automounter is unmounting it in the time between checks, Why wouldn't it? That's it's job - to unmount stuff that is not needed anymore. -- I destroy my enemies when I make them my friends - Abraham Lincoln - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ 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
Re: [Nagios-users] check_disk and autofs
On Nov 12, 2008, at 3:57 PM, Alan McKay wrote: Unless the automounter is unmounting it in the time between checks, Why wouldn't it? That's it's job - to unmount stuff that is not needed anymore. I guess that my expectation is that automounter would wait about 10 minutes before unmounting. Typical normal_check_interval is 5. Lots of assumptions on my part there about your configuration. -- Marc - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ 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
Re: [Nagios-users] check_disk and autofs
I guess that my expectation is that automounter would wait about 10 minutes before unmounting. I'm not sure why this should matter though. It's job is to mount when needed, and unmount when not needed. I guess that my expectation is that automounter would wait about 10 minutes before unmounting. Typical normal_check_interval is 5. Lots of assumptions on my part there about your configuration. I have not changed many defaults, certainly not that one. Here's a question : by what means does check_disk do it's checking? I guess it's using system calls? Which ones? I can look into those calls to see if there is a cleaner way around this than writing a wrapper script. -- I destroy my enemies when I make them my friends - Abraham Lincoln - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ 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
Re: [Nagios-users] check_disk and autofs
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alan McKay wrote: Aha, but maybe this is it! Above was with the automounter running. I turned it off and checked again : [EMAIL PROTECTED] linux]# ls -ald /opt/corp/projects/ drwxr-x--- 2 root root 4096 2008-07-14 04:28 /opt/corp/projects/ So I chmodded it 0755 then turned it back on. Nope, in the web GUI it's still flipping back and forth between / and the actual disk I want When you tested by hand. How fast was the response? Could it be that the plugin through nagios is perhaps faster or slower so the response time of the automounter could be an issue? Hugo. - -- [EMAIL PROTECTED] http://hugo.vanderkooij.org/ PGP/GPG? Use: http://hugo.vanderkooij.org/0x58F19981.asc A: Yes. Q: Are you sure? A: Because it reverses the logical flow of conversation. Q: Why is top posting frowned upon? Bored? Click on http://spamornot.org/ and rate those images. Nid wyf yn y swyddfa ar hyn o bryd. Anfonwch unrhyw waith i'w gyfieithu. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFJG0KYBvzDRVjxmYERAj7QAJ9WNdJj1ckBxq672S5j1ISjEZFfeACgmj0k hQy/Zib1ANGO6JR+lRT3CRI= =5nM8 -END PGP SIGNATURE- - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ 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
Re: [Nagios-users] check_disk and autofs
On Nov 12, 2008, at 4:28 PM, Alan McKay wrote: Here's a question : by what means does check_disk do it's checking? I guess it's using system calls? Which ones? I can look into those calls to see if there is a cleaner way around this than writing a wrapper script. Don't remember. I'd have to look at the source but you can do that too. -- Marc - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ 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
Re: [Nagios-users] check_disk and autofs
Don't remember. I'd have to look at the source but you can do that too. yes, I will if none of the designers recall off the top of their head -- I destroy my enemies when I make them my friends - Abraham Lincoln - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ 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