Having a bit of a strange issue using check_disk and haven't been able to find anything about this problem so far. I'm just trying to monitor an aggregate total of all /dev/* fs on a given system. For the un-aggregated totals, I run the following from nagios server:
$ /usr/lib/nagios/plugins/check_nrpe -H x.x.x.x -c check_disk -a '-f -w 20000 -c 10000 -R '^/dev/*''
DISK CRITICAL - free space: / 19353 MB (59% inode=88%); # Rest of output is ok, just shows 3 disks.
Now, in order to aggregate the space, I simply added a group option:
$ /usr/lib/nagios/plugins/check_nrpe -H x.x.x.x -c check_disk -a '-f -w 20000 -c 10000 -g 'Aggregate Disks' -R '^/dev/*''
DISK CRITICAL - /run/user/1000/gvfs is not accessible: Permission denied
I'm not sure why grouping throws this issue? Some of the things I've tried thus far:
-I 'gvfs' . # Or .gvfs, *gvfs, etc....
--exclude-type=gvfs
Any help would be greatly appreciated.
check_disk plugin issues when using -g group
-
- Posts: 2
- Joined: Tue May 08, 2018 1:56 pm
-
- Posts: 2
- Joined: Tue May 08, 2018 1:56 pm
Re: check_disk plugin issues when using -g group
Just as a heads up if others run into this issue.
I'm not actually sure if this is a bug in check_disk, or simply my misunderstanding of the -g arg. But here is what I've found:
Original method of checking:
/usr/lib/nagios/plugins/check_nrpe -H x.x.x.x -c check_disk -a '-f -w 20000 -c 10000 -g 'Aggregate Disk' -R '^/dev/s*' -i '.gvfs''
DISK CRITICAL - /run/user/1000/gvfs is not accessible: Permission denied
And what actually works:
/usr/lib/nagios/plugins/check_nrpe -H x.x.x.x -c check_disk -a '-f -w 20000 -c 10000 -g 'AggregateDisk' -R '^/dev/s*' -i '.gvfs''
DISK OK - free space: AggregateDisk 116656 MB (48% inode=95%);| AggregateLocalDisk=125917MB;222575;232575;0;242575
Note the difference, there is spacing within the -g option where it fails, and no spacing when it works. The only reason I stumbled upon this is because doing some additional test runs I simply typed 'test' for the group.
Anyways, if anyone has insight as to if this is expected behavior and I'm possibly misunderstanding it, would still appreciate it.
Thanks,
I'm not actually sure if this is a bug in check_disk, or simply my misunderstanding of the -g arg. But here is what I've found:
Original method of checking:
/usr/lib/nagios/plugins/check_nrpe -H x.x.x.x -c check_disk -a '-f -w 20000 -c 10000 -g 'Aggregate Disk' -R '^/dev/s*' -i '.gvfs''
DISK CRITICAL - /run/user/1000/gvfs is not accessible: Permission denied
And what actually works:
/usr/lib/nagios/plugins/check_nrpe -H x.x.x.x -c check_disk -a '-f -w 20000 -c 10000 -g 'AggregateDisk' -R '^/dev/s*' -i '.gvfs''
DISK OK - free space: AggregateDisk 116656 MB (48% inode=95%);| AggregateLocalDisk=125917MB;222575;232575;0;242575
Note the difference, there is spacing within the -g option where it fails, and no spacing when it works. The only reason I stumbled upon this is because doing some additional test runs I simply typed 'test' for the group.
Anyways, if anyone has insight as to if this is expected behavior and I'm possibly misunderstanding it, would still appreciate it.
Thanks,
Re: check_disk plugin issues when using -g group
Have you tried running it locally to see if it makes a difference? I tried both of your commands and here is the output:
What version of check_disk do you have?
Code: Select all
[root@localhost libexec]# ./check_disk -f -w 20000 -c 10000 -g 'Aggregate Disk' -R '^/dev/s*' -i '.gvfs'
DISK OK - free space: Aggregate Disk 30542 MB (80.76% inode=95%);| 'Aggregate Disk'=7143MB;17686;27686;0;37686
[root@localhost libexec]# ./check_disk -f -w 20000 -c 10000 -g 'AggregateDisk' -R '^/dev/s*' -i '.gvfs'
DISK OK - free space: AggregateDisk 30542 MB (80.76% inode=95%);| AggregateDisk=7143MB;17686;27686;0;37686
Code: Select all
/usr/lib/nagios/plugins/check_disk --version