set column filtering exception for debug and verbose > 3
4f8a7a0f
Hari Sekhon
committed
1 changed file
check_mapr-fs_volume.pl
/check_mapr-fs_volume.pl-2+5
/check_mapr-fs_volume.pl
Add comment 12
Add comment 13 $DESCRIPTION = "Nagios Plugin to check MapR-FS volumes are mounted, not read-only and not in need of Gfsck via the MapR Control System REST API
Add comment 14
Add comment 15 Minus  Can specify a single volume to check, by default checks all volumes.
Add comment 15 Plus  Can specify a single volume to check, by default checks all volumes. Checking a single volume at a time and using the --ignore-* switches gives more control to avoid alerts.
Add comment 16 Plus  
Add comment 17 Plus  There is a in-built exception to permit mapr.cldb.internal volume to not be mounted as this is normal.
Add comment 16 18
Add comment 17 19 Tested on MapR 4.0.1";
Add comment 18 20
Add comment 63 65 my $url = "/volume/list?";
Add comment 64 66 $url .= "cluster=$cluster&" if $cluster;
Add comment 65 67 $url .= "filter=[volumename==$volume]&" if $volume;
Add comment 66 Minus  $url .= "columns=volumename,mountdir,readonly,needsGfsck,mounted";
Add comment 68 Plus  $url .= "columns=volumename,mountdir,readonly,needsGfsck,mounted" unless ($debug or $verbose > 3);
Add comment 69 Plus  $url =~ s/&$//;
Add comment 67 70
Add comment 68 71 $json = curl_mapr $url, $user, $password;
Add comment 69 72