SNMP OID Query for Windows Partition

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
cccbbb
Posts: 23
Joined: Mon Aug 20, 2012 10:18 am

Re: SNMP OID Query for Windows Partition

Post by cccbbb »

Thanks!
10.3 repo availability is the big issue I think so it is time to upgrade anyway...going to upgrade OpenSuse to 11.0 then 11.4 then upgrading Nagios Core to Nagios XI...
then revisting WMI queries.
I keep you posted
cccbbb
Posts: 23
Joined: Mon Aug 20, 2012 10:18 am

Re: SNMP OID Query for Windows Partition

Post by cccbbb »

Had a Perl Mod Issue but resolved it
cccbbb
Posts: 23
Joined: Mon Aug 20, 2012 10:18 am

Re: SNMP OID Query for Windows Partition

Post by cccbbb »

Have the WMI checks working using wmic and the check_wmi_plus script.

perl check_wmi_plus.pl --inidir=/usr/lib/nagios/plugins/ -H x.x.x.x -u domain/username -p xxxxxxx -m checkdrivesize -o 1 -3 1
OK - Overall Disk Total=1990.50GB, Used=991.87GB (49.8%), Free=998.63GB (50.2%) |'Overall Disk Space'=991.87GB; 'Overall Disk Utilisation'=49.8%;

but cannot find the right commands for the paritions without drive letters...

perl check_wmi_plus.pl --inidir=/usr/lib/nagios/plugins/ -H x.x.x.x -u domain/username -p xxxxxx -m checkdrivesize -o
Option otheraguments requires an argument
UNKNOWN - Could not find a drive matching '' or the WMI data returned is invalid. Available Drives are E:, F:, G:, I:, K:, L:, M:, O:, Q:

hopefully this isnt that hard
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: SNMP OID Query for Windows Partition

Post by yancy »

cccbb,

are you able to see the drive statistics using WMIC?

for example:
./wmic -U administrator%password //192.168.5.87 "select * from Win32_LogicalDisk"

Regards,

-Yancy
cccbbb
Posts: 23
Joined: Mon Aug 20, 2012 10:18 am

Re: SNMP OID Query for Windows Partition

Post by cccbbb »

yes but once again only partitions using drive letters..


