Ad Widget

Collapse

Check if directory exists

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ryan.Rockwell
    Junior Member
    • Feb 2021
    • 5

    #1

    Check if directory exists

    Zabbix 5.0.4
    I'm banging my head against the wall over something that should be fairly straight forward and maybe I'm just missing it.. I need to check if a windows directory exists. That's it. I don't need to count # of file in the directory or see how big the directory is. I've crawled through the documentation and scoured through Google with no luck. vfs.dir.count and vfs.dir.size don't work because they are numeric and if the directory isn't there is returns characters. Thoughts?
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Hi Ryan-

    You're in luck; support for directory types was added to vfs.file.exists[] in Zabbix 5.0.3, so the version you have should support it.

    See:



    which points to



    Comment

    • Ryan.Rockwell
      Junior Member
      • Feb 2021
      • 5

      #3
      Worked perfectly. Thanks.

      Comment

      Working...