munin-node-win32 icon indicating copy to clipboard operation
munin-node-win32 copied to clipboard

Some removable drives are part of statistic alerted because 100% full

Open o1e9 opened this issue 11 years ago • 1 comments

Hi,

It looks like some devices may be recognized as flash drives however those are license dongles for example and read-only with no disk space left. It creates problems in statistics reporting DISK red because some disks are full.

I have found lines in DiskPlugin related to it:

DiskMuninNodePlugin::DiskMuninNodePlugin() { int i; for (i = 0; i < 32; i++) { drives[i][0] = NULL; } i = 0; for (int d = 'A'; d <= 'Z'; d++) { drives[i][0] = d; drives[i][1] = ':'; drives[i][2] = NULL;//''; drives[i][3] = NULL; if (GetDriveTypeA(drives[i]) != DRIVE_FIXED) { // Remove it drives[i][0] = NULL; } else { i++; } } }

Shall it be like:

if (GetDriveTypeA(drives[i]) != DRIVE_FIXED || GetDriveTypeA(drives[i]) != DRIVE_REMOVABLE) {

So to check explicitly for removable disk drive.

Thank you, Oleg

o1e9 avatar Feb 25 '14 16:02 o1e9

cut&paste mistake, it must be:

if (GetDriveTypeA(drives[i]) != DRIVE_FIXED || GetDriveTypeA(drives[i]) != DRIVE_REMOVABLE) {

o1e9 avatar Feb 27 '14 21:02 o1e9