Ad Widget

Collapse

Number of files in a Folder.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abel5405
    Member
    • Jan 2019
    • 47

    #1

    Number of files in a Folder.

    Greetings All,
    I can see in Zabbix 3.4 that vfs.file.exists[file] will tell me if a file exists but is there a way to alert me if there are 50 or more of a specific file pattern? Many thanks in advance for your help.

    v/r
    Chris
  • brunohl
    Senior Member
    Zabbix Certified Specialist
    • Mar 2019
    • 215

    #2
    Hello, have you tried vfs.dir.count?
    Code:
    vfs.dir.count[dir,<regex_incl>,<regex_excl>,<types_incl>,<types_excl>,<max_depth>,<min_size>,<max_size>,<min_age>,<max_age>]

    Comment

    • abel5405
      Member
      • Jan 2019
      • 47

      #3
      Is that Zabbix 4.0 only? We are on Zabbix 3.4 and I do not see it listed. Many thanks though for the response!

      v/r
      Chris

      Comment

      • brunohl
        Senior Member
        Zabbix Certified Specialist
        • Mar 2019
        • 215

        #4
        Ah, I guess.

        You could create an UserParameter whick would ls through a directory and use "wc -l" to count if in a Linux enviroment.

        Comment

        • abel5405
          Member
          • Jan 2019
          • 47

          #5
          Actually this is for Windows Systems but that is an AWESOME idea. I can try and adapt the DIR command to get what I want. Many thanks for the idea an your time!

          v/r
          Chris

          Comment

          • sancho
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Mar 2015
            • 295

            #6
            Hello

            You can use the unxutils, are some ports of common GNU utilities to native Win32.

            The find.exe utility of the unixutils is better renamed to findl.exe so that it does not conflict with the find command of windows

            I hope it helps you

            Comment

            Working...