I've been using
check_disk without problems until yesterday to check the free space in some partitions.
Now we just added a NAS service from our hosting and I could mount it without problems, and, since we have a fixed amount of space, I would like to check the free space with Nagios for not being overcharged.
The problem is sometimes when
check_disk goes to check then I get "unknown" status since of course autofs don't maintain the partition mounted 100% of the time. *(Nagios-users) check_disk and autofs* recommends making a wrapper for the plugin, but I don't feel comfortable with that.
Any idea about a better solution?
Well, I found a solution for this:
- I've compiled and installed the check_file plugin.
- Created a file on the NAS root:
- Configured Nagios to check often if this file exists, rather than check the space.
So I can check if the NAS is mounted and the free space.
SERVICE STATUS: OK file or directory /mnt/backup/.nagioscheck exists