Ad Widget

Collapse

Monitoring the number of files in different locations

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DaLoZ
    Junior Member
    • Aug 2022
    • 25

    #1

    Monitoring the number of files in different locations

    We have several systems that still communicate by placing files in folders and other systems picking them up. So we need need to monitor the number of files in these folders / file-age to determine if the communication still works.

    I created a template with the following item and applied it to one of the servers:

    Code:
    vfs.dir.count[{$COUNT.PATH},,,file,,{$COUNT.DEPTH},,,,,]
    This works fine for one folder but this needs to monitor 100+ folders on different servers.

    Is there a better way that to make a template for every server? These templates then have an item for every folder it needs to monitor on that server.

  • vladimir_lv
    Senior Member
    • May 2022
    • 240

    #2
    Is there folders' location the same for all? If yes, the better way is to make a template and then use the "Mass update" option to assign it to needed hosts.

    Comment


    • DaLoZ
      DaLoZ commented
      Editing a comment
      Location of these folders are different for every server.
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #3
    Make one template with this item (vfs.dir.count[{$COUNT.PATH},,,file,,{$COUNT.DEPTH},,,,,]) and redefine the {$COUNT.PATH} macro on each server.
    There are no miracles - different settings == a lot of manual work.

    Comment

    • Semiadmin
      Senior Member
      • Oct 2014
      • 1625

      #4
      Parameter "dir" in fs.dir.count is just a start point to your search.
      So if there is some sign by which you can distinguish needed files or folders, you may start from the root and all that limits you is the agent timeout.

      Comment


      • DaLoZ
        DaLoZ commented
        Editing a comment
        Great idea! This could work if we only need to check file age. The files usually have the same extension. Only question I have is how to write a trigger that makes it clear which folder is not getting read.
    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #5
      If all of them are different, then there is no good way to avoid manual work.. Either, as Hamardaban suggested, macros on each host, or keep those needed paths and depths on each server in a file and build a template with discovery and item/trigger prototypes on top of it...

      Comment

      Working...