Ad Widget

Collapse

counting only files in directories

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • carla11
    Junior Member
    • Sep 2022
    • 1

    #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!​
  • freyk
    Junior Member
    • Sep 2022
    • 4

    #2
    Look at "vfs.dir.count​"
    Or You can write a shellscript that count them and send the results to zabbix server with Zabbix Sender or Zabbix API.
    Last edited by freyk; 29-09-2022, 13:59.

    Comment

    Working...