-
Incident report
-
Resolution: Incomplete
-
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:
- Create script on the server (Create discovery rule)
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})
- 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/
- Save and restart the agent on the server
- 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,