Ad Widget

Collapse

Monitoring folder size

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ivan Madzharov
    Junior Member
    • Mar 2016
    • 11

    #1

    Monitoring folder size

    Hi Zabbix fans,

    Could you help me with advice How to monitoring folder size with Zabbix.
    The Zabbix agents with zabbix_agentd.win.conf file is located on Windows 2012 Server on partition C:\

    The folder that I need to monitor is located on
    Partition G:\

    Path to the folder is G:\TheFolder

    The size of this folder changes(increase) every day.
    I use scheduled tasks and BAT script to move every night content(files) to this folder (G:\TheFolder).

    This folder increase it size every night - this is normal

    I would like to use trigger and monitoring with Zabbix
    - The folder size or the Status of the Scheduled Task that move every night content(files) to this folder (G:\TheFolder).
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Please try create vbscript and use UserParameter.

    ex. foldersize.vbs
    Code:
    Set objFSO = WScript.CreateObject("Scripting.FileSystemObject")
    WScript.Echo objFSO.GetFolder("G:\TheFolder").Size
    Testing on command prompt
    Code:
    cscript //Nologo c:\tools\foldersize.vbs

    Comment

    • Ivan Madzharov
      Junior Member
      • Mar 2016
      • 11

      #3
      Thank Atsushi,

      I created the foldersize.vbs and the script is works properly and gives me foldersize

      Then I opened the zabbix_aggents.win.conf the configuration fail of the Zabbix and added

      UserParameter=foldersize.vbs,G:\TheFolder\foldersi ze.vbs

      The syntax is in this section is:
      #User-defined parameter to monitor. There can be several user-defined parameters.
      #Format: UserParameter=<key>,<shell command>
      In my case the key is foldersize.vbs, and the shell command is G:\TheFolder\foldersize.vbs


      But when I add item with Key foldersize.vbs in Zabbix system I received that this item is not supported, what is the problem?

      Comment

      • Colttt
        Senior Member
        Zabbix Certified Specialist
        • Mar 2009
        • 878

        #4
        ok i think you have somthing wrong with userparameter.. can you please post you userparamter??

        at the moment it must look like:
        Code:
        UserParameter=folder.size, cscript //Nologo c:\tools\foldersize.vbs
        restart agent
        and create a new item, the item-key is folder.size
        Debian-User

        Sorry for my bad english

        Comment

        • Ivan Madzharov
          Junior Member
          • Mar 2016
          • 11

          #5
          Hello Colt and thank for your repply,

          My Userparameter seems like that:

          UserParameter=folder.size,cscript G:\Recordings\foldersize.vbs


          I would like to say that my Zabbix agent .conf is located on Windows server in C:\Zabbix, not in Linux

          And also in configuration page for the Item I choose Zabbix agent. But when I choose Zabbix agent(active) instead Zabbix agent the result in the status is the same "not supported"

          Waiting for your answer
          Thanks in advance!

          Comment

          • Atsushi
            Senior Member
            • Aug 2013
            • 2028

            #6
            Please insert //Nologo option in UserParameter line.

            Comment

            Working...