CLASS: Win32_LogicalDisk
Access|Availability|BlockSize|Caption|Compressed|ConfigManagerErrorCode|ConfigManagerUserConfig|CreationClassName|Description|DeviceID|DriveType|ErrorCleared|ErrorDescription|ErrorMethodology|FileSystem|FreeSpace|InstallDate|LastErrorCode|MaximumComponentLength|MediaType|Name|NumberOfBlocks|PNPDeviceID|PowerManagementCapabilities|PowerManagementSupported|ProviderName|Purpose|QuotasDisabled|QuotasIncomplete|QuotasRebuilding|Size|Status|StatusInfo|SupportsDiskQuotas|SupportsFileBasedCompression|SystemCreationClassName|SystemName|VolumeDirty|VolumeName|VolumeSerialNumber
0|0|0|A:|False|0|False|Win32_LogicalDisk|3 1/2 Inch Floppy Drive|A:|2|False|(null)|(null)|(null)|0|(null)|0|0|5|A:|0|(null)|NULL|False|(null)|(null)|False|False|False|0|(null)|0|False|False|Win32_ComputerSystem|VM-EXCH-DAG2|False|(null)|(null)
0|0|0|C:|False|0|False|Win32_LogicalDisk|Local Fixed Disk|C:|3|False|(null)|(null)|NTFS|15701860352|(null)|0|255|12|C:|0|(null)|NULL|False|(null)|(null)|True|False|False|42842714112|(null)|0|True|True|Win32_ComputerSystem|VM-EXCH-DAG2|False||A0CD0F3D
0|0|0|D:|False|0|False|Win32_LogicalDisk|CD-ROM Disc|D:|5|False|(null)|(null)|(null)|0|(null)|0|0|11|D:|0|(null)|NULL|False|(null)|(null)|False|False|False|0|(null)|0|False|False|Win32_ComputerSystem|VM-EXCH-DAG2|False|(null)|(null)
0|0|0|E:|False|0|False|Win32_LogicalDisk|Local Fixed Disk|E:|3|False|(null)|(null)|NTFS|8845971456|(null)|0|255|12|E:|0|(null)|NULL|False|(null)|(null)|True|False|False|10090442752|(null)|0|True|True|Win32_ComputerSystem|VM-EXCH-DAG2|False|Exchange|6C5C9E3B
0|0|0|F:|False|0|False|Win32_LogicalDisk|Local Fixed Disk|F:|3|False|(null)|(null)|NTFS|43302715392|(null)|0|255|12|F:|0|(null)|NULL|False|(null)|(null)|True|False|False|225348354048|(null)|0|True|False|Win32_ComputerSystem|VM-EXCH-DAG2|False|DB1|8CD27768
0|0|0|G:|False|0|False|Win32_LogicalDisk|Local Fixed Disk|G:|3|False|(null)|(null)|NTFS|39090520064|(null)|0|255|12|G:|0|(null)|NULL|False|(null)|(null)|True|False|False|225348354048|(null)|0|True|False|Win32_ComputerSystem|VM-EXCH-DAG2|False|DB2|7CDD7296
0|0|0|I:|False|0|False|Win32_LogicalDisk|Local Fixed Disk|I:|3|False|(null)|(null)|NTFS|28560130048|(null)|0|255|12|I:|0|(null)|NULL|False|(null)|(null)|True|False|False|225348354048|(null)|0|True|False|Win32_ComputerSystem|VM-EXCH-DAG2|False|DB3|CC02777F
0|0|0|K:|False|0|False|Win32_LogicalDisk|Local Fixed Disk|K:|3|False|(null)|(null)|NTFS|16264593408|(null)|0|255|12|K:|0|(null)|NULL|False|(null)|(null)|True|False|False|42812243968|(null)|0|True|False|Win32_ComputerSystem|VM-EXCH-DAG2|False|LOGS1|ACA204FC
0|0|0|L:|False|0|False|Win32_LogicalDisk|Local Fixed Disk|L:|3|False|(null)|(null)|NTFS|40267874304|(null)|0|255|12|L:|0|(null)|NULL|False|(null)|(null)|True|False|False|42812243968|(null)|0|True|False|Win32_ComputerSystem|VM-EXCH-DAG2|False|LOGS2|7CB19E90
0|0|0|M:|False|0|False|Win32_LogicalDisk|Local Fixed Disk|M:|3|False|(null)|(null)|NTFS|816390864896|(null)|0|255|12|M:|0|(null)|NULL|False|(null)|(null)|True|False|False|1288353808384|(null)|0|True|False|Win32_ComputerSystem|VM-EXCH-DAG2|False|Journal|BA1D3A42
0|0|0|O:|False|0|False|Win32_LogicalDisk|Local Fixed Disk|O:|3|False|(null)|(null)|NTFS|73359949824|(null)|0|255|12|O:|0|(null)|NULL|False|(null)|(null)|True|False|False|75025547264|(null)|0|True|False|Win32_ComputerSystem|VM-EXCH-DAG2|False|JALogs|56A9B47A
0|0|0|Q:|False|0|False|Win32_LogicalDisk|Local Fixed Disk|Q:|3|False|(null)|(null)|NTFS|1640906752|(null)|0|255|12|Q:|0|(null)|NULL|False|(null)|(null)|True|False|False|2144333824|(null)|0|True|True|Win32_ComputerSystem|VM-EXCH-DAG2|False|Avamar|72447D83
cccbbb
Posts: 23
Joined: Mon Aug 20, 2012 10:18 am

Re: SNMP OID Query for Windows Partition

Post by cccbbb »

Using Win32_Volume does return the partitions in the query but I am not sure how you would retrieve used disk space and warn/critically alert on it....
they are listed under the E:\

