Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-14459

Receive the same error twice with logrt

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Incomplete
    • Icon: Blocker Blocker
    • None
    • 3.4.9
    • Virtualization: vmware
      Operating System: CentOS Linux 7 (Core)
      Kernel: Linux 3.10.0-693.21.1.el7.x86_64
      Architecture: x86-64

      Steps to reproduce:

      1. Create script on the server (Create discovery rule)
      2. import os
        import sys
        import json
        
        logdir = sys.argv[1]
        
        data = []
        
        for (logdir, _, files) in os.walk(logdir):
        for f in files:
        if f.endswith(".log"):
        path = os.path.join(logdir, f)
        data.append({'{#LOGFILEPATH}':path})
        jsondata = json.dumps(data)
        
        print json.dumps({"data": data})
      1. Save as discoveryfilelog.py and add this entry at the end of the agent configuration : UserParameter = discovery.logfile.path, python /home/scripts/discoveryfilelog.py /var/log/network/
      2. Save and restart the agent on the server
      3. For the discovery configuration, you can See attached screenshot

      We have to monitore many log file, and search on the files (1,2,3,4 or 5).

      But with this configuration we receive the same alert twice. If you have any idea to fix this issue, do not hesitate to help me.

      Thanks,

        1. trigger.png
          trigger.png
          28 kB
        2. item.png
          item.png
          32 kB
        3. discovery macro.png
          discovery macro.png
          8 kB
        4. discoveryfilelog.py
          0.3 kB
        5. discovery.png
          discovery.png
          12 kB

            Unassigned Unassigned
            Niolith keven larouche
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: