Ad Widget

Collapse

counting only files in directories

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Michal S.
    Junior Member
    • Aug 2022
    • 7

    #1

    counting only files in directories

    Hello,
    I have just started my journey with Zabbix. Such a great tool!

    I have a question about counting files in directories and subdirectories.

    I have a structure:
    /var/xxx/A/A1/*/
    /var/xxx/A/A2/*/
    /var/xxx/a
    /var/xxx/b

    I want to count only files in /var/xxx/ (in my case I have 2 files: a and b), then I want to count only files in directory A, then in A1, A2 and so on.
    Is there a solution to count files (without directories) in these different paths?
    Is there a way to use low level discovery to automatically add items to every folder in which I want to count the sum of files?

    Thanks for helping!
  • vladimir_lv
    Senior Member
    • May 2022
    • 240

    #2
    Take a look 'vfs.dir.count' item

    Comment

    • Michal S.
      Junior Member
      • Aug 2022
      • 7

      #3
      Ok, I see that I should use as a parameter: max_depth = 0. Tkank you.

      Do you know a sollution to my second problem?
      Is there a solution to count files (without directories) in these different paths?
      Is there a way to use low level discovery to automatically add items to every folder in which I want to count the sum of files?

      Best regards,
      Michal

      Comment

      Working...