Ad Widget

Collapse

vfs.file.size & Windows Environment Variables

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mrogers-9898
    Member
    • Sep 2008
    • 68

    #1

    vfs.file.size & Windows Environment Variables

    Hi All,

    I cannot for the life of me get vfs.file.size working with Windows environment variables.

    Oddly, it works locally when testing from the agent, but not when configured as an item,

    Agent


    Server

    I should note I've tried many combinations of different quotes and escape characters without success.

    If I don't use vfs.file.size and instead get funky, it works fine.

    ..but it doesn't seem elegant.

    Server is 2.2.4, agent was both 2.0.2 and 2.4.

    Any suggestions?
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hi,

    Windows environment variables are not resolved by zabbix_get.

    Please use the item key with full path instead.
    Code:
    vfs.file.size[C:\Windows\write.exe]
    Best Regards,
    Ingus

    Comment

    • mrogers-9898
      Member
      • Sep 2008
      • 68

      #3
      I cannot bet on that Windows is actually living in c:\windows - that's the whole idea of using the environment variables.

      zabbix_get can handle windows environment variables.

      at least in some fashion.

      Using the same parameter in both functions and only one works. Bug?

      Comment

      • bbrendon
        Senior Member
        • Sep 2005
        • 870

        #4
        If you want to use environment variables you can try system.run instead.
        Unofficial Zabbix Expert
        Blog, Corporate Site

        Comment

        Working...