Ad Widget

Collapse

Unknown file system path on Windows VMware Guests with 7.2.6.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bwarren
    Junior Member
    • May 2021
    • 2

    #1

    Unknown file system path on Windows VMware Guests with 7.2.6.


    I installed 7.2.5 from scratch on CentOS Stream 10, no prior Zabbix version present.
    I use VMware template to discover hosts and VMs.
    For my Windows VMware Guests, and Mounted filesystem Discovery, I noticed that it seemed like only 1 disks free/total/used was being reported for every disk discover on a VM.
    I upgraded to 7.2.6.
    All of my Mounted filesystem discovery items now resulted in "Unknown file system path" on Windows VMs.
    I checked the latest templates, and they appear to be the same.
    I noticed that in 7.2.5 the FSNAME object was returning a value like C:\
    Whereas in 7.2.6 it was returning C: with no \.

    This is an example key:
    vmware.vm.vfs.fs.size[{$VMWARE.URL},{$VMWARE.VM.UUID},{#FSNAME},free]

    I simply added the \ to it to get this working for now.
    vmware.vm.vfs.fs.size[{$VMWARE.URL},{$VMWARE.VM.UUID},{#FSNAME}\,free]

    Now all my disk items work.

    I'm posting here in case anyone else is having this problem because I wasted way too much time on this. And you will absolutely hate life if your life if try to get AI to solve this for you.

  • crmendoza
    Junior Member
    • May 2025
    • 6

    #2
    I have this same issue with Zabbix 7.0.12 LTS on my Windows VM guests returning "Unknown file system path" for the following
    Template = VMware or VMware FQDN
    Parent items: VMware Guest
    Discovered by: Mounted filesystem discovery
    Name: Free disk space on [{#FSNAME}]
    key: vmware.vm.vfs.fs.size[{$VMWARE.URL},{$VMWARE.VM.UUID},{#FSNAME},free]
    Name: Free disk space on [{#FSNAME}] (percentage)
    Key: vmware.vm.vfs.fs.size[{$VMWARE.URL},{$VMWARE.VM.UUID},{#FSNAME},pfree]
    Name: Total disk space on [{#FSNAME}]
    vmware.vm.vfs.fs.size[{$VMWARE.URL},{$VMWARE.VM.UUID},{#FSNAME},total]
    Name: Used disk space on [{#FSNAME}]
    vmware.vm.vfs.fs.size[{$VMWARE.URL},{$VMWARE.VM.UUID},{#FSNAME},used]

    But, when I change the Template (can't change the item directly on the VM guest because it was Discovered by Mounted filesystem discovery and was greyed out) to {#FSNAME}\ the Windows VM guests' latest data is collected and now my Lunix VM guests' are now returning "Unknown file system path" because it is now trying the {#FSNAME}\ (i.e [/]\, [/var]\ ). How can I set the VMware Template to add the "" for Windows Mounted filesystem discovery and without it for Linux systems.​

    Comment

    • crmendoza
      Junior Member
      • May 2025
      • 6

      #3
      Here is a screenshot after changing {#FSNAME} to {#FSNAME}\, Now the Linux machine CRLSMONITOR01 is returning "Unknown file system path" and the Windows File server VST1FILES02 is gathering data (On the Free disk space on [{#FSNAME}], I did not bother changing the Name but the key is using {#FSNAME}\)

      Comment

      • M D
        Junior Member
        • Feb 2025
        • 7

        #4
        There was a change in 7.0.11 that somehow somehow broke the discovery: https://github.com/zabbix/zabbix/com...5eaac524b0f96e
        The change added a preprocessing step to strip \ at the end of the string.

        Code:
        const data = JSON.parse(value);
        
        for (var i in data) {
          if (data[i]['{#FSNAME}'].endsWith('\\')) {
            data[i]['{#FSNAME}'] = data[i]['{#FSNAME}'].replace(/\\+$/, '');
          }
        }
        
        return JSON.stringify(data);
        We have the same problem with our windows vms now. The disks are discovered, but the check is returning an error -> Unknown file system path.

        Comment

        • M D
          Junior Member
          • Feb 2025
          • 7

          #5

          i double checked:
          The item prototype is wrong.
          Code:
          vmware.vm.vfs.fs.size[{$VMWARE.URL},{$VMWARE.VM.UUID},{#FSNAME},free]
          As the preprocessing step removes all \ from #FSNAME, the created item will read
          Code:
          vmware.vm.vfs.fs.size[{$VMWARE.URL},{$VMWARE.VM.UUID},c:,free]
          but c: does not exists when vmware.vm.vfs.fs.size is executed. i created an item with
          Code:
          vmware.vm.vfs.fs.size[{$VMWARE.URL},{$VMWARE.VM.UUID},c:\,free]
          and got a nice result.

          But you cant just edit the item prototype to be {#FSNAME}\ because then you WILL brake the check for linux systems.

          Comment

          • M D
            Junior Member
            • Feb 2025
            • 7

            #6
            Quickfix: Just remove the preprocessing step in discovery. All triggers and items will be created successfully.
            Last edited by M D; 19-05-2025, 08:39.

            Comment


            • crmendoza
              crmendoza commented
              Editing a comment
              Where do I find this preprocessing step in discovery? I can't find any preprocessing step in Zabbix 7.0.12 Data Collection -> All templates -> VMware -> Discovery list -> VMware VM discovery - Preprocessing Tab.

            • crmendoza
              crmendoza commented
              Editing a comment
              I also checked the following Item prototypes:
              Free disk space on [{#FSNAME}] does not have any preprocessing.
              Free disk space on [{#FSNAME}] (percentage) does not have any preprocessing.
              Total disk space on [{#FSNAME}] Preprocessing = Discard unchanged with heartbeat
              Used disk space on [{#FSNAME}] does not have any preprocessing.
          • crmendoza
            Junior Member
            • May 2025
            • 6

            #7
            I think I have this fixed for Zabbix 7.0.12 for both Windows and Linux. Let me know if this works for other versions.

            I added preprocessing step JavaScript, Type of information Text

            Code:
            if (/^[A-Z]:$/.test(value)) {
            return value + "\\";
            } else {
            return value;
            }

            to Mounted filesystem discovery​ Item prototypes
            Free disk space on [{#FSNAME}]
            Free disk space on [{#FSNAME}] (percentage)
            Total disk space on [{#FSNAME}]
            Used disk space on [{#FSNAME}]

            Comment


            • Zaaappe
              Zaaappe commented
              Editing a comment
              Thanks, it worked for 7.2.7
          • crmendoza
            Junior Member
            • May 2025
            • 6

            #8
            The fix is not working for all of the values for Windows, it only collects correctly for one value path and rest fail, but Linux servers all work. See attached screenshot. What do I need to do to preprocess the correct file path for Windows?
            Attached Files

            Comment

            • crmendoza
              Junior Member
              • May 2025
              • 6

              #9
              I was able to find and remove the preprocessing step in discovery rule VMware VM discovery. Everything is collected and all file systems paths are found.

              Comment

              • M D
                Junior Member
                • Feb 2025
                • 7

                #10
                FYI, i openened a bug report at zabbix for this exactly case.

                Comment

                • aecardenas
                  Junior Member
                  • Mar 2025
                  • 2

                  #11
                  Originally posted by crmendoza
                  I think I have this fixed for Zabbix 7.0.12 for both Windows and Linux. Let me know if this works for other versions.

                  I added preprocessing step JavaScript, Type of information Text

                  Code:
                  if (/^[A-Z]:$/.test(value)) {
                  return value + "\\";
                  } else {
                  return value;
                  }
                  to Mounted filesystem discovery​ Item prototypes
                  Free disk space on [{#FSNAME}]
                  Free disk space on [{#FSNAME}] (percentage)
                  Total disk space on [{#FSNAME}]
                  Used disk space on [{#FSNAME}]
                  Thank you, it worked in 7.2.7 for me

                  Originally posted by crmendoza
                  The fix is not working for all of the values for Windows, it only collects correctly for one value path and rest fail, but Linux servers all work. See attached screenshot. What do I need to do to preprocess the correct file path for Windows?
                  The script works just fine, I think for the unknown values the update interval is 1H, try opening the specific item with the problem, clicking on execute now, then update, and you'll see that it shows the right value.​

                  Comment

                  • anjoze
                    Junior Member
                    • May 2025
                    • 8

                    #12
                    I have the same problem.
                    When I open Item Preprocessing, the Preprocessing steps -> Add, is greyed out so I can't insert the script.
                    Any suggestion?

                    Comment

                    • M D
                      Junior Member
                      • Feb 2025
                      • 7

                      #13
                      You need to edit the template.

                      Comment

                      • anjoze
                        Junior Member
                        • May 2025
                        • 8

                        #14
                        Thanks for your help.
                        I've inserted the Javascript on this template parameters:


                        Then I open the Host/Items and I can confirm that the Javascript is on the four Items.
                        Like this:


                        I click on Execute now but nothing happens, still have the "Unknown file system path" error and no data on that fields.

                        Comment

                        • M D
                          Junior Member
                          • Feb 2025
                          • 7

                          #15
                          As i said, you need to delete the preprocessing script. Dont know how aecardenas got it to work.

                          Comment

                          Working...