Hi Support,
I have a trial version of Nagios Log Server installed. I setup a bunch of Linux hosts with syslog monitoring. While syslog monitoring is working as expected, I came across few systems that have few directories with multiple files (different file names) in them that are tied to an application and are in log rotation mode. How can these files (long multi line files just like a text file) be added/polled? I can only get the logs that are configured first time they are added to the Nagios Log Server. Any new files after log rotation are not being polled since the first time added (.conf files are not there after time added for the new log files). Is there a way to see/add all the files under one directory irrespective of any new files created or after logs rotated? Please advise.
Thank you!
Multiple files to be polled under one directory
Re: Multiple files to be polled under one directory
Look at your configs in /etc/rsyslog.d/ assuming you're using rsyslg. You should be able to use wildcards in filenames with a fairly recent rsyslog.
Also look at the logrotate config for the logs.
Also look at the logrotate config for the logs.
-
- Posts: 3
- Joined: Mon Jul 03, 2023 4:10 am
Re: Multiple files to be polled under one directory
If you are concerned about processing the copies in parallel, you can create 6 different scripts, one for each directory, and then run them all from a single script using start scriptname.bat which won't wait for a return value like call does.drift hunters