from Win32_Volume"
CLASS: Win32_Volume
Access|Automount|Availability|BlockSize|BootVolume|Capacity|Caption|Compressed|ConfigManagerErrorCode|ConfigManagerUserConfig|CreationClassName|Description|DeviceID|DirtyBitSet|DriveLetter|DriveType|ErrorCleared|ErrorDescription|ErrorMethodology|FileSystem|FreeSpace|IndexingEnabled|InstallDate|Label|LastErrorCode|MaximumFileNameLength|Name|NumberOfBlocks|PageFilePresent|PNPDeviceID|PowerManagementCapabilities|PowerManagementSupported|Purpose|QuotasEnabled|QuotasIncomplete|QuotasRebuilding|SerialNumber|Status|StatusInfo|SupportsDiskQuotas|SupportsFileBasedCompression|SystemCreationClassName|SystemName|SystemVolume
0|True|0|4096|False|104853504|\\?\Volume{208d305a-c503-11e0-8410-806e6f6e6963}\|False|0|False|(null)|(null)|\\?\Volume{208d305a-c503-11e0-8410-806e6f6e6963}\|False|(null)|3|False|(null)|(null)|NTFS|75362304|True|(null)|System Reserved|0|255|\\?\Volume{208d305a-c503-11e0-8410-806e6f6e6963}\|0|False|(null)|NULL|False|(null)|False|False|False|2362140965|(null)|0|True|True|(null)|VM-EXCH-DAG2|True
0|True|0|4096|False|10090442752|E:\|False|0|False|(null)|(null)|\\?\Volume{0b353efb-c509-11e0-9ecf-005056a30012}\|False|E:|3|False|(null)|(null)|NTFS|8845578240|True|(null)|Exchange|0|255|E:\|0|False|(null)|NULL|False|(null)|False|False|False|1818009147|(null)|0|True|True|(null)|VM-EXCH-DAG2|False
0|True|0|65536|False|42812243968|K:\|False|0|False|(null)|(null)|\\?\Volume{6be4729e-6543-460b-8d37-c8db00a66430}\|False|K:|3|False|(null)|(null)|NTFS|15901917184|True|(null)|LOGS1|0|255|K:\|0|False|(null)|NULL|False|(null)|False|False|False|2896299260|(null)|0|True|False|(null)|VM-EXCH-DAG2|False
0|True|0|65536|False|42812243968|L:\|False|0|False|(null)|(null)|\\?\Volume{f8de9941-ba94-437f-a74a-5e935c17ffaf}\|False|L:|3|False|(null)|(null)|NTFS|40110850048|True|(null)|LOGS2|0|255|L:\|0|False|(null)|NULL|False|(null)|False|False|False|2092015248|(null)|0|True|False|(null)|VM-EXCH-DAG2|False
0|True|0|65536|False|225348354048|F:\|False|0|False|(null)|(null)|\\?\Volume{7e4eb5e5-8b77-4b97-9df9-8b1d11805f25}\|False|F:|3|False|(null)|(null)|NTFS|43167186944|True|(null)|DB1|0|255|F:\|0|False|(null)|NULL|False|(null)|False|False|False|2362603368|(null)|0|True|False|(null)|VM-EXCH-DAG2|False
0|True|0|65536|False|225348354048|G:\|False|0|False|(null)|(null)|\\?\Volume{b40149bf-63ff-46b3-997e-aa5140b33842}\|False|G:|3|False|(null)|(null)|NTFS|39090913280|True|(null)|DB2|0|255|G:\|0|False|(null)|NULL|False|(null)|False|False|False|2094887574|(null)|0|True|False|(null)|VM-EXCH-DAG2|False
0|True|0|65536|False|225348354048|I:\|False|0|False|(null)|(null)|\\?\Volume{477d6f0a-a4d2-4b15-989f-ced1c9bd610e}\|False|I:|3|False|(null)|(null)|NTFS|28558098432|True|(null)|DB3|0|255|I:\|0|False|(null)|NULL|False|(null)|False|False|False|3422713727|(null)|0|True|False|(null)|VM-EXCH-DAG2|False
0|True|0|65536|False|225348354048|E:\Database\DB4\|False|0|False|(null)|(null)|\\?\Volume{f7e6a6ca-7818-492f-9029-4751f6e47423}\|False|(null)|3|False|(null)|(null)|NTFS|22919643136|True|(null)|DB4-P|0|255|E:\Database\DB4\|0|False|(null)|NULL|False|(null)|False|False|False|3300624655|(null)|0|True|False|(null)|VM-EXCH-DAG2|False
0|True|0|65536|False|1288353808384|M:\|False|0|False|(null)|(null)|\\?\Volume{eced3aa7-60a9-4ec8-878a-f32461709d5a}\|False|M:|3|False|(null)|(null)|NTFS|816248520704|True|(null)|Journal|0|255|M:\|0|False|(null)|NULL|False|(null)|False|False|False|3122477634|(null)|0|True|False|(null)|VM-EXCH-DAG2|False
0|True|0|65536|False|225482571776|E:\Database\TempStore\|False|0|False|(null)|(null)|\\?\Volume{353677c7-9c86-11e1-90f3-005056a3001a}\|False|(null)|3|False|(null)|(null)|NTFS|225387151360|True|(null)|MigrationTempStore|0|255|E:\Database\TempStore\|0|False|(null)|NULL|False|(null)|False|False|False|1925025851|(null)|0|True|False|(null)|VM-EXCH-DAG2|False
0|True|0|65536|False|75025547264|O:\|False|0|False|(null)|(null)|\\?\Volume{5d33c74c-6037-4f99-a3a4-cf49a018a5ec}\|False|O:|3|False|(null)|(null)|NTFS|73174351872|True|(null)|JALogs|0|255|O:\|0|False|(null)|NULL|False|(null)|False|False|False|1453962362|(null)|0|True|False|(null)|VM-EXCH-DAG2|False
0|True|0|4096|False|2144333824|Q:\|False|0|False|(null)|(null)|\\?\Volume{8ca3e6b2-c76b-11e0-82ad-005056a3001a}\|False|Q:|3|False|(null)|(null)|NTFS|1640906752|True|(null)|Avamar|0|255|Q:\|0|False|(null)|NULL|False|(null)|False|False|False|1917091203|(null)|0|True|True|(null)|VM-EXCH-DAG2|False
0|True|0|4096|False|161058123776|E:\Database\Archive\|False|0|False|(null)|(null)|\\?\Volume{354f48a1-08cb-11e1-82ad-005056a3001a}\|False|(null)|3|False|(null)|(null)|NTFS|35455455232|False|(null)|ArchiveDB-P|0|255|E:\Database\Archive\|0|False|(null)|NULL|False|(null)|False|False|False|1183236009|(null)|0|True|True|(null)|VM-EXCH-DAG2|False
[color=#000FF]0|True|0|65536|False|37577752576|E:\Logs\LOGS3\|False|0|False|(null)|(null)|\\?\Volume{353673ad-9c86-11e1-90f3-005056a3001a}\|False|(null)|3|False|(null)|(null)|NTFS|34607529984|True|(null)|LOGS3-S|0|255|E:\Logs\LOGS3\|0|False|(null)|NULL|False|(null)|False|False|False|2224143456|(null)|0|True|False|(null)|VM-EXCH-DAG2|False[/color]
0|True|0|65536|False|397281263616|E:\Database\DB6\|False|0|False|(null)|(null)|\\?\Volume{b1ba57ba-4a3b-11e1-90f3-005056a3001a}\|False|(null)|3|False|(null)|(null)|NTFS|152580521984|True|(null)|DB6-S|0|255|E:\Database\DB6\|0|False|(null)|NULL|False|(null)|False|False|False|2558053893|(null)|0|True|False|(null)|VM-EXCH-DAG2|False[/color][/color]
0|True|0|4096|True|42842714112|C:\|False|0|False|(null)|(null)|\\?\Volume{208d305b-c503-11e0-8410-806e6f6e6963}\|False|C:|3|False|(null)|(null)|NTFS|15701778432|True|(null)|(null)|0|255|C:\|0|True|(null)|NULL|False|(null)|False|False|False|2697793341|(null)|0|True|True|(null)|VM-EXCH-DAG2|False
0|True|0|0|False|0|D:\|False|0|False|(null)|(null)|\\?\Volume{208d3060-c503-11e0-8410-806e6f6e6963}\|False|D:|5|False|(null)|(null)|(null)|0|False|(null)|(null)|0|0|D:\|0|False|(null)|NULL|False|(null)|False|False|False|0|(null)|0|False|False|(null)|VM-EXCH-DAG2|False
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: SNMP OID Query for Windows Partition

Post by yancy »

cccbb,

take a look at check_wmi_plus.ini. A list of predefined checks are listed, where the header name is the WMI check.

for example, the sectio [info listsoftware2003] can be ran like:

./check_wmi_plus.pl -H <ip> -u <user> -p <password> -m "info listsoftware2003"

you can define your own definitions by either creating a different .ini file or adding to check_wmi_plus.ini

http://www.edcint.co.nz/checkwmiplus/?q=node/78

I can put together an example if your still not finding the information you need.

Regards,

-Yancy
Locked