[ZBXNEXT-2006] LLD Macro for Windows Drive Type Created: 2013 Nov 08  Updated: 2014 Nov 11  Resolved: 2014 Nov 11

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Agent (G)
Affects Version/s: 2.2.0
Fix Version/s: 2.5.0

Type: Change Request Priority: Blocker
Reporter: Philipp Wiesner Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: lld, patch, windows
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Minimum supported client: Windows XP [desktop apps only]
Minimum supported server: Windows Server 2003 [desktop apps only]

Header: FileAPI.h (include Windows.h); WinBase.h on Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP (include Windows.h)

Library: Kernel32.lib

DLL: Kernel32.dll


Attachments: Text File drive_type_diskspace.patch    
Issue Links:
Duplicate

 Description   

Actual Status:
LLD on Windows machines can only be filtered by file system type (NTFS, FAT32, etc). On a setting where two servers are monitored by LLDs and both have mounted drives from the other server, this will led to double checked file systems.

Target State:
Additional LLD macro #DRTYPE which will provide drive type information by MSDN function GetDriveType(lpRootPathName). By defining the LLD rule with this macro and filtering by, for example, the return code DRIVE_FIXED it can be secured that only internal drives like C:\ will be checked.
From MSDN this function returns the following:
Return code/value Description

DRIVE_UNKNOWN 0 The drive type cannot be determined.

DRIVE_NO_ROOT_DIR 1 The root path is invalid; for example, there is no volume mounted at the specified path.

DRIVE_REMOVABLE 2 The drive has removable media; for example, a floppy drive, thumb drive, or flash card reader.

DRIVE_FIXED 3 The drive has fixed media; for example, a hard disk drive or flash drive.

DRIVE_REMOTE 4 The drive is a remote (network) drive.

DRIVE_CDROM 5 The drive is a CD-ROM drive.

DRIVE_RAMDISK 6 The drive is a RAM disk.

This functionality can be implemented by applying the attached patch.

For the future the functionality of this and other macros can be expanded by implementing a multiple macro filtering.



 Comments   
Comment by richlv [ 2014 Nov 06 ]

(1) documentation

  • whatsnew
  • lld page
  • a special note should be added that filtering by this new macro/variable will make entities ignored with older agents (where it would not be present)

asaveljevs Documented at the following locations:

A note regarding discovered entities being ignored for older agents was added to the first two links above, the rest was left for ZBX-9000.

RESOLVED

wiper CLOSED

Comment by Aleksandrs Saveljevs [ 2014 Nov 07 ]

Specification available at https://www.zabbix.org/wiki/Docs/specs/ZBXNEXT-2006 .

Comment by Aleksandrs Saveljevs [ 2014 Nov 07 ]

Available in development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-2006 .

Comment by Andris Zeila [ 2014 Nov 10 ]

Successfully tested

Comment by Aleksandrs Saveljevs [ 2014 Nov 10 ]

Available in pre-2.5.0 (trunk) r50530.

Generated at Fri Mar 29 07:27:25 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.