Multiple files to be polled under one directory

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Post Reply
msmulpuri
Posts: 27
Joined: Thu Sep 22, 2016 7:40 am

Multiple files to be polled under one directory

Post by msmulpuri »

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!
kg2857
Posts: 234
Joined: Wed Apr 12, 2023 5:48 pm

Re: Multiple files to be polled under one directory

Post by kg2857 »

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.
patrickhayes
Posts: 3
Joined: Mon Jul 03, 2023 4:10 am

Re: Multiple files to be polled under one directory

Post by patrickhayes »

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
Post Reply