Friday 10 May 2013

DISK CRITICAL - /root/.gvfs is not accessible: Permission denied


I was getting Nagios Error to access /root/.gvfs on CentOS release 6.3 (Final) Operating System.

Problem:

***** Nagios *****

Notification Type: PROBLEM

Service: Drive [HDD]
Host: dr01.mydomain.in
Address: 10.242.1.8
State: CRITICAL

Date/Time: Fri May 10 11:09:56 IST 2013

Additional Info:

DISK CRITICAL - /root/.gvfs is not accessible: Permission denied


Solution 1:
/root/.gvfs file system is virtual file system that is not recognized by nagios tool. So you can umount this file system, it will not affect the usage mounted disk in system.
Run Command:
[root@dr01 ~]# umount /root/.gvfs
Now nagios monitor the disk correctly.

***** Nagios *****

Notification Type: RECOVERY

Service: Drive [HDD]
Host: dr01.mydomain.in
Address: 10.242.1.8
State: OK

Date/Time: Fri May 10 11:24:56 IST 2013

Additional Info:

DISK OK - free space: / 66993 MB (89% inode=97%): /dev/shm 7950 MB (99% inode=99%): /DRData 5610141 MB (71% inode=99%):

Solution 2:
My investigation showed that this problem appears due to special permissions set by FUSE on the .gvfs directory: nobody, even root cannot access it. It is only used internally by FUSE. Workaround for nagios is discussed here. We use the "-i ignored_path" key of the check_disk plugin.
So, in my case i modified /etc/nagios2/conf.d/localhost_nagios2.cfg in the following way:
define command{
  command_name  check_all_disks_plus
  command_line  /usr/lib/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$  -u GB -A -i .gvfs
  }

define service{
  use                  generic-service
  host_name            localhost
  service_description  Disk Space
  check_command        check_all_disks_plus!20%!10%
  }


7 comments: