[ZBXNEXT-1595] Discover windows mount points (mounted to folder) Created: 2013 Jan 25  Updated: 2021 Sep 30  Resolved: 2021 Sep 30

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Agent (G), Server (S)
Affects Version/s: None
Fix Version/s: None

Type: New Feature Request Priority: Major
Reporter: yayo Assignee: Unassigned
Resolution: Fixed Votes: 23
Labels: agent, discovery, lld, mountpoint, server
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows Based OS (typically Windows Server)


Issue Links:
Duplicate
duplicates ZBX-15962 Zabbix Windows Agent vfs.fs.discovery... Closed
is duplicated by ZBX-15965 vfs.fs.discovery does not include vol... Closed

 Description   

I'm tring to use LLD vfs.fs.discovery to discover mounted filesystems in Windows Server (2003 or 2008) ... vfs.fs.discovery work fine and discover disks where mount points are monted but not munt point.

More Specific:

Disk are: M: and N:

Mount Points are:
M:\Applications\ApplicationA,
M:\Applications\ApplicationB,
M:\Applications\Application[...],
M:\Logs\LogDB01,
M:\Logs\LogDB02,
M:\Logs\LogDB[...],
[...]
N:\Datafile\DatafileDB01,
N:\Datafile\DatafileDB02,
N:\Datafile\Datafile[...],
N:\UserSpace\App01UserSpace,
N:\UserSpace\App02UserSpace,
N:\UserSpace\App[...]UserSpace

In my case discovery have found only: M: and N: and added items: Free disk space on

{#FSNAME}, Free disk space on {#FSNAME}

(percentage), Total disk space on

{#FSNAME}, Used disk space on {#FSNAME}

via Item Prototype

We need a (for example) vfs.fs.mountpoints.win.discovery or vfs.fs.discovery with improvement for discover Windows MountPoint or something else.



 Comments   
Comment by Matt Keller [ 2014 May 21 ]

I just wanted to add that the vfs.fs.* keys can currently monitor windows mount points. (E.g. vfs.fs.size[c:\MountPoints\ExchangeLogs,free]) The issue is just that the vfs.fs.discovery key isn't discovering the mount points.

Comment by Bernhard Linz [ 2015 Mar 22 ]

I have the same problem. i create a solution via zabbix_agentd.exe and UserParameter:

http://znil.net/index.php?title=Zabbix:Template_Windows_Mountpoints-Discover_-_Windows_Volumes_ohne_Laufwerk_entdecken

Bernhard

Comment by Jan Müller [ 2019 Apr 15 ]

I'm using Bernhard's solution but it should be in standard vfs.fs.discovery.

Thank You!

Comment by Ilya Kruchinin [ 2019 Jul 29 ]

Just as mentioned, zabbix-agent is already able to monitor free space on Windows mountpoints.

It's just that vfs.fs.discrovery is not able to discover them.

 

We use the following batch file + preprocessing with Zabbix 4.2 (confirmed working with Windows 2003 and later, not tested on Windows 2000), but would be good to have this built into zabbix-agent - based discovery for Windows

 

@echo off
setlocal EnableDelayedExpansion
 
echo [
 
for /f "tokens=* delims= " %%G in ('mountvol /L ^| findstr /r /i /c:"^\ \ *[A-Z]\:\\[^$]"') do (
 set myvar=%%G
 echo { "mountpoint": "!myvar:\=\\!" }
REM ### The below line is "echoing" a comma without newline character, to simplify json formatting and Zabbix preprocessing
REM ### Use "(?s)(.*),]" and output as "\1]" in Zabbix preprocessing rule for regex
REM ### Use javascript preprocessing to remove the trailing slash: var replaced = value.replace(/\\\\"/g, '"'); return (replaced)
 echo | set /p nonewlinevar=,
 )
 
EndLocal
echo ]
Comment by Ilya Kruchinin [ 2019 Jul 29 ]

Additional info that may be relevant for Zabbix devs (Windows API-specific from Windows 2000 onwards):
https://blogs.msdn.microsoft.com/adioltean/2005/04/17/ntfs-curiosities-part-2-volumes-volume-names-and-mount-points/

Comment by Ilya Kruchinin [ 2019 Jul 30 ]

Wondering if https://support.zabbix.com/browse/ZBX-15962 fixed this, or is it a different case?

Comment by Gert Jan Bouman [ 2019 Nov 08 ]

@Ilya

Yes, it appears to be working

Comment by Alexei Vladishev [ 2021 Sep 30 ]

The issue has been fixed under ZBX-15962 a few years ago, feel free to re-open if you think otherwise.

Generated at Fri Mar 29 01:40:50 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.