Ad Widget

Collapse

monitoring file exist

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • developerlearn999
    Junior Member
    • Feb 2018
    • 9

    #1

    monitoring file exist

    i want to monitor if file exist or not (error on some system)
    what do i need to to do to monitor it?
    add trigger?do some setting on agent?
    can some one explain step by step?

    thanks for any help
  • tcilmo
    Senior Member
    • Nov 2016
    • 122

    #2
    Originally posted by developerlearn999
    i want to monitor if file exist or not (error on some system)
    what do i need to to do to monitor it?
    add trigger?do some setting on agent?
    can some one explain step by step?

    thanks for any help
    We use the sumd5sum item. This example is 3-fold. We monitor for a file change, if the file is missing, and if the item is not recieving data (broken monitoring).

    Here are the trigger expressions.
    1) File Changed: {sumd5sum[path_to_file].diff()}=1}
    2) No data or Missing File: {sumd5sum[path_to_file].nodata(60m)}=1 or sumd5sum[path_to_file].strlen()}=0}

    Hope this helps!

    Comment

    • developerlearn999
      Junior Member
      • Feb 2018
      • 9

      #3
      how and where do i set it?

      what to configure on server and what on client?

      Comment

      • tcilmo
        Senior Member
        • Nov 2016
        • 122

        #4
        You have to configure the items and triggers on the host in Zabbix or with a template and then apply it to the hosts to monitor. These are Zabbix agent keys.

        Comment

        • developerlearn999
          Junior Member
          • Feb 2018
          • 9

          #5
          why i can configure this on agent

          i tried to define on agent
          vfs.file.exists[/tmp/application.pid]
          and the agent don't start until i remove it.
          do i need to add something else?

          Comment

          • tcilmo
            Senior Member
            • Nov 2016
            • 122

            #6
            Originally posted by developerlearn999
            i tried to define on agent
            vfs.file.exists[/tmp/application.pid]
            and the agent don't start until i remove it.
            do i need to add something else?
            The item type to use is Zabbix agent or Zabbix Agent Active. This is configured though the GUI. No need for a user parameter.

            Comment

            • developerlearn999
              Junior Member
              • Feb 2018
              • 9

              #7
              agent active

              if i want to make it when agent active i dont need to define
              anything on the agent side?
              i saw it on this part and i thought i should it on client side :

              ############ ADVANCED PARAMETERS #################

              ### Option: Alias
              # Sets an alias for an item key. It can be used to substitute long and complex item key with a smaller and simpler one.
              # Multiple Alias parameters may be present. Multiple parameters with the same Alias key are not allowed.
              # Different Alias keys may reference the same item key.
              # For example, to retrieve the ID of user 'zabbix':
              # Alias=zabbix.userid:vfs.file.regexp[/etc/passwd,^zabbix:.[0-9]+),,,,\1]
              # Now shorthand key zabbix.userid may be used to retrieve data.
              #

              Comment

              • tcilmo
                Senior Member
                • Nov 2016
                • 122

                #8
                Originally posted by developerlearn999
                if i want to make it when agent active i dont need to define
                anything on the agent side?
                i saw it on this part and i thought i should it on client side :
                nope - don't do that.

                Comment

                • developerlearn999
                  Junior Member
                  • Feb 2018
                  • 9

                  #9
                  i am looking for a "scenario"

                  i am looking for a "scenario"
                  which explain the relation between application->template->item->trigger
                  how to build it from Zero and so on
                  did you saw maybe some article about it?

                  Comment

                  • suhail
                    Junior Member
                    • Sep 2019
                    • 2

                    #10
                    Hi,
                    im new to zabbix,

                    i like to create an Action, to delete Host Temp files in windows every 20 days automatically.

                    can someone please guide me? and teach how to create actions?

                    this below commands i like to run
                    Del /S /F /Q %temp% (This clears the Userprofile Temp folder).
                    Del /S /F /Q %Windir%\Temp (This clears the Windows temp folder.)

                    i already enabled Remote commands in Agent.config

                    Comment

                    • Rudlafik
                      Senior Member
                      • Nov 2018
                      • 144

                      #11
                      I set on windows system on folder properties - security - auditing. And than control security log for specific event. In ZBX i set control log file an regexp event filter.

                      Comment

                      Working...