I have a service on all my servers to check the available space on disks. We are currently able to exclude the CDROM and/or any removable drives as well as the S: (we use for swap) and A: drives from the check but have been unable to figure out how to exclude RDM (Raw Disk Mappings) disks. Our current command is as follows:
check_drivesize "filter=type not in ('CDROM, 'REMOVABLE')" drive=* "crit=free<100M" "warn=free<500M" "exclude=S:\\\" "exclude=A:\\\" "exclude=System Reserved" "detail-syntax=%(drive_or_name): ${total_free}" "perf-config=free.free(unit:G) free(igno9red:true)"
and yields the following result when run on a server that has an RDM drive:
Filter processing failed: Failed to get size for \\?\Volume{7e8cac3e-b3af-11e7-8157-005056899fd6}\: 3ed: The volume does not contain a recognized file system. : 0 < convert(104857600)
How can we exclude RDM drives from these checks?
Need to exclude RDM from check_drivesize
Re: Need to exclude RDM from check_drivesize
Hello @dxb74
Thanks for reaching out, taking a look at the options we see that this is the [url=example to exclude:[/url]
or your example:
Please let us know how things look,
Perry
Thanks for reaching out, taking a look at the options we see that this is the [url=example to exclude:[/url]
Without the ability to test but it appears that the following can exclude the \\? path, since I don't have a system to test this on.check_drivesize "crit=free<1g" drive=* "filter=type in ('fixed', 'remote')" exclude=C:\\ exclude=D:\\
Code: Select all
check_drivesize -a "filter=type not in ('CDROM', 'REMOVABLE')" "exclude=\\?"Look like this:\\?\Volume{7e8cac3e-b3af-11e7-8157-005056899fd6}\
Code: Select all
check_drivesize -a "filter=type not in ('CDROM', 'REMOVABLE')" "exclude=\\?\Volume{7e8cac3e-b3af-11e7-8157-005056899fd6}\"Perry
Re: Need to exclude RDM from check_drivesize
Unfortunately, neither of those two exclude flags ("exclude=\\?\" nor "exclude=\\?\Volume{7e8cac3w-b31f-11e7-8157-005056899fd6}\") work.
Still get this error: Filter processing failed: Failed to get size for \\?\Volume{7e8cac3w-b31f-11e7-8157-005056899fd6}\: 3ed: The volume does not contain a recognized file system.: 0 > convert(0).
Was hoping that there was a 'type' (similar to CDROM, REMOVABLE, FIXED, etc.) that would correspond to a RDM (Raw Disk Mapping) that I could filter out.
I tried the flag: "filter=type not in ('cdrom', 'removable, 'raw')" but that yielded the error: Filter processing failed: Failed to convert type: raw, Failed to convert type: cdrom, removable, raw: 3 not in convert(0)
Still get this error: Filter processing failed: Failed to get size for \\?\Volume{7e8cac3w-b31f-11e7-8157-005056899fd6}\: 3ed: The volume does not contain a recognized file system.: 0 > convert(0).
Was hoping that there was a 'type' (similar to CDROM, REMOVABLE, FIXED, etc.) that would correspond to a RDM (Raw Disk Mapping) that I could filter out.
I tried the flag: "filter=type not in ('cdrom', 'removable, 'raw')" but that yielded the error: Filter processing failed: Failed to convert type: raw, Failed to convert type: cdrom, removable, raw: 3 not in convert(0)
Re: Need to exclude RDM from check_drivesize
Hello @dxb74
Looks like RDM is not associated with a recognized file system, with that it appears that the check_drivesize will not be able to exclude it.
Let's see if there are any others in the forum that have suggestions, please chime in.
Thanks,
Perry
Looks like RDM is not associated with a recognized file system, with that it appears that the check_drivesize will not be able to exclude it.
Let's see if there are any others in the forum that have suggestions, please chime in.
Thanks,
Perry
Re: Need to exclude RDM from check_drivesize
UPDATE: We were able to get it to exclude the RDM drives with the following command: check_nrpe -H 127.0.0.1 -c check_drivesize "detail-syntax=%{drive_or_name}: ${used}/${size} used" exclude=S:\ exclude=A:\ "filter=type not in ('cdrom', 'removable') and mounted=1" "crit=free<100M" "warn=free<500M"
The key was the 'and mounted=1' in the filter.
However, I now have a new question. When running this command we get output like so: OK All 2 drive(s) are ok|'D:\ free'=197.2831GB;0.48827;0.09765;0;249.99804 'D:\ free %'=79%;0;0;0;100 'C:\ free'=13.87358GB;0.48827;0.09765;0;59.65527 'C:\ free
%'=23%;1;0;0;100
For this server, the D: drive has a size of 250 GB, 197 GB of which are free. So when the result shows 'D:\ free'=197.2831GB;0.48827;0.09765;0;249.99804' what do all of those numbers represent? Obviously, the first number is GB free and the last is GB Total size. What are the ones in between and how can I get rid of them? Ideally, we'd like the status to read something like: "197 GB free out of 250 GB Total", or something to that effect - simple and informative.
The key was the 'and mounted=1' in the filter.
However, I now have a new question. When running this command we get output like so: OK All 2 drive(s) are ok|'D:\ free'=197.2831GB;0.48827;0.09765;0;249.99804 'D:\ free %'=79%;0;0;0;100 'C:\ free'=13.87358GB;0.48827;0.09765;0;59.65527 'C:\ free
%'=23%;1;0;0;100
For this server, the D: drive has a size of 250 GB, 197 GB of which are free. So when the result shows 'D:\ free'=197.2831GB;0.48827;0.09765;0;249.99804' what do all of those numbers represent? Obviously, the first number is GB free and the last is GB Total size. What are the ones in between and how can I get rid of them? Ideally, we'd like the status to read something like: "197 GB free out of 250 GB Total", or something to that effect - simple and informative.
Re: Need to exclude RDM from check_drivesize
Hello @dxb74
Excellent find and leg work on the 'and mounted=1' filter to get the exclude to work.
Digging into the script we see that the additional data is including the performance data:
Thanks,
Perry
Excellent find and leg work on the 'and mounted=1' filter to get the exclude to work.
Digging into the script we see that the additional data is including the performance data:
Does not appear that there is an option to exclude that data from the results.request.add_arguments("perf-config=free(unit:" + perf_unit + ")used(unit:" + perf_unit + ")");
request.add_arguments("detail-syntax=${drive}: Total: ${size} - Used: ${used} - Free: ${free}");
Thanks,
Perry