[ZBX-5094] Return value {#FSNAME} on windows should not be backslashed Created: 2012 May 29  Updated: 2017 May 30  Resolved: 2012 Jun 21

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 2.0.0
Fix Version/s: 2.0.1rc2, 2.1.0

Type: Incident report Priority: Trivial
Reporter: Alexandru Nica Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: lld, windows
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows


Issue Links:
Duplicate
is duplicated by ZBXNEXT-1455 vfs.fs.discovery on Windows, addition... Closed

 Description   

Returned values for

{#FSNAME}

in vfs.fs.discovery should return just the drive letter and ":" (eg. C
Right now, it returns the drive letter, ":" and a backlash (eg. C:) which cannot be used in performance counters which take the drive letter without backslash.

I think it's a change small enough to not break compatibility with existing templates.



 Comments   
Comment by Oleksii Zagorskyi [ 2012 May 30 ]

I support this idea.
For example, to change current drive in CMD shell I need to type just "C:" or "D:" and without backslash. Added backslash gives an error.

Comment by Oleksii Zagorskyi [ 2012 May 31 ]

Note that most likely (I suppose, need to check) after this suggested change and updating installed agents, discovered disks will be re-added again to monitoring but as new items -> triggers/graphs if they were discovered and added before. It will happen because item key will be changed.
It's not big problem as for LLD, but we should remember that existing history will be lost.

<zalex> Checked, it's true !
Lost resources will continue to be monitored (see ZBX-4475) during a "Keep lost resources period (in days)" period (see discovery rule setting) and at the end they will be REMOVED.
See latest comment bottom of the page for a workaround.

Comment by Alexander Vladishev [ 2012 Jun 20 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-5094

Comment by Oleksii Zagorskyi [ 2012 Jun 20 ]

Would be great ho have binary for windows to retest dev branch.

<Sasha> added in r28378

<zalex> Thanks! Binaries successfully tested under Win XP 32x and Server 2008 R2 64x
Works well!

Comment by dimir [ 2012 Jun 20 ]

Successfully tested!

Comment by Alexander Vladishev [ 2012 Jun 20 ]

Fixed in pre-2.0.1rc2 r28382, pre-2.1.0 (trunk) r28383.

Comment by Oleksii Zagorskyi [ 2012 Jun 21 ]

To all who would like to preserve all existing history here is a workaround - patching data in the DB.

Steps:
1. Stop **ALL** windows agents

2. Check first what will be changed:

SQL> SELECT itemid, key_, REPLACE(key_, '\\', '') as newkey_, flags FROM items WHERE flags = 4 AND key_ LIKE 'vfs.fs.size[_:\%' ESCAPE '!'

3. Update all database if previous step is OK for you:

SQL> UPDATE items SET key_ = REPLACE(key_, '\\', '') WHERE flags = 4 AND key_ LIKE 'vfs.fs.size[_:\%' ESCAPE '!'

4. Update *ALL* windows agents and start them again.

FINISHED

This approach successfully tested for MySQL.

Comment by richlv [ 2012 Jun 21 ]

also mentioned in http://www.zabbix.com/documentation/2.0/manual/introduction/whatsnew201#daemon_improvements (thanks to zalex for notification)

Generated at Sat Aug 02 11:38:35 